Fixing website and API documentation links
[PyCIM.git] / CIM14 / IEC61970 / Dynamics / BlockType.py
blobb01dc6e0f6eb535d1e86ecf40ec9aa8c9a0209a8
1 # Copyright (C) 2010-2011 Richard Lincoln
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to
5 # deal in the Software without restriction, including without limitation the
6 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 # sell copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 # IN THE SOFTWARE.
21 from CIM14.IEC61970.Core.IdentifiedObject import IdentifiedObject
23 class BlockType(IdentifiedObject):
24 """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..
25 """
27 def __init__(self, slot0=None, metaBlock0=None, *args, **kw_args):
28 """Initialises a new 'BlockType' instance.
30 @param slot0:
31 @param metaBlock0:
32 """
33 self._slot0 = []
34 self.slot0 = [] if slot0 is None else slot0
36 self._metaBlock0 = []
37 self.metaBlock0 = [] if metaBlock0 is None else metaBlock0
39 super(BlockType, self).__init__(*args, **kw_args)
41 _attrs = []
42 _attr_types = {}
43 _defaults = {}
44 _enums = {}
45 _refs = ["slot0", "metaBlock0"]
46 _many_refs = ["slot0", "metaBlock0"]
48 def getslot0(self):
50 return self._slot0
52 def setslot0(self, value):
53 for x in self._slot0:
54 x.blockType0 = None
55 for y in value:
56 y._blockType0 = self
57 self._slot0 = value
59 slot0 = property(getslot0, setslot0)
61 def addslot0(self, *slot0):
62 for obj in slot0:
63 obj.blockType0 = self
65 def removeslot0(self, *slot0):
66 for obj in slot0:
67 obj.blockType0 = None
69 def getmetaBlock0(self):
71 return self._metaBlock0
73 def setmetaBlock0(self, value):
74 for x in self._metaBlock0:
75 x.blockType0 = None
76 for y in value:
77 y._blockType0 = self
78 self._metaBlock0 = value
80 metaBlock0 = property(getmetaBlock0, setmetaBlock0)
82 def addmetaBlock0(self, *metaBlock0):
83 for obj in metaBlock0:
84 obj.blockType0 = self
86 def removemetaBlock0(self, *metaBlock0):
87 for obj in metaBlock0:
88 obj.blockType0 = None