Пример #1
0
 def __init__(self, *args, **kwargs):
     DBModule.__init__(self, *args, **kwargs)
     if self.cache is None:
         self.cache = 1
     if self.id is None:
         self.id = -1
     if self.location is None:
         self.location = Location(x=-1.0, y=-1.0)
     if self.name is None:
         self.name = ''
     if self.package is None:
         self.package = ''
     if self.version is None:
         self.version = ''
     self.set_defaults()
 def __init__(self, *args, **kwargs):
     DBModule.__init__(self, *args, **kwargs)
     if self.cache is None:
         self.cache = 1
     if self.id is None:
         self.id = -1
     if self.location is None:
         self.location = Location(x=-1.0, y=-1.0)
     if self.name is None:
         self.name = ''
     if self.package is None:
         self.package = ''
     if self.version is None:
         self.version = ''
     self.set_defaults()
Пример #3
0
 def __init__(self, *args, **kwargs):
     DBModule.__init__(self, *args, **kwargs)
     if self.cache is None:
         self.cache = 1
     if self.id is None:
         self.id = -1
     if self.location is None:
         self.location = Location(x=-1.0, y=-1.0)
     if self.name is None:
         self.name = ''
     if self.package is None:
         self.package = ''
     if self.version is None:
         self.version = ''
     self.portVisible = set()
     self.registry = None
Пример #4
0
 def do_copy(self, new_ids=False, id_scope=None, id_remap=None):
     cp = DBModule.do_copy(self, new_ids, id_scope, id_remap)
     cp.__class__ = Module
     # cp.registry = copy.copy(self.registry)
     cp.registry = None
     for port_spec in cp.db_portSpecs:
         cp.add_port_to_registry(port_spec)
     cp.portVisible = copy.copy(self.portVisible)
     return cp
Пример #5
0
 def delete_port_spec(self, spec):
     if spec.type == 'input':
         self._input_port_specs.remove(spec)
     elif spec.type == 'output':
         self._output_port_specs.remove(spec)
     DBModule.db_delete_portSpec(self, spec)
Пример #6
0
 def add_port_spec(self, spec):
     DBModule.db_add_portSpec(self, spec)
     if spec.type == 'input':
         self._input_port_specs.append(spec)
     elif spec.type == 'output':
         self._output_port_specs.append(spec)
Пример #7
0
 def do_copy(self, new_ids=False, id_scope=None, id_remap=None):
     cp = DBModule.do_copy(self, new_ids, id_scope, id_remap)
     cp.__class__ = Module
     cp.set_defaults(self)
     return cp
 def delete_port_spec(self, spec):
     if spec.type == 'input':
         self._input_port_specs.remove(spec)
     elif spec.type == 'output':
         self._output_port_specs.remove(spec)
     DBModule.db_delete_portSpec(self, spec)
 def add_port_spec(self, spec):
     DBModule.db_add_portSpec(self, spec)
     if spec.type == 'input':
         self._input_port_specs.append(spec)
     elif spec.type == 'output':
         self._output_port_specs.append(spec)
 def do_copy(self, new_ids=False, id_scope=None, id_remap=None):
     cp = DBModule.do_copy(self, new_ids, id_scope, id_remap)
     cp.__class__ = Module
     cp.set_defaults(self)
     return cp