コード例 #1
0
 def add_method(self, method):
     
     if self.final:
         if method.visibility == Visibility.PROTECTED:
             raise DefinitionError("Final classes must not have protected methods")
         elif method.inheritance_mode != MethodInheritance.FINAL:
             raise DefinitionError("Final classes must not have abstract or virtual methods")
             
     ClsIntf.add_method(self, method)
コード例 #2
0
    def __init__(self,
                 name,
                 package = None,
                 is_external = False
                 ):

        ClsIntf.__init__(self, name, package, is_external)
        
        self.prefix = name # prefix used in function names

        self._signals = {}
コード例 #3
0
    def __init__(self,
                 name,
                 package = None,
                 super_class = None,
                 is_external = False
                 ):

        ClsIntf.__init__(self, name, package, is_external)
        
        self._super_class = super_class
        self.abstract = False
        self.final = False
        self.prefix = name # prefix to be used in functions

        self._interfaces = {}
        self._attributes = []
        self.constructor = Constructor(self)
        self._overridden = {} # method info for overridden methods
        self._properties = {}
        self._signals = {}