17 #ifndef __OMNETPP_NEDXML_MSGCOMPILER_H 18 #define __OMNETPP_NEDXML_MSGCOMPILER_H 28 #include "msgelements.h" 50 generateClasses(true),
51 generateDescriptors(true),
52 generateSettersInDescriptors(true)
87 void importBuiltinDefinitions();
88 void processBuiltinImport(
const char *txt,
const char *fname);
90 void processImport(ImportElement *importElem,
const std::string& currentDir);
91 std::string resolveImport(
const std::string& importName,
const std::string& currentDir);
92 void collectTypes(MsgFileElement *fileElement,
bool isImport);
93 void generateCode(MsgFileElement *fileElement);
94 std::string prefixWithNamespace(
const std::string& name,
const std::string& namespaceName);
95 void validateNamespaceName(
const std::string& namespaceName,
ASTNode *element);
112 void generate(MsgFileElement *fileElement,
const char *hFile,
const char *ccFile, StringSet& outImportedFiles);
115 static constexpr
const char* ATT_NAME =
"name";
Generates C++ code from a MSG file object tree.
Definition: msgcompiler.h:63
#define NEDXML_API
Definition: nedxmldefs.h:31
StringSet importedFiles
Definition: msgcompiler.h:84
Code generator part of the message compiler.
Definition: msgcodegenerator.h:40
Definition: msgtypetable.h:42
Options for MsgCompiler.
Definition: msgcompiler.h:41
std::string exportDef
Definition: msgcompiler.h:44
bool generateClasses
Definition: msgcompiler.h:45
Part of the message compiler. Produces ClassInfo/EnumInfo objects from the ASTNode tree...
Definition: msganalyzer.h:42
MsgCompilerOptions()
Definition: msgcompiler.h:49
MsgTypeTable::EnumItem EnumItem
Definition: msgcompiler.h:72
std::set< std::string > StringSet
Definition: msgcompiler.h:66
MsgTypeTable::EnumInfo EnumInfo
Definition: msgcompiler.h:73
ErrorStore * errors
Definition: msgcompiler.h:82
Definition: msgtypetable.h:74
bool generateSettersInDescriptors
Definition: msgcompiler.h:47
MsgTypeTable::ClassInfo ClassInfo
Definition: msgcompiler.h:71
bool generateDescriptors
Definition: msgcompiler.h:46
MsgTypeTable::FieldInfo FieldInfo
Definition: msgcompiler.h:70
MsgAnalyzer analyzer
Definition: msgcompiler.h:78
MsgTypeTable::Properties Properties
Definition: msgcompiler.h:69
Definition: msgtypetable.h:139
MsgTypeTable::Property Property
Definition: msgcompiler.h:68
StringSet importsSeen
Definition: msgcompiler.h:83
Definition: astbuilder.h:25
Definition: msgtypetable.h:62
std::vector< std::string > StringVector
Definition: msgcompiler.h:67
MsgTypeTable typeTable
Definition: msgcompiler.h:77
std::vector< std::string > importPath
Definition: msgcompiler.h:43
Definition: msgtypetable.h:37
Definition: errorstore.h:37
MsgCodeGenerator codegen
Definition: msgcompiler.h:79
Definition: msgtypetable.h:198
Definition: msgtypetable.h:207
MsgCompilerOptions opts
Definition: msgcompiler.h:76