Removing package directories.
[PyCIM.git] / CIM14 / Dynamics / BlockType.py
blob7cbbad4d48d5e6cf77287c619858c6ffd7348124
1 # Copyright (C) 2010 Richard Lincoln
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, USA
17 from CIM14.IEC61970.Core.IdentifiedObject import IdentifiedObject
19 class BlockType(IdentifiedObject):
20 """This is the kind of a block used to specify what kind of blocks could fit into a particular slot. For example, only blocks of type 'pss' would fit into a 'pss' type block. Though a cross compound generator configuration would possibly have multple pss blocks playing specific roles such as pss1 and pss2..
21 """
23 def __init__(self, slot0=None, metaBlock0=None, *args, **kw_args):
24 """Initialises a new 'BlockType' instance.
26 @param slot0:
27 @param metaBlock0:
28 """
29 self._slot0 = []
30 self.slot0 = [] if slot0 is None else slot0
32 self._metaBlock0 = []
33 self.metaBlock0 = [] if metaBlock0 is None else metaBlock0
35 super(BlockType, self).__init__(*args, **kw_args)
37 _attrs = []
38 _attr_types = {}
39 _defaults = {}
40 _enums = {}
41 _refs = ["slot0", "metaBlock0"]
42 _many_refs = ["slot0", "metaBlock0"]
44 def getslot0(self):
46 return self._slot0
48 def setslot0(self, value):
49 for x in self._slot0:
50 x._blockType0 = None
51 for y in value:
52 y._blockType0 = self
53 self._slot0 = value
55 slot0 = property(getslot0, setslot0)
57 def addslot0(self, *slot0):
58 for obj in slot0:
59 obj._blockType0 = self
60 self._slot0.append(obj)
62 def removeslot0(self, *slot0):
63 for obj in slot0:
64 obj._blockType0 = None
65 self._slot0.remove(obj)
67 def getmetaBlock0(self):
69 return self._metaBlock0
71 def setmetaBlock0(self, value):
72 for x in self._metaBlock0:
73 x._blockType0 = None
74 for y in value:
75 y._blockType0 = self
76 self._metaBlock0 = value
78 metaBlock0 = property(getmetaBlock0, setmetaBlock0)
80 def addmetaBlock0(self, *metaBlock0):
81 for obj in metaBlock0:
82 obj._blockType0 = self
83 self._metaBlock0.append(obj)
85 def removemetaBlock0(self, *metaBlock0):
86 for obj in metaBlock0:
87 obj._blockType0 = None
88 self._metaBlock0.remove(obj)