# Path: lems/base/base.py
# class LEMSBase(object):
#     """
#     Base object for PyLEMS.
#     """
# 
#     def copy(self):
#         return copy.deepcopy(self)
# 
#     def toxml(self):
#         return ""
# 
# Path: lems/base/map.py
# class Map(dict, LEMSBase):
#     """
#     Map class.
# 
#     Same as dict, but iterates over values.
#     """
# 
#     def __init__(self, *params, **key_params):
#         """
#         Constructor.
#         """
# 
#         dict.__init__(self, *params, **key_params)
# 
#     def __iter__(self):
#         """
#         Returns an iterator.
#         """
# 
#         return iter(self.values())
# 
# Path: lems/base/errors.py
# class ModelError(LEMSError):
#     """
#     Exception class to signal errors in creating the model.
#     """
# 
#     pass


from lems.base.base import LEMSBase
from lems.base.map import Map
from lems.base.errors import ModelError
    """
    Stores a child instantiation specification.
    """

    def __init__(self, component, referenced_component=None):
        """
        Constructor.

        See instance variable documentation for more details on parameters.
        """

        self.component = component
        """ Name of the component reference to be used for instantiation.
        :type: str """

        self.referenced_component = referenced_component
        """ Target component being referenced after resolution.
        :type: lems.model.component.FatComponent """

    def __eq__(self, o):
        return self.component == o.component

    def toxml(self):
        """
        Exports this object into a LEMS XML object
        """

        return '<ChildInstance component="{0}"/>'.format(self.component)



# Path: lems/base/base.py
# class LEMSBase(object):
#     """
#     Base object for PyLEMS.
#     """
# 
#     def copy(self):
#         return copy.deepcopy(self)
# 
#     def toxml(self):
#         return ""
# 
# Path: lems/base/map.py
# class Map(dict, LEMSBase):
#     """
#     Map class.
# 
#     Same as dict, but iterates over values.
#     """
# 
#     def __init__(self, *params, **key_params):
#         """
#         Constructor.
#         """
# 
#         dict.__init__(self, *params, **key_params)
# 
#     def __iter__(self):
#         """
#         Returns an iterator.
#         """
# 
#         return iter(self.values())
# 
# Path: lems/base/errors.py
# class ModelError(LEMSError):
#     """
#     Exception class to signal errors in creating the model.
#     """
# 
#     pass


# Path: lems/model/structure.py
from lems.base.base import LEMSBase
from lems.base.map import Map
from lems.base.errors import ModelError

    """
    Stores a child instantiation specification.
    """

    def __init__(self, component, referenced_component=None):
        """
        Constructor.

        See instance variable documentation for more details on parameters.
        """

        self.component = component
        """ Name of the component reference to be used for instantiation.
        :type: str """

        self.referenced_component = referenced_component
        """ Target component being referenced after resolution.
        :type: lems.model.component.FatComponent """

    def __eq__(self, o):
        return self.component == o.component

    def toxml(self):
        """
        Exports this object into a LEMS XML object
        """

        return '<ChildInstance component="{0}"/>'.format(self.component)



class Assign(LEMSBase):