Example #1
0
    def add_property(self, name, fget, fset=None, doc=""):
        """adds new property to the class

        :param name: name of the property
        :type name: str

        :param fget: reference to the class member function
        :param fset: reference to the class member function, could be None
        :param doc: documentation string
        """
        self._properties.append(properties.property_t(name, fget, fset, doc))
Example #2
0
    def add_property(self, name, fget, fset=None, doc=''):
        """adds new property to the class

        :param name: name of the property
        :type name: str

        :param fget: reference to the class member function
        :param fset: reference to the class member function, could be None
        :param doc: documentation string
        """
        self._properties.append(properties.property_t(name, fget, fset, doc))
Example #3
0
 def add_static_property(self, name, fget, fset=None, doc=""):
     """adds new static property to the class"""
     self._properties.append(properties.property_t(name, fget, fset, doc, True))
Example #4
0
 def add_static_property(self, name, fget, fset=None, doc=''):
     """adds new static property to the class"""
     self._properties.append(
         properties.property_t(name, fget, fset, doc, True))