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

Represents a block element in the input file. More...

Inheritance diagram for warpy.generator.block:

Detailed Description

Represents a block element in the input file.

Public Member Functions

def __init__ (self, name, attrs=None, children=None)
 
def append (self, b)
 Add a child block.
 
def generate (self, parent=None)
 Generate the element tree from this block.
 
def get_attr_text (self, indent='')
 
def __remove_special_chars__ (self, text)
 
def __str__ (self)
 pretty output
 
def __repr__ (self)
 pretty output
 

Public Attributes

 name
 
 attrs
 
 children
 

Constructor & Destructor Documentation

◆ __init__()

def warpy.generator.block.__init__ (   self,
  name,
  attrs = None,
  children = None 
)
Parameters
namenode name
attrslist of tuples, first is the name, second is the value

Member Function Documentation

◆ __remove_special_chars__()

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

◆ __repr__()

def warpy.generator.block.__repr__ (   self)

pretty output

◆ __str__()

def warpy.generator.block.__str__ (   self)

pretty output

◆ append()

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

Add a child block.

◆ generate()

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

Generate the element tree from this block.

◆ get_attr_text()

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

Member Data Documentation

◆ attrs

warpy.generator.block.attrs

◆ children

warpy.generator.block.children

◆ name

warpy.generator.block.name

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