PyForTool
Python-fortran-tool
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
pyfortool.scope.ElementView Class Reference
Inheritance diagram for pyfortool.scope.ElementView:
Inheritance graph
[legend]

Public Member Functions

 __init__ (self, xml, excludeContains=False)
 
 tag (self)
 
 tail (self)
 
 text (self)
 
 findtext (self, *args, **kwargs)
 
 iterfind (self, *args, **kwargs)
 
 itertext (self, *args, **kwargs)
 
 __getitem__ (self, *args, **kwargs)
 
 __len__ (self, *args, **kwargs)
 
 __iter__ (self)
 
 find (self, *args, **kwargs)
 
 findall (self, *args, **kwargs)
 
 iter (self, *args, **kwargs)
 
 items (self, *args, **kwargs)
 
 clear (self)
 
 append (self, *args, **kwargs)
 
 extend (self, *args, **kwargs)
 
 __setitem__ (self, index, item)
 
 __delitem__ (self, index)
 
 insert (self, index, item)
 
 remove (self, node)
 

Public Attributes

 text
 
 tail
 

Protected Member Functions

 _virtual (self)
 
 _getIndex (self, index)
 

Protected Attributes

 _excludeContains
 
 _xml
 
 _virtual
 

Detailed Description

View of an ElementTree exposing a subset of subelements.

Provides filtering capabilities for XML trees, particularly for
excluding CONTAINS sections from scope traversal.

Definition at line 45 of file scope.py.

Constructor & Destructor Documentation

◆ __init__()

pyfortool.scope.ElementView.__init__ (   self,
  xml,
  excludeContains = False 
)
Initialize ElementView.

Parameters
----------
xml : xml element
    Root XML element for this view.
excludeContains : bool, optional
    If True, ignore elements after CONTAINS statement.

Reimplemented in pyfortool.pyfortool.PYFT, and pyfortool.scope.PYFTscope.

Definition at line 53 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ __delitem__()

pyfortool.scope.ElementView.__delitem__ (   self,
  index 
)

Definition at line 213 of file scope.py.

◆ __getitem__()

pyfortool.scope.ElementView.__getitem__ (   self,
args,
**  kwargs 
)

Definition at line 127 of file scope.py.

◆ __iter__()

pyfortool.scope.ElementView.__iter__ (   self)

Definition at line 133 of file scope.py.

◆ __len__()

pyfortool.scope.ElementView.__len__ (   self,
args,
**  kwargs 
)

Definition at line 130 of file scope.py.

◆ __setitem__()

pyfortool.scope.ElementView.__setitem__ (   self,
  index,
  item 
)

Definition at line 209 of file scope.py.

◆ _getIndex()

pyfortool.scope.ElementView._getIndex (   self,
  index 
)
protected
:param index: index in the virtual node
:return: index in the _xml node

Definition at line 186 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _virtual()

pyfortool.scope.ElementView._virtual (   self)
protected
:param xml: xml corresponding to a scope
:return: a node (possibly the xml node) containing only the relevant subelements

Definition at line 69 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ append()

pyfortool.scope.ElementView.append (   self,
args,
**  kwargs 
)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.append

Definition at line 172 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

pyfortool.scope.ElementView.clear (   self)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.clear

Definition at line 163 of file scope.py.

Here is the call graph for this function:

◆ extend()

pyfortool.scope.ElementView.extend (   self,
args,
**  kwargs 
)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.extend

Definition at line 179 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find()

pyfortool.scope.ElementView.find (   self,
args,
**  kwargs 
)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.find

Definition at line 136 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findall()

pyfortool.scope.ElementView.findall (   self,
args,
**  kwargs 
)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.findall

Definition at line 142 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findtext()

pyfortool.scope.ElementView.findtext (   self,
args,
**  kwargs 
)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.findtext

Definition at line 109 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insert()

pyfortool.scope.ElementView.insert (   self,
  index,
  item 
)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.insert

Definition at line 216 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ items()

pyfortool.scope.ElementView.items (   self,
args,
**  kwargs 
)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.items

Definition at line 154 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iter()

pyfortool.scope.ElementView.iter (   self,
args,
**  kwargs 
)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.iter

Definition at line 148 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iterfind()

pyfortool.scope.ElementView.iterfind (   self,
args,
**  kwargs 
)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.iterfind

Definition at line 115 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ itertext()

pyfortool.scope.ElementView.itertext (   self,
args,
**  kwargs 
)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.itertext

Definition at line 121 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove()

pyfortool.scope.ElementView.remove (   self,
  node 
)
Remove node from the xml

Definition at line 223 of file scope.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tag()

pyfortool.scope.ElementView.tag (   self)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.tag

Definition at line 87 of file scope.py.

◆ tail()

pyfortool.scope.ElementView.tail (   self)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.tail

Definition at line 94 of file scope.py.

Here is the caller graph for this function:

◆ text()

pyfortool.scope.ElementView.text (   self)
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.text

Definition at line 101 of file scope.py.

Here is the caller graph for this function:

Member Data Documentation

◆ _excludeContains

pyfortool.scope.ElementView._excludeContains
protected

Definition at line 65 of file scope.py.

◆ _virtual

pyfortool.scope.ElementView._virtual
protected

Definition at line 134 of file scope.py.

◆ _xml

pyfortool.scope.ElementView._xml
protected

Definition at line 66 of file scope.py.

◆ tail

pyfortool.scope.ElementView.tail

Definition at line 170 of file scope.py.

◆ text

pyfortool.scope.ElementView.text

Definition at line 169 of file scope.py.


The documentation for this class was generated from the following file: