Class defining a list-branch object.
More...
Class defining a list-branch object.
CMLListBranch are nodes which can hold several CMLNodes as children.
◆ __init__()
def carputils.cml.cmltree.CMLListBranch.__init__ |
( |
|
self, |
|
|
|
parent, |
|
|
|
key |
|
) |
| |
Method to initialize a CMLListBranch object.
- Parameters
-
parent | Parent node |
key | Key string or None |
◆ add_child()
def carputils.cml.cmltree.CMLListBranch.add_child |
( |
|
self, |
|
|
|
node |
|
) |
| |
Add child node.
- Parameters
-
- Exceptions
-
AttributeError | if node is not an instance of CMLNode |
AttributeError | |
◆ from_node()
def carputils.cml.cmltree.CMLListBranch.from_node |
( |
|
node | ) |
|
|
static |
◆ objectify()
def carputils.cml.cmltree.CMLListBranch.objectify |
( |
|
self | ) |
|
Objectify node and all child nodes.
- Returns
- If the key of the node is None, a list of all objectified child nodes is returned, else a list containing the key and the list of all objectified child nodes is returned
◆ serialize()
def carputils.cml.cmltree.CMLListBranch.serialize |
( |
|
self | ) |
|
Serialize node and all child nodes.
- Returns
- If the key of the node is None, a list of all serialized child nodes is returned, else a list containing the key and the list of all serialized child nodes is returned
◆ children
carputils.cml.cmltree.CMLListBranch.children |
list to hold the children
The documentation for this class was generated from the following file: