#NEWLINE# def __init__( self , name = None , short_name = None , cls = None , fqname = None , category = None , modulename = None ) : #NEWLINE# #INDENT# assert ( name or fqname ) #NEWLINE# self . _name = ( fqname or name ) #NEWLINE# self . _short_name = short_name #NEWLINE# self . _modulename = modulename #NEWLINE# self . _is_bound = ( cls is not None ) #NEWLINE# self . _categories = tuple ( ( category if isinstance ( category , ( list , tuple ) ) else [ category ] ) ) #NEWLINE# self . _has_on_dirty_callback = hasattr ( self , 'on_set_dirty' ) #NEWLINE# self . _has_set_date_callback = hasattr ( self , 'on_set_date' ) #NEWLINE# self . _has_timestep_update = False #NEWLINE# self . _dirty_flags_propagate_mask = self . dirty_flags_propagate_mask #NEWLINE# self . _derived_nodes = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( cls is not None ) : #NEWLINE# #INDENT# base_cls = cls #NEWLINE# if isinstance ( cls , tuple ) : #NEWLINE# #INDENT# ( cls , base_cls ) = cls #NEWLINE# #UNINDENT# module = None #NEWLINE# if hasattr ( cls , '__module__' ) : #NEWLINE# #INDENT# module = sys . modules . get ( cls . __module__ ) #NEWLINE# #UNINDENT# if ( module is None ) : #NEWLINE# #INDENT# module = inspect . getmodule ( cls ) #NEWLINE# #UNINDENT# self . _modulename = ( modulename or _get_module_name ( module ) ) #NEWLINE# if ( fqname is None ) : #NEWLINE# #INDENT# self . _name = ( '%s.%s:%s.%s' % ( self . _modulename , cls . __name__ , base_cls . __name__ , name ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# ( module , clsname ) = _get_calling_module_and_class ( ) #NEWLINE# if ( ( module is not None ) or ( clsname is not None ) ) : #NEWLINE# #INDENT# if ( self . _modulename is None ) : #NEWLINE# #INDENT# if ( module is None ) : #NEWLINE# #INDENT# self . _modulename = '__unknown__' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _modulename = _get_module_name ( module ) #NEWLINE# #UNINDENT# #UNINDENT# if ( fqname is None ) : #NEWLINE# #INDENT# if clsname : #NEWLINE# #INDENT# self . _name = ( '%s.%s.%s' % ( self . _modulename , clsname , name ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _name = ( '%s.%s' % ( self . _modulename , name ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# self . _states = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# MDFContext . register_node ( self )