|
@@ -865,7 +865,18 @@ Attribute Manipulation
|
|
|
>>> attribute_name("formalisms/PetriNets", "Place", "tokens", "Integer")
|
|
|
|
|
|
.. function:: read_defined_attrs(model_name, node)
|
|
|
- TODO
|
|
|
+
|
|
|
+ Retrieve a list of all defined attributes in class *node* in model *model_name*.
|
|
|
+ The return value consists of a pair of dictionaries.
|
|
|
+ The first dictionary containing all mandatory attributes, and the second dictionary containing all optional attributes.
|
|
|
+ Both dictionaries are constructed the same way, consisting of the name of the attribute as key, and the name of the type as value.
|
|
|
+
|
|
|
+ Examples:
|
|
|
+
|
|
|
+ * To fetch all defined attributes of the *Place* class in *formalisms/PetriNets*, which has a mandatory name and number of tokens, with an optional capacity.
|
|
|
+
|
|
|
+ >>> read_defined_attrs("formalisms/PetriNets", "Place")
|
|
|
+ ({"name": "String", "tokens": "Natural"}, {"capacity": "Natural"})
|
|
|
|
|
|
.. function:: define_attribute(model_name, node, attr_name, attr_type)
|
|
|
|