Classes | Public Member Functions | Public Attributes | Static Private Attributes
snippets.generators.cppgen.structure.Structure Class Reference

List of all members.

Classes

class  VarGroup

Public Member Functions

def __init__
def __str__
def from_xml
def gen_code
def gen_impl

Public Attributes

 sassert_size
 senums
 sgroups
 sinherit
 smethods
 sname
 sserialization
 stypedefs
 svariables

Static Private Attributes

string _XMLTAG = 'struct'

Detailed Description

Represents the C++ data structure in the object form.

Class attributes:
_XMLTAG -- constant string with the xml tag description

Definition at line 41 of file cppgen/structure.py.


Constructor & Destructor Documentation

def snippets.generators.cppgen.structure.Structure.__init__ (   self,
  xmlnode = None 
)
Populates the structure from a XML node info.
When the XML node is not defined, does nothing.

xmlnode -- the XML node with the member definition 

Instance attributes:
sname    -- name of the structure
sinherit -- the class that is inherited
svariables -- the direct member variables list
sgroups -- the grouped member variables list
smethods -- the member methods list
senums -- the enumerations list
sassert_size -- add size assertion in bytes (useful for bitfields)
sserialization -- the type of serialization (defaults to object serializable)
sid -- the numeric id constant (useful for command structs)

Definition at line 95 of file cppgen/structure.py.


Member Function Documentation

Overriden string specifier returns the C++ code snippet 
without indentation.

Definition at line 203 of file cppgen/structure.py.

Extracts the structure attributes from the XML node.
Memeber variables and functions are extracted from the 
child nodes as well.

xmlnode -- the XML node with the member definition

Definition at line 125 of file cppgen/structure.py.

def snippets.generators.cppgen.structure.Structure.gen_code (   self,
  bindent = '',
  indent = '  ' 
)
Generates the full structure definition C++ code and
returns it as a string.

bindent -- the current indent in the document
indent -- the usual minimum indentation

Definition at line 151 of file cppgen/structure.py.

def snippets.generators.cppgen.structure.Structure.gen_impl (   self,
  bindent = '',
  indent = '  ' 
)
Generates the method implementations in C++ code and
returns it as a string.

bindent -- the current indent in the document
indent -- the usual minimum indentation

Definition at line 189 of file cppgen/structure.py.


Member Data Documentation

Definition at line 48 of file cppgen/structure.py.

Definition at line 111 of file cppgen/structure.py.

Definition at line 111 of file cppgen/structure.py.

Definition at line 111 of file cppgen/structure.py.

Definition at line 111 of file cppgen/structure.py.

Definition at line 111 of file cppgen/structure.py.

Definition at line 111 of file cppgen/structure.py.

Definition at line 111 of file cppgen/structure.py.

Definition at line 111 of file cppgen/structure.py.

Definition at line 111 of file cppgen/structure.py.


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


snippets
Author(s): Gyula Nagy
autogenerated on Fri Aug 28 2015 11:22:33