Go to the documentation of this file.
17 #ifndef __OMNETPP_NEDXML_MSGTYPETABLE_H
18 #define __OMNETPP_NEDXML_MSGTYPETABLE_H
32 class CplusplusElement;
53 Property(
const std::string& name,
const std::string& index,
ASTNode *astNode) : astNode(astNode), name(name), index(index) {}
55 const std::string&
getName()
const {
return name;}
56 const std::string&
getIndex()
const {
return index;}
57 std::string getIndexedName()
const;
60 std::string getValueAsString()
const;
61 void addValue(
const std::string& key,
const std::string& value);
70 bool empty()
const {
return properties.empty();}
71 const std::vector<Property>&
getAll()
const {
return properties;}
72 const Property *get(
const std::string& name,
const std::string& index=
"")
const;
73 bool contains(
const std::string& name,
const std::string& index=
"")
const {
return get(name, index) !=
nullptr;}
163 bool classInfoComplete =
false;
164 bool classBeingAnalyzed =
false;
165 bool fieldsComplete =
false;
166 bool fieldsBeingAnalyzed =
false;
193 bool generateClass =
true;
194 bool generateDescriptor =
true;
195 bool generateSettersInDescriptor =
true;
196 bool generateCastFunction =
false;
239 bool isDeclaration =
false;
245 std::map<std::string,ClassInfo> definedClasses;
246 std::map<std::string,EnumInfo> definedEnums;
247 std::vector<ASTNode*> importedMsgFiles;
250 void initDescriptors();
252 return !namespaceName.empty() ? namespaceName +
"::" + name : name;
258 StringVector lookupExistingEnumName(
const std::string& name,
const std::string& contextNamespace);
259 bool isClassDefined(
const std::string& classqname) {
return definedClasses.find(classqname) != definedClasses.end(); }
260 bool isEnumDefined(
const std::string& enumqname) {
return definedEnums.find(enumqname) != definedEnums.end(); }
261 ClassInfo *findClassInfo(
const std::string& classqname);
262 ClassInfo& getClassInfo(
const std::string& classqname);
263 const EnumInfo& getEnumInfo(
const std::string& qname);
std::string index
Definition: msgtypetable.h:49
MsgTypeTable()
Definition: msgtypetable.h:256
bool isConst
Definition: msgtypetable.h:86
void add(const Property &p)
Definition: msgtypetable.h:69
std::vector< std::string > rootClasses
Definition: msgtypetable.h:198
std::string symbolicConstant
Definition: msgtypetable.h:84
bool iscOwnedObject
Definition: msgtypetable.h:176
std::string fromValue
Definition: msgtypetable.h:218
std::string sizeType
Definition: msgtypetable.h:110
Definition: msgtypetable.h:232
std::string var
Definition: msgtypetable.h:107
std::string name
Definition: msgtypetable.h:48
bool empty() const
Definition: msgtypetable.h:70
bool isOwnedPointer
Definition: msgtypetable.h:89
Definition: msgtypetable.h:64
std::string fromString
Definition: msgtypetable.h:133
FieldList fieldList
Definition: msgtypetable.h:240
std::string name
Definition: msgtypetable.h:80
Definition: msgtypetable.h:153
bool overrideSetter
Definition: msgtypetable.h:143
bool nopack
Definition: msgtypetable.h:140
bool isResizable
Definition: msgtypetable.h:150
void storeMsgFile(ASTNode *tree)
Definition: msgtypetable.h:265
std::string extendsQName
Definition: msgtypetable.h:168
bool hasStrMethod
Definition: msgtypetable.h:124
std::string fromValue
Definition: msgtypetable.h:136
bool hasGetterForUpdate
Definition: msgtypetable.h:113
void addGlobalProperty(const Property &p)
Definition: msgtypetable.h:266
std::vector< std::string > StringVector
Definition: msgtypetable.h:42
std::map< std::string, CplusplusElement * > methodCplusplusBlocks
Definition: msgtypetable.h:204
bool isEditable
Definition: msgtypetable.h:211
bool isClass
Definition: msgtypetable.h:172
bool isReplaceable
Definition: msgtypetable.h:149
const std::string & getName() const
Definition: msgtypetable.h:55
std::string toValue
Definition: msgtypetable.h:135
std::string comment
Definition: msgtypetable.h:229
std::string defaultValue
Definition: msgtypetable.h:208
std::string toString
Definition: msgtypetable.h:215
void addClass(const ClassInfo &classInfo)
Definition: msgtypetable.h:267
bool isDynamicArray
Definition: msgtypetable.h:92
std::string value
Definition: msgtypetable.h:228
std::map< std::string, StringVector > propertyValue
Definition: msgtypetable.h:50
std::string argTypeBase
Definition: msgtypetable.h:213
bool isOpaque
Definition: msgtypetable.h:141
std::string enumQName
Definition: msgtypetable.h:139
bool allowReplace
Definition: msgtypetable.h:114
bool isClassDefined(const std::string &classqname)
Definition: msgtypetable.h:259
std::string clone
Definition: msgtypetable.h:219
std::string realClass
Definition: msgtypetable.h:185
ASTNode * astNode
Definition: msgtypetable.h:226
Fieldlist fieldList
Definition: msgtypetable.h:190
#define NEDXML_API
Definition: nedxmldefs.h:31
StringVector implementsQNames
Definition: msgtypetable.h:199
std::string getterConversion
Definition: msgtypetable.h:137
bool iscOwnedObject
Definition: msgtypetable.h:101
std::set< std::string > usedMethodCplusplusBlocks
Definition: msgtypetable.h:205
std::string namespaceName
Definition: msgtypetable.h:182
std::string mutableReturnType
Definition: msgtypetable.h:106
std::string keyword
Definition: msgtypetable.h:158
std::string enumQName
Definition: msgtypetable.h:237
std::string sizeVar
Definition: msgtypetable.h:109
std::string dataType
Definition: msgtypetable.h:103
Definition: astbuilder.h:25
std::string getter
Definition: msgtypetable.h:111
bool isPointer
Definition: msgtypetable.h:88
std::string baseDataType
Definition: msgtypetable.h:102
Definition: msgtypetable.h:223
std::string sizeSetter
Definition: msgtypetable.h:122
std::string toValue
Definition: msgtypetable.h:217
std::string enumName
Definition: msgtypetable.h:236
std::string beforeChange
Definition: msgtypetable.h:200
const std::vector< Property > & getAll() const
Definition: msgtypetable.h:71
std::string setter
Definition: msgtypetable.h:118
Definition: msgtypetable.h:39
bool omitGetVerb
Definition: msgtypetable.h:171
std::string returnTypeBase
Definition: msgtypetable.h:214
std::string value
Definition: msgtypetable.h:83
std::string classQName
Definition: msgtypetable.h:184
Definition: msgtypetable.h:44
bool isEnumDefined(const std::string &enumqname)
Definition: msgtypetable.h:260
const std::string & getIndex() const
Definition: msgtypetable.h:56
std::string baseClass
Definition: msgtypetable.h:186
bool byValue
Definition: msgtypetable.h:87
std::string arraySize
Definition: msgtypetable.h:94
std::string inserter
Definition: msgtypetable.h:119
ASTNode * getASTNode() const
Definition: msgtypetable.h:58
Property()
Definition: msgtypetable.h:52
std::string getterConversion
Definition: msgtypetable.h:220
std::vector< FieldInfo > Fieldlist
Definition: msgtypetable.h:155
bool isFixedArray
Definition: msgtypetable.h:93
std::string toString
Definition: msgtypetable.h:125
Properties props
Definition: msgtypetable.h:161
bool isCustom
Definition: msgtypetable.h:144
void addEnum(const EnumInfo &enumInfo)
Definition: msgtypetable.h:268
bool overrideGetter
Definition: msgtypetable.h:142
bool isClass
Definition: msgtypetable.h:98
bool isCustomImpl
Definition: msgtypetable.h:145
bool isArray
Definition: msgtypetable.h:91
ASTNode * astNode
Definition: msgtypetable.h:235
bool iscObject
Definition: msgtypetable.h:174
std::string argName
Definition: msgtypetable.h:108
std::string fromString
Definition: msgtypetable.h:216
std::string extendsName
Definition: msgtypetable.h:169
std::string eraser
Definition: msgtypetable.h:121
bool iscNamedObject
Definition: msgtypetable.h:100
std::string argType
Definition: msgtypetable.h:104
std::string name
Definition: msgtypetable.h:159
std::string dataTypeBase
Definition: msgtypetable.h:212
std::string clone
Definition: msgtypetable.h:117
bool byValue
Definition: msgtypetable.h:210
std::string getterForUpdate
Definition: msgtypetable.h:112
std::string prefixWithNamespace(const std::string &namespaceName, const std::string &name)
Definition: msgtypetable.h:251
bool iscObject
Definition: msgtypetable.h:99
std::string type
Definition: msgtypetable.h:81
bool customize
Definition: msgtypetable.h:170
Property(const std::string &name, const std::string &index, ASTNode *astNode)
Definition: msgtypetable.h:53
std::string fieldNameSuffix
Definition: msgtypetable.h:188
bool isAbstract
Definition: msgtypetable.h:85
bool isPolymorphic
Definition: msgtypetable.h:173
std::string typeQName
Definition: msgtypetable.h:82
std::string classExtraCode
Definition: msgtypetable.h:203
std::string returnType
Definition: msgtypetable.h:105
bool supportsPtr
Definition: msgtypetable.h:181
std::string str
Definition: msgtypetable.h:201
std::string descriptorClass
Definition: msgtypetable.h:187
std::vector< EnumItem > FieldList
Definition: msgtypetable.h:238
bool isImported
Definition: msgtypetable.h:179
bool subclassable
Definition: msgtypetable.h:180
Properties props
Definition: msgtypetable.h:95
const Properties & getGlobalProperties() const
Definition: msgtypetable.h:264
std::string qname
Definition: msgtypetable.h:160
std::string sizeGetter
Definition: msgtypetable.h:123
ASTNode * astNode
Definition: msgtypetable.h:78
std::vector< Property > properties
Definition: msgtypetable.h:67
std::string dropper
Definition: msgtypetable.h:116
bool isEditable
Definition: msgtypetable.h:148
bool isOpaque
Definition: msgtypetable.h:209
std::string name
Definition: msgtypetable.h:227
std::string appender
Definition: msgtypetable.h:120
bool iscNamedObject
Definition: msgtypetable.h:175
Definition: msgtypetable.h:76
std::string className
Definition: msgtypetable.h:183
std::string enumName
Definition: msgtypetable.h:138
std::string remover
Definition: msgtypetable.h:115
Fieldlist baseclassFieldlist
Definition: msgtypetable.h:191
bool contains(const std::string &name, const std::string &index="") const
Definition: msgtypetable.h:73
bool isAbstract
Definition: msgtypetable.h:177