NedGenerator Class Reference¶
|
NEDXML API
|
NedGenerator Class Reference
Public Member Functions | |
| NedGenerator () | |
| ~NedGenerator () | |
| void | setIndentSize (int indentsize) |
| void | generate (std::ostream &out, ASTNode *node, const char *indent) |
| std::string | generate (ASTNode *node, const char *indent) |
Protected Member Functions | |
Change indentation level | |
| void | generateNedItem (ASTNode *node, const char *indent, bool islast, const char *arg=nullptr) |
| void | generateChildren (ASTNode *node, const char *indent, const char *arg=nullptr) |
| void | generateChildrenWithType (ASTNode *node, int tagcode, const char *indent, const char *arg=nullptr) |
| void | generateChildrenWithTypes (ASTNode *node, int tagcodes[], const char *indent, const char *arg=nullptr) |
Utilities | |
Getters for comments | |
Generate NED code from the given element | |
Description
Generates NED code from a NED AST.
Assumes that the object tree has already passed all validation stages (DTD, syntax, semantic).
Constructor & Destructor Documentation
◆ NedGenerator()
|
inline |
Constructor.
◆ ~NedGenerator()
|
inline |
Destructor.
Member Function Documentation
◆ setIndentSize()
| void setIndentSize | ( | int | indentsize | ) |
Sets the indent size in the generated NED code. Default is 4 spaces.
◆ generate() [1/2]
| void generate | ( | std::ostream & | out, |
| ASTNode * | node, | ||
| const char * | indent ) |
Generates NED code. Takes an output stream where the generated NED code will be written, the object tree and the base indentation.
◆ generate() [2/2]
| std::string generate | ( | ASTNode * | node, |
| const char * | indent ) |
Generates NED code and returns it as a string.
◆ generateNedItem()
|
protected |
Dispatch to various doXXX() methods according to node type
◆ generateChildren()
|
protected |
Invoke generateNedItem() on all children
◆ generateChildrenWithType()
|
protected |
Invoke generateNedItem() on all children of the given tagcode
◆ generateChildrenWithTypes()
|
protected |
Invoke generateNedItem() on children of the given tagcodes (NED_NULL-terminated array)
Generated on for NEDXML API by