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

Base class for all warpy objects. More...

Inheritance diagram for warpy.generator.warpy_obj:

Detailed Description

Base class for all warpy objects.

Public Member Functions

def __init__ (self, name, req_attrs, opt_attrs=None)
 
def name (self, stage=None)
 Returns the name of the current block, augmented with stage information if needed.
 
def attrs (self, stage=None)
 Child classes may override this method if attributes are to be generated after construction time.
 
def get_attr_value (self, str attr_name)
 Given the attribute name as a string, returns the value.
 
bool attr_in_attrs (self, str attr_name)
 Given the attribute name as a string, returns bool indicating whether attribute is in the block.
 
def extra_blocks (self)
 
def generate (self, start=None, stop=None, stride=1, explode_name=True, explode_args=True)
 generates a list of blocks representing this pywarp object
 

Public Attributes

 root
 

Constructor & Destructor Documentation

◆ __init__()

def warpy.generator.warpy_obj.__init__ (   self,
  name,
  req_attrs,
  opt_attrs = None 
)
Parameters
name
req_attrs
opt_attrs

Member Function Documentation

◆ attr_in_attrs()

bool warpy.generator.warpy_obj.attr_in_attrs (   self,
str  attr_name 
)

Given the attribute name as a string, returns bool indicating whether attribute is in the block.

Does not search children blocks.

Parameters
attr_nameString with attribute name.
Returns
Return True if in block, False if not.

◆ attrs()

def warpy.generator.warpy_obj.attrs (   self,
  stage = None 
)

Child classes may override this method if attributes are to be generated after construction time.

It is expected that this function be const-like.

Parameters
stage

◆ extra_blocks()

def warpy.generator.warpy_obj.extra_blocks (   self)

◆ generate()

def warpy.generator.warpy_obj.generate (   self,
  start = None,
  stop = None,
  stride = 1,
  explode_name = True,
  explode_args = True 
)

generates a list of blocks representing this pywarp object

Parameters
start
stop
stride
explode_name
explode_args
Returns
list of blocks

◆ get_attr_value()

def warpy.generator.warpy_obj.get_attr_value (   self,
str  attr_name 
)

Given the attribute name as a string, returns the value.

Parameters
attr_nameString with attribute name.
Returns
The attribute value or None.

◆ name()

def warpy.generator.warpy_obj.name (   self,
  stage = None 
)

Returns the name of the current block, augmented with stage information if needed.

Member Data Documentation

◆ root

warpy.generator.warpy_obj.root

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