OMNeT++ NEDXML
5.4.1
|
#include <msgcompilerold.h>
Generates C++ code from a MSG file. Covers the MSG language of OMNeT++ 4.x, and 5.x up to 5.2.
Assumes object tree has already passed all validation stages (DTD, syntax, semantic).
Classes | |
class | ClassInfo |
class | EnumInfo |
struct | TypeDesc |
Public Types | |
typedef std::vector< std::string > | StringVector |
Public Member Functions | |
MsgCompilerOld (ErrorStore *errors, const MsgCompilerOptionsOld &options) | |
~MsgCompilerOld () | |
void | generate (MsgFileElement *fileElement, const char *hFile, const char *ccFile) |
Protected Types | |
typedef std::map< std::string, TypeDesc > | TypeDescMap |
typedef std::set< std::string > | WordSet |
typedef std::map< std::string, std::string > | Properties |
Protected Member Functions | |
void | initDescriptors () |
std::string | prefixWithNamespace (const std::string &s) |
StringVector | lookupExistingClassName (const std::string &s) |
StringVector | lookupExistingEnumName (const std::string &s) |
bool | isClassDeclared (const std::string &classqname) |
void | addClassType (const std::string &classqname, ClassType type, ASTNode *context) |
ClassType | getClassType (const std::string &classqname) |
ClassInfo | extractClassInfo (ASTNode *node) |
void | extractClassDecl (ASTNode *node) |
Properties | extractPropertiesOf (ASTNode *node) |
void | prepareFieldForCodeGeneration (ClassInfo &info, ClassInfo::FieldInfo *it) |
void | prepareForCodeGeneration (ClassInfo &classInfo) |
EnumInfo | extractEnumInfo (EnumElement *node) |
void | generateClass (const ClassInfo &classInfo) |
void | generateStruct (const ClassInfo &classInfo) |
void | generateDescriptorClass (const ClassInfo &a) |
void | generateEnum (const EnumInfo &enumInfo) |
void | generateNamespaceBegin (ASTNode *element) |
void | generateNamespaceEnd () |
std::string | generatePreComment (ASTNode *nedElement) |
void | generateTemplates () |
bool | getPropertyAsBool (const Properties &p, const char *name, bool defval) |
std::string | getProperty (const Properties &p, const char *name, const std::string &defval=std::string()) |
void | generate (MsgFileElement *fileElement) |
std::string | makeFuncall (const std::string &var, const std::string &funcTemplate, bool withIndex=false, const std::string &value="") |
Protected Attributes | |
TypeDescMap | PRIMITIVE_TYPES |
WordSet | RESERVED_WORDS |
std::string | hFilename |
std::string | ccFilename |
std::ostream * | hOutp |
std::ostream * | ccOutp |
ErrorStore * | errors |
std::map< std::string, ClassType > | classType |
std::map< std::string, std::string > | enumType |
std::string | namespaceName |
StringVector | namespaceNameVector |
MsgCompilerOptionsOld | opts |
Static Protected Attributes | |
static TypeDesc | _PRIMITIVE_TYPES [] |
static const char * | _RESERVED_WORDS [] |
typedef std::vector<std::string> StringVector |
|
protected |
|
protected |
|
protected |
enum ClassType |
MsgCompilerOld | ( | ErrorStore * | errors, |
const MsgCompilerOptionsOld & | options | ||
) |
Constructor.
~MsgCompilerOld | ( | ) |
Destructor.
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void generate | ( | MsgFileElement * | fileElement, |
const char * | hFile, | ||
const char * | ccFile | ||
) |
Generates C++ code from the specified message file. Assumes that the object tree has already passed DTD and syntax validation.
|
staticprotected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |