Helper for setting up an association to a set of contained objects,
represented as vectors.
parent: The parent D3PDobject or block.
assoctool: The class for the (single) association tool.
prefix: Prefix to add to the contained variables, if any.
level: Level of detail for the block.
blockname: Name for the block.
nrowName: Name of the variable for the count of objects.
Omitted if empty.
Extra arguments are passed to the association tool.
Definition at line 18 of file ContainedVectorMultiAssociation.py.
25 """Helper for setting up an association to a set of contained objects,
26 represented as vectors.
28 parent: The parent D3PDobject or block.
29 assoctool: The class for the (single) association tool.
30 prefix: Prefix to add to the contained variables, if any.
31 level: Level of detail for the block.
32 blockname: Name for the block.
33 nrowName: Name of the variable for the count of objects.
36 Extra arguments are passed to the association tool.
39 blockname = assoctool.__name__
41 def maker (name, prefix, object_name, **kw2):
42 assoc = assoctool (name +
'Assoc', **kw2)
49 obj = D3PDObject (maker, prefix)
50 parent.defineBlock (level, blockname, obj, **kw)