Configurator
Public Member Functions | List of all members
data_structures.Project Class Reference

A Project configuration. More...

Inheritance diagram for data_structures.Project:
data_structures.Node

Public Member Functions

def __init__
 Initialize self from XML in project_element.
 
def sub_node_delete
 Delete the index'th sub node from *self.
 
def xml_write
 Write self out as XML to out_stream indented by indent
 
- Public Member Functions inherited from data_structures.Node
def __init__
 Node Constructor
 
def parent_index_find
 Recursively find parent of self starting from root_node.
 
def show
 Method print self indented by indent.
 
def sub_node_append
 Append sub_node to the children sub nodes of self.
 
def xml_write
 Method writes self to out_stream indented by indent.
 

Detailed Description

A Project configuration.

This class specifies the overall configuration of a project. It corresponds to the following XML:

   <Project Name="...">
     <Module_Use Name="..." Vendor="..." Module="...">
       ...
     </Module_Use>
   </Project> 

Constructor & Destructor Documentation

def data_structures.Project.__init__ (   self,
  project_element,
  modules_table,
  style 
)

Initialize self from XML in project_element.

Parameters
selfProject to initialize
project_elementNone ET.Element that contains the XML
modules_tabledict module look up table
styleStyle object that specifies how to format generate code.

This method will initialize self from the XML in project_element. modules_table is used to construct a table of the modules that are read in. If project_element is None, a self is initialized to an empty project.

Member Function Documentation

def data_structures.Project.sub_node_delete (   self,
  index 
)

Delete the index'th sub node from *self.

Parameters
selfProject to delete sub node from
indexint The index of the sub node to delete

This method will delete the index'th sub node of self.

def data_structures.Project.xml_write (   self,
  indent,
  out_stream 
)

Write self out as XML to out_stream indented by indent

Parameters
selfProject to write out as XML
indentint The amount to indent the XML by
out_streamFile to write XML out to

This method will write self out as XML to out_stream indented by indent. Currently, indent must be 0.

Member Data Documentation

tuple data_structures.Project.module_use
static
Initial value:
1 Module_Use(None,
2  None, module_use_element, modules_table, style)

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