Browse Source

Finished documentation for all wrapper functions

Yentl Van Tendeloo 7 years ago
parent
commit
a7dc74d496
1 changed files with 12 additions and 1 deletions
  1. 12 1
      doc/wrappers.rst

+ 12 - 1
doc/wrappers.rst

@@ -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)