OMNeT++ NEDXML  6.0.3
ASTBuilder Class Reference

#include <astbuilder.h>

Description

SAX handler (to be used with SAXParser) that builds an AST.

Elements of the tree are subclassed from ASTNode; ASTNodeFactory is used to actually create the objects.

Usage:

   NEDSAXHandler nedsaxhandler(filename);
   SAXParser parser;
   parser.setHandler(&nedsaxhandler);
   parser.parse(filename);
   ASTNode *result = nedsaxhandler.getTree();
Inheritance diagram for ASTBuilder:

Public Member Functions

 ASTBuilder (const char *filename, ErrorStore *e)
 
virtual ~ASTBuilder ()
 
virtual ASTNodegetTree ()
 
SAX event handlers
virtual void startElement (const char *name, const char **atts) override
 
virtual void endElement (const char *name) override
 
virtual void characterData (const char *s, int len) override
 
virtual void processingInstruction (const char *target, const char *data) override
 

Constructor & Destructor Documentation

◆ ASTBuilder()

ASTBuilder ( const char *  filename,
ErrorStore e 
)

Constructor. Filename is necessary to create correct src-loc info.

◆ ~ASTBuilder()

virtual ~ASTBuilder ( )
virtual

Destructor

Member Function Documentation

◆ getTree()

virtual ASTNode* getTree ( )
virtual

Returns the object tree that was built up during XML parsing.

◆ startElement()

virtual void startElement ( const char *  name,
const char **  atts 
)
overridevirtual

◆ endElement()

virtual void endElement ( const char *  name)
overridevirtual

◆ characterData()

virtual void characterData ( const char *  s,
int  len 
)
overridevirtual

◆ processingInstruction()

virtual void processingInstruction ( const char *  target,
const char *  data 
)
overridevirtual

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