![]() |
ATLAS Offline Software
|
Public Member Functions | |
| __init__ (self, name='') | |
| tohan (self, encoding=None) | |
| toprettyhan (self, indent="\t", newl="\n", encoding=None) | |
| writehan (self, writer, indent="", addindent="", newl="") | |
| appendChild (self, child) | |
| setAttribute (self, key, attribute) | |
| removeAttribute (self, key) | |
| getAttribute (self, key) | |
| getSubNode (self, name, nodetype) | |
| __str__ (self) | |
Public Attributes | |
| list | subnodes = None |
| dict | attributes = None |
| list | acceptChild |
| nodeType = Node.UNKNOWN | |
| name = name | |
This is the base class for each element that can be written in a valid han configuration file.
Attributes:
- subnodes : a list of Node instances
- attributes : a list of attributes associated with the node
- acceptChild : a list of Node types that can be accepted as sub nodes
- nodeType : the type of the node
- name : the name of the node
Definition at line 48 of file hanwriter.py.
| python.hanwriter.Node.__init__ | ( | self, | |
| name = '' ) |
Create a han node
Definition at line 61 of file hanwriter.py.
| python.hanwriter.Node.__str__ | ( | self | ) |
Definition at line 190 of file hanwriter.py.
| python.hanwriter.Node.appendChild | ( | self, | |
| child ) |
Add a sub node to this node
Definition at line 126 of file hanwriter.py.
| python.hanwriter.Node.getAttribute | ( | self, | |
| key ) |
Gets the attribute identified by the key, None if not found
Definition at line 168 of file hanwriter.py.
| python.hanwriter.Node.getSubNode | ( | self, | |
| name, | |||
| nodetype ) |
Returns the sub-node identified by name and nodetype
Definition at line 180 of file hanwriter.py.
| python.hanwriter.Node.removeAttribute | ( | self, | |
| key ) |
Removes attribute identified by key
Definition at line 156 of file hanwriter.py.
| python.hanwriter.Node.setAttribute | ( | self, | |
| key, | |||
| attribute ) |
The attribute identified by key is added to this node
Definition at line 145 of file hanwriter.py.
| python.hanwriter.Node.tohan | ( | self, | |
| encoding = None ) |
convert the object in a valid han script block
Definition at line 75 of file hanwriter.py.
| python.hanwriter.Node.toprettyhan | ( | self, | |
| indent = "\t", | |||
| newl = "\n", | |||
| encoding = None ) |
convert the object in a formatted han string
Definition at line 86 of file hanwriter.py.
| python.hanwriter.Node.writehan | ( | self, | |
| writer, | |||
| indent = "", | |||
| addindent = "", | |||
| newl = "" ) |
Converts the object in a han string and writes it in the writer object
Definition at line 105 of file hanwriter.py.
| list python.hanwriter.Node.acceptChild |
Definition at line 67 of file hanwriter.py.
| python.hanwriter.Node.attributes = None |
Definition at line 66 of file hanwriter.py.
| python.hanwriter.Node.name = name |
Definition at line 70 of file hanwriter.py.
| python.hanwriter.Node.nodeType = Node.UNKNOWN |
Definition at line 69 of file hanwriter.py.
| python.hanwriter.Node.subnodes = None |
Definition at line 65 of file hanwriter.py.