Base class for all warpy objects.  
 More...
Base class for all warpy objects. 
 | 
| 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  
  | 
|   | 
◆ __init__()
      
        
          | def warpy.generator.warpy_obj.__init__  | 
          ( | 
            | 
          self,  | 
        
        
           | 
           | 
            | 
          name,  | 
        
        
           | 
           | 
            | 
          req_attrs,  | 
        
        
           | 
           | 
            | 
          opt_attrs = None  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ 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_name | String 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
 - 
  
  
 
 
 
◆ 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_name | String 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. 
 
 
◆ root
      
        
          | warpy.generator.warpy_obj.root | 
        
      
 
 
The documentation for this class was generated from the following file: