libSBML Python API  5.10.0
 All Classes Namespaces Files Functions Variables Modules Pages
libsbml.AutoProperty Class Reference
Inheritance diagram for libsbml.AutoProperty:
[legend]

Detailed Description

Metaclass for automatically detecting getX/setX methods and adding properties to the class dictionary.

This class is attached to SBase and automatically applies for all classes which inherit from it. Its purpose is to make libSBML more convenient to use from Python. It works by analyzing classes at class creation time (not at instantiation) and adding corresponding properties (directly calling C methods where possible) to the class dictionary.

Note
Currently this class only works for Python 2.x, but should not break in Python 3.

Public Member Functions

def __new__
 

Member Function Documentation

def libsbml.AutoProperty.__new__ (   cls,
  classname,
  bases,
  classdict 
)

Iterate over the items in the classdict looking for get/set pairs and declaring them as properties.