OMNeT++ NEDXML
6.0.3
|
#include <msgcompiler.h>
Generates C++ code from a MSG file object tree.
Assumes object tree has already passed all validation stages (DTD, syntax, semantic).
Public Types | |
typedef std::set< std::string > | StringSet |
typedef std::vector< std::string > | StringVector |
typedef MsgTypeTable::Property | Property |
typedef MsgTypeTable::Properties | Properties |
typedef MsgTypeTable::FieldInfo | FieldInfo |
typedef MsgTypeTable::ClassInfo | ClassInfo |
typedef MsgTypeTable::EnumItem | EnumItem |
typedef MsgTypeTable::EnumInfo | EnumInfo |
Public Member Functions | |
MsgCompiler (const MsgCompilerOptions &options, ErrorStore *errors) | |
~MsgCompiler () | |
void | generate (MsgFileElement *fileElement, const char *hFile, const char *ccFile, StringSet &outImportedFiles) |
void | printPropertiesLatexDocu (std::ostream &out) |
Static Public Member Functions | |
static const char * | getBuiltinDefinitions () |
Protected Member Functions | |
void | importBuiltinDefinitions () |
void | processBuiltinImport (const char *txt, const char *fname) |
void | processImport (ImportElement *importElem, const std::string ¤tDir) |
std::string | resolveImport (const std::string &importName, const std::string ¤tDir) |
void | collectTypes (MsgFileElement *fileElement, bool isImport) |
void | generateCode (MsgFileElement *fileElement) |
std::string | prefixWithNamespace (const std::string &name, const std::string &namespaceName) |
void | validateNamespaceName (const std::string &namespaceName, ASTNode *element) |
Protected Attributes | |
MsgCompilerOptions | opts |
MsgTypeTable | typeTable |
MsgAnalyzer | analyzer |
MsgCodeGenerator | codegen |
bool | used = false |
ErrorStore * | errors |
StringSet | importsSeen |
StringSet | importedFiles |
typedef std::set<std::string> StringSet |
typedef std::vector<std::string> StringVector |
typedef MsgTypeTable::Property Property |
typedef MsgTypeTable::Properties Properties |
typedef MsgTypeTable::FieldInfo FieldInfo |
typedef MsgTypeTable::ClassInfo ClassInfo |
typedef MsgTypeTable::EnumItem EnumItem |
typedef MsgTypeTable::EnumInfo EnumInfo |
MsgCompiler | ( | const MsgCompilerOptions & | options, |
ErrorStore * | errors | ||
) |
Constructor.
|
inline |
Destructor.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void generate | ( | MsgFileElement * | fileElement, |
const char * | hFile, | ||
const char * | ccFile, | ||
StringSet & | outImportedFiles | ||
) |
Generates C++ code from the specified message file. Assumes that the object tree has already passed DTD and syntax validation.
void printPropertiesLatexDocu | ( | std::ostream & | out | ) |
Print properties documentation in LaTeX format, for use in the Manual.
|
inlinestatic |
Returns the built-in MSG definitions.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |