class ObjectDefinition(GeneratorGroup):
"Spit out code that together defines a new Python object type"
+ basechain = "NULL"
def __init__(self, name, prefix, itselftype):
"""ObjectDefinition constructor. May be extended, but do not override.
self.typename = name + '_Type'
self.argref = "" # set to "*" if arg to <type>_New should be pointer
self.static = "static " # set to "" to make <type>_New and <type>_Convert public
- self.basechain = "NULL" # set to &<basetype>_chain to chain methods
def add(self, g, dupcheck=0):
g.setselftype(self.objecttype, self.itselftype)