NEDCompiler Class Reference
[Controlling the compilation process]

#include <nedcompiler.h>

List of all members.


Detailed Description

Manages the "middle" part of the compilation process for NED.

Implemented in validate(), the process involves:

  1. DTD and syntactic validation of the input (see NEDDTDValidator and NEDBasicValidator),
  2. loading of imports via the import resolver (see NEDImportResolver), adding them into the file cached (see NEDFileCache) and recursively validating them
  3. semantic validation of the input, e.g. making sure all referenced module types exist (see NEDSemanticValidator)

NEDCompiler does NOT do parsing (only for the imports, via the import resolver, but the main file it already receives a NED object tree form). Code (i.e. C++) generation is also not covered.


Public Member Functions

 NEDCompiler (NEDFileCache *fcache, NEDSymbolTable *symtab, NEDImportResolver *importres)
virtual ~NEDCompiler ()
void validate (NEDElement *tree)

Protected Member Functions

void addImport (const char *name)
bool isImported (const char *name)
void doValidate (NEDElement *tree)

Protected Attributes

NEDMap imports
NEDFileCachefilecache
NEDSymbolTablesymboltable
NEDImportResolverimportresolver


Constructor & Destructor Documentation

NEDCompiler::NEDCompiler NEDFileCache fcache,
NEDSymbolTable symtab,
NEDImportResolver importres
 

Constructor.

virtual NEDCompiler::~NEDCompiler  )  [virtual]
 

Destructor.


Member Function Documentation

void NEDCompiler::addImport const char *  name  )  [protected]
 

void NEDCompiler::doValidate NEDElement tree  )  [protected]
 

bool NEDCompiler::isImported const char *  name  )  [protected]
 

void NEDCompiler::validate NEDElement tree  ) 
 

Performs the import resolution and validation process described in the class documentation.


Member Data Documentation

NEDFileCache* NEDCompiler::filecache [protected]
 

NEDImportResolver* NEDCompiler::importresolver [protected]
 

NEDMap NEDCompiler::imports [protected]
 

NEDSymbolTable* NEDCompiler::symboltable [protected]
 


The documentation for this class was generated from the following file:
Generated on Sat Oct 21 17:47:59 2006 for OMNeT++/OMNEST NEDXML by  doxygen 1.4.6