示例#1
0
 def from_xml(cls, element, document, **kwargs):  # @UnusedVariable
     # The only supported op at this stage
     dynamics_properties = from_child_xml(
         element, DynamicsProperties, document, **kwargs)
     analog_port_connections = from_child_xml(
         element, AnalogPortConnection, document, multiple=True,
         allow_none=True, **kwargs)
     event_port_connections = from_child_xml(
         element, EventPortConnection, document, multiple=True,
         allow_none=True, **kwargs)
     return cls(get_xml_attr(element, 'name', document, **kwargs),
                dynamics_properties, chain(analog_port_connections,
                                           event_port_connections))
示例#2
0
 def from_xml(cls, element, document, **kwargs):  # @UnusedVariable
     # The only supported op at this stage
     dynamics = from_child_xml(
         element, cls.wrapped_class, document, within='Cell',
         allow_reference=True, **kwargs)
     synapses = from_child_xml(
         element, Synapse, document, multiple=True, allow_none=True,
         **kwargs)
     parameter_sets = from_child_xml(
         element, ConnectionParameterSet, document, multiple=True,
         allow_none=True, **kwargs)
     name = get_xml_attr(element, 'name', document, **kwargs)
     return cls(name, dynamics, synapses, parameter_sets)