Definition at line 4 of file Treereader.py.
◆ __init__()
def python.Treereader.Treereader.__init__ |
( |
* |
self | ) |
|
Definition at line 11 of file Treereader.py.
12 raise Exception (
"Use treereader() rather than creating Treereader directly.")
◆ __getattr__()
def python.Treereader.Treereader.__getattr__ |
( |
|
self, |
|
|
|
attr |
|
) |
| |
Definition at line 23 of file Treereader.py.
23 def __getattr__ (self, attr):
27 lname = self._subpattern % attr
30 ret = getattr (self._tree, lname)
31 if (isinstance (ret, Treereader.leaftypes)
or
32 str(
type(ret)) ==
"<type 'buffer'>"):
33 def getter (self, tree = self._tree, lname = lname):
34 return getattr (tree, lname)
35 setattr (self.__class__, attr, property (getter))
37 setattr (self, attr, ret)
◆ GetEntry()
def python.Treereader.Treereader.GetEntry |
( |
|
self, |
|
|
|
i |
|
) |
| |
Definition at line 60 of file Treereader.py.
60 def GetEntry (self, i):
61 return self._tree.GetEntry (i)
◆ Notify()
def python.Treereader.Treereader.Notify |
( |
|
self | ) |
|
Definition at line 40 of file Treereader.py.
41 newdict = {
'_tree' : self._tree,
42 '_subpattern' : self._subpattern,
43 '_subreaders' : self._subreaders}
44 for (k, v)
in self.__dict__.
items():
45 if isinstance (v, Treereader):
47 self.__dict__ = newdict
49 for s
in self._subreaders:
◆ real_init()
def python.Treereader.Treereader.real_init |
( |
|
self, |
|
|
|
tree, |
|
|
|
parent = None , |
|
|
|
subpattern = None |
|
) |
| |
Definition at line 14 of file Treereader.py.
14 def real_init (self, tree, parent = None, subpattern = None):
17 self._subpattern = subpattern
19 if self._subpattern
is None:
◆ subreader()
def python.Treereader.Treereader.subreader |
( |
|
self, |
|
|
|
subpattern |
|
) |
| |
Definition at line 54 of file Treereader.py.
54 def subreader (self, subpattern):
55 sub = treereader (self._tree, self, subpattern)
56 self._subreaders.append (sub)
◆ __dict__
python.Treereader.Treereader.__dict__ |
|
private |
◆ _subpattern
python.Treereader.Treereader._subpattern |
|
private |
◆ _subreaders
python.Treereader.Treereader._subreaders |
|
private |
◆ _tree
python.Treereader.Treereader._tree |
|
private |
◆ leaftypes
tuple python.Treereader.Treereader.leaftypes = (int, float, complex) |
|
static |
◆ parent
python.Treereader.Treereader.parent |
The documentation for this class was generated from the following file: