Fixing website and API documentation links
[PyCIM.git] / CIM14 / IEC61970 / Dynamics / BlockUsageInputReference.py
blob14ccb70d408dadf6db8b80bd02edc424762fe23d
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 BlockUsageInputReference(IdentifiedObject):
24 """Used at instance level to tie the input of a referenced block to the output of another referenced block. Note that typically an input is only tied to an output of another block at the same PowerSystemResource, but there is no restriction to do so.
25 """
27 def __init__(self, block0=None, BlockUsageOutputReference=None, metaBlockInput0=None, *args, **kw_args):
28 """Initialises a new 'BlockUsageInputReference' instance.
30 @param block0:
31 @param BlockUsageOutputReference: Can cross BlockUsage objects.
32 @param metaBlockInput0:
33 """
34 self._block0 = None
35 self.block0 = block0
37 self._BlockUsageOutputReference = None
38 self.BlockUsageOutputReference = BlockUsageOutputReference
40 self._metaBlockInput0 = None
41 self.metaBlockInput0 = metaBlockInput0
43 super(BlockUsageInputReference, self).__init__(*args, **kw_args)
45 _attrs = []
46 _attr_types = {}
47 _defaults = {}
48 _enums = {}
49 _refs = ["block0", "BlockUsageOutputReference", "metaBlockInput0"]
50 _many_refs = []
52 def getblock0(self):
54 return self._block0
56 def setblock0(self, value):
57 if self._block0 is not None:
58 filtered = [x for x in self.block0.blockUsageInputReference0 if x != self]
59 self._block0._blockUsageInputReference0 = filtered
61 self._block0 = value
62 if self._block0 is not None:
63 if self not in self._block0._blockUsageInputReference0:
64 self._block0._blockUsageInputReference0.append(self)
66 block0 = property(getblock0, setblock0)
68 def getBlockUsageOutputReference(self):
69 """Can cross BlockUsage objects.
70 """
71 return self._BlockUsageOutputReference
73 def setBlockUsageOutputReference(self, value):
74 if self._BlockUsageOutputReference is not None:
75 filtered = [x for x in self.BlockUsageOutputReference.BlockUsageInputReference if x != self]
76 self._BlockUsageOutputReference._BlockUsageInputReference = filtered
78 self._BlockUsageOutputReference = value
79 if self._BlockUsageOutputReference is not None:
80 if self not in self._BlockUsageOutputReference._BlockUsageInputReference:
81 self._BlockUsageOutputReference._BlockUsageInputReference.append(self)
83 BlockUsageOutputReference = property(getBlockUsageOutputReference, setBlockUsageOutputReference)
85 def getmetaBlockInput0(self):
87 return self._metaBlockInput0
89 def setmetaBlockInput0(self, value):
90 if self._metaBlockInput0 is not None:
91 filtered = [x for x in self.metaBlockInput0.blockUsageInputReference0 if x != self]
92 self._metaBlockInput0._blockUsageInputReference0 = filtered
94 self._metaBlockInput0 = value
95 if self._metaBlockInput0 is not None:
96 if self not in self._metaBlockInput0._blockUsageInputReference0:
97 self._metaBlockInput0._blockUsageInputReference0.append(self)
99 metaBlockInput0 = property(getmetaBlockInput0, setmetaBlockInput0)