Serializes an AST in XML format.
Public Member Functions | |
| XMLGenerator () | |
| virtual | ~XMLGenerator () | 
| virtual void | setSourceLocationAttributes (bool srcloc) | 
| virtual void | setIndentSize (int indentsize) | 
| virtual void | generate (std::ostream &out, ASTNode *tree) | 
| virtual std::string | generate (ASTNode *tree) | 
Protected Member Functions | |
| virtual void | printAttrValue (std::ostream &out, const char *s) | 
| virtual void | doGenerate (std::ostream &out, ASTNode *node, int level) | 
Protected Attributes | |
| bool | printSrcLoc = true | 
| int | indentSize = 2 | 
      
  | 
  inline | 
Constructor
      
  | 
  inlinevirtual | 
Destructor
      
  | 
  protectedvirtual | 
      
  | 
  protectedvirtual | 
      
  | 
  virtual | 
Enable or disable generation of src-loc attributes in the output XML. src-loc attributes contain filename-line-column information that refers to the original document. For example, if the ASTNode tree was produced by parsing a NED file, src-loc attributes refer to locations in the NED file.
      
  | 
  virtual | 
Set indent size in the output XML.
      
  | 
  virtual | 
Serialize the object tree as XML to the given output stream. The XML declaration will be:
<?xml version="1.0"?>
I.e. unspecified encoding, and no document type will be included.
      
  | 
  virtual | 
Serialize the object tree into XML, and return the result as string.
      
  | 
  protected | 
      
  | 
  protected |