WARPXM v1.10.0
Loading...
Searching...
No Matches
warpy.xdmf.generator.block Class Reference

Represents some Xdmf block. More...

Inheritance diagram for warpy.xdmf.generator.block:
warpy.xdmf.generator.attribute warpy.xdmf.generator.grid warpy.xdmf.generator.item warpy.xdmf.generator.time warpy.xdmf.generator.topology warpy.xdmf.generator.xdmf

Detailed Description

Represents some Xdmf block.

Public Member Functions

def __init__ (self, name, attrs=None, data=None, children=None)
 
def append (self, b)
 Add a child block.
 
def extend (self, bs)
 Add a list of blocks.
 
def get_data_text (self, indent='')
 
def generate (self, parent=None)
 
def ref (self, root)
 Gets a reference XPath from root to self.
 
def __remove_special_chars__ (self, text)
 
def __str__ (self)
 pretty output
 
def __repr__ (self)
 pretty output
 

Public Attributes

 name
 
 attrs
 
 data
 
 children
 

Protected Member Functions

def _dfs (self, pred, idx=0)
 depth first search from self, returns path to first child matching pred.
 

Constructor & Destructor Documentation

◆ __init__()

def warpy.xdmf.generator.block.__init__ (   self,
  name,
  attrs = None,
  data = None,
  children = None 
)

Member Function Documentation

◆ __remove_special_chars__()

def warpy.xdmf.generator.block.__remove_special_chars__ (   self,
  text 
)

◆ __repr__()

def warpy.xdmf.generator.block.__repr__ (   self)

pretty output

Reimplemented in warpy.xdmf.generator.xdmf.

◆ __str__()

def warpy.xdmf.generator.block.__str__ (   self)

pretty output

◆ _dfs()

def warpy.xdmf.generator.block._dfs (   self,
  pred,
  idx = 0 
)
protected

depth first search from self, returns path to first child matching pred.

Parameters
predunary predicate
idx
Returns
None if no predicate was found, otherwise list of first path satisfying predicate found

◆ append()

def warpy.xdmf.generator.block.append (   self,
  b 
)

Add a child block.

◆ extend()

def warpy.xdmf.generator.block.extend (   self,
  bs 
)

Add a list of blocks.

◆ generate()

def warpy.xdmf.generator.block.generate (   self,
  parent = None 
)

◆ get_data_text()

def warpy.xdmf.generator.block.get_data_text (   self,
  indent = '' 
)

◆ ref()

def warpy.xdmf.generator.block.ref (   self,
  root 
)

Gets a reference XPath from root to self.

Member Data Documentation

◆ attrs

warpy.xdmf.generator.block.attrs

◆ children

warpy.xdmf.generator.block.children

◆ data

warpy.xdmf.generator.block.data

◆ name

warpy.xdmf.generator.block.name

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