Beispiel #1
0
def readonly_getter(getterName):
    def getter(self):
        return getattr(self.reference, getterName)()
    methodName = getterName
    getter.__name__ = methodName
    annotate.injectAttribute("readonly_proxy_getter", methodName, getter)
    annotate.injectClassCallback("readonly_proxy_getter", "_makeRemote", methodName)
Beispiel #2
0
def readonly_store_property(propertyName):
    def getter(self):
        return getattr(self.reference.store, propertyName)
    methodName = "get" + propertyName[0].upper() + propertyName[1:]
    getter.__name__ = methodName
    annotate.injectAttribute("readonly_store_property", methodName, getter)
    annotate.injectClassCallback("readonly_store_property", "_makeRemote", methodName)
Beispiel #3
0
 def decorator(method):
     methodName = method.__name__
     annotate.injectClassCallback("make_remote",
                                  "_makeRemote", methodName, prefix)
     return method
Beispiel #4
0
def register_medium(mediumIface, objectIface):
    annotate.injectClassCallback("registerMedium", "_registerMedium",
                                 mediumIface, objectIface)