![]() |
ATLAS Offline Software
|
Public Member Functions | |
def | __init__ (self, name='') |
def | tohan (self, encoding=None) |
def | toprettyhan (self, indent="\t", newl="\n", encoding=None) |
def | writehan (self, writer, indent="", addindent="", newl="") |
def | appendChild (self, child) |
def | setAttribute (self, key, attribute) |
def | removeAttribute (self, key) |
def | getAttribute (self, key) |
def | getSubNode (self, name, nodetype) |
def | __str__ (self) |
Public Attributes | |
subnodes | |
attributes | |
acceptChild | |
nodeType | |
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 49 of file hanwriter.py.
def python.hanwriter.Node.__init__ | ( | self, | |
name = '' |
|||
) |
Create a han node
Reimplemented in python.hanwriter.Document, python.hanwriter.HanDir, and python.hanwriter.HanThreshold.
Definition at line 62 of file hanwriter.py.
def python.hanwriter.Node.__str__ | ( | self | ) |
Definition at line 192 of file hanwriter.py.
def python.hanwriter.Node.appendChild | ( | self, | |
child | |||
) |
def python.hanwriter.Node.getAttribute | ( | self, | |
key | |||
) |
Gets the attribute identified by the key, None if not found
Definition at line 170 of file hanwriter.py.
def python.hanwriter.Node.getSubNode | ( | self, | |
name, | |||
nodetype | |||
) |
Returns the sub-node identified by name and nodetype
Definition at line 182 of file hanwriter.py.
def python.hanwriter.Node.removeAttribute | ( | self, | |
key | |||
) |
Removes attribute identified by key
Definition at line 158 of file hanwriter.py.
def python.hanwriter.Node.setAttribute | ( | self, | |
key, | |||
attribute | |||
) |
The attribute identified by key is added to this node
Definition at line 147 of file hanwriter.py.
def python.hanwriter.Node.tohan | ( | self, | |
encoding = None |
|||
) |
convert the object in a valid han script block
Definition at line 76 of file hanwriter.py.
def python.hanwriter.Node.toprettyhan | ( | self, | |
indent = "\t" , |
|||
newl = "\n" , |
|||
encoding = None |
|||
) |
def 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 107 of file hanwriter.py.
python.hanwriter.Node.acceptChild |
Definition at line 68 of file hanwriter.py.
python.hanwriter.Node.attributes |
Definition at line 67 of file hanwriter.py.
python.hanwriter.Node.name |
Definition at line 71 of file hanwriter.py.
python.hanwriter.Node.nodeType |
Definition at line 70 of file hanwriter.py.
python.hanwriter.Node.subnodes |
Definition at line 66 of file hanwriter.py.