OMNeT++ NEDXML
6.0.3
|
#include <msganalyzer.h>
Part of the message compiler. Produces ClassInfo/EnumInfo objects from the ASTNode 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 | |
MsgAnalyzer (const MsgCompilerOptions &opts, MsgTypeTable *typeTable, ErrorStore *errors) | |
~MsgAnalyzer () | |
ClassInfo | extractClassInfo (ASTNode *node, const std::string &namespaceName, bool isImported) |
void | ensureAnalyzed (ClassInfo &classInfo) |
void | ensureFieldsAnalyzed (ClassInfo &classInfo) |
EnumInfo | extractEnumDecl (EnumDeclElement *node, const std::string &namespaceName) |
EnumInfo | extractEnumInfo (EnumElement *node, const std::string &namespaceName) |
ClassInfo | extractClassInfoFromEnum (EnumElement *node, const std::string &namespaceName, bool isImported) |
Property | extractProperty (PropertyElement *propertyElem) |
void | validateFileProperty (const Property &property) |
void | analyzeCplusplusBlockTarget (CplusplusElement *cppElem, const std::string ¤tNamespace) |
Static Public Attributes | |
static StringSet | RESERVED_WORDS |
static constexpr const char * | ATT_NAME = "name" |
static constexpr const char * | ATT_EXTENDS_NAME = "extends-name" |
static constexpr const char * | PROP_PROPERTY = "property" |
static constexpr const char * | PROP_ABSTRACT = "abstract" |
static constexpr const char * | PROP_ACTUALLY = "actually" |
static constexpr const char * | PROP_PRIMITIVE = "primitive" |
static constexpr const char * | PROP_OPAQUE = "opaque" |
static constexpr const char * | PROP_BYVALUE = "byValue" |
static constexpr const char * | PROP_SUPPORTSPTR = "supportsPtr" |
static constexpr const char * | PROP_SUBCLASSABLE = "subclassable" |
static constexpr const char * | PROP_POLYMORPHIC = "polymorphic" |
static constexpr const char * | PROP_DEFAULTVALUE = "defaultValue" |
static constexpr const char * | PROP_CPPTYPE = "cppType" |
static constexpr const char * | PROP_DATAMEMBERTYPE = "datamemberType" |
static constexpr const char * | PROP_ARGTYPE = "argType" |
static constexpr const char * | PROP_RETURNTYPE = "returnType" |
static constexpr const char * | PROP_TOSTRING = "toString" |
static constexpr const char * | PROP_FROMSTRING = "fromString" |
static constexpr const char * | PROP_TOVALUE = "toValue" |
static constexpr const char * | PROP_FROMVALUE = "fromValue" |
static constexpr const char * | PROP_GETTERCONVERSION = "getterConversion" |
static constexpr const char * | PROP_CLONE = "clone" |
static constexpr const char * | PROP_EXISTINGCLASS = "existingClass" |
static constexpr const char * | PROP_DESCRIPTOR = "descriptor" |
static constexpr const char * | PROP_CASTFUNCTION = "castFunction" |
static constexpr const char * | PROP_OMITGETVERB = "omitGetVerb" |
static constexpr const char * | PROP_FIELDNAMESUFFIX = "fieldNameSuffix" |
static constexpr const char * | PROP_BEFORECHANGE = "beforeChange" |
static constexpr const char * | PROP_IMPLEMENTS = "implements" |
static constexpr const char * | PROP_NOPACK = "nopack" |
static constexpr const char * | PROP_OWNED = "owned" |
static constexpr const char * | PROP_EDITABLE = "editable" |
static constexpr const char * | PROP_REPLACEABLE = "replaceable" |
static constexpr const char * | PROP_RESIZABLE = "resizable" |
static constexpr const char * | PROP_READONLY = "readonly" |
static constexpr const char * | PROP_OVERRIDEGETTER = "overrideGetter" |
static constexpr const char * | PROP_OVERRIDESETTER = "overrideSetter" |
static constexpr const char * | PROP_ENUM = "enum" |
static constexpr const char * | PROP_SIZETYPE = "sizeType" |
static constexpr const char * | PROP_SETTER = "setter" |
static constexpr const char * | PROP_GETTER = "getter" |
static constexpr const char * | PROP_GETTERFORUPDATE = "getterForUpdate" |
static constexpr const char * | PROP_SIZESETTER = "sizeSetter" |
static constexpr const char * | PROP_SIZEGETTER = "sizeGetter" |
static constexpr const char * | PROP_INSERTER = "inserter" |
static constexpr const char * | PROP_APPENDER = "appender" |
static constexpr const char * | PROP_ERASER = "eraser" |
static constexpr const char * | PROP_REMOVER = "remover" |
static constexpr const char * | PROP_ALLOWREPLACE = "allowReplace" |
static constexpr const char * | PROP_STR = "str" |
static constexpr const char * | PROP_CUSTOMIZE = "customize" |
static constexpr const char * | PROP_OVERWRITEPREVIOUSDEFINITION = "overwritePreviousDefinition" |
static constexpr const char * | PROP_CUSTOM = "custom" |
static constexpr const char * | PROP_CUSTOMIMPL = "customImpl" |
Protected Member Functions | |
void | extractFields (ClassInfo &classInfo) |
void | analyzeClassOrStruct (ClassInfo &classInfo, const std::string &namespaceName) |
void | analyzeFields (ClassInfo &classInfo, const std::string &namespaceName) |
void | analyzeField (ClassInfo &classInfo, FieldInfo *field, const std::string &namespaceName) |
void | analyzeInheritedField (ClassInfo &classInfo, FieldInfo *field) |
std::string | prefixWithNamespace (const std::string &name, const std::string &namespaceName) |
Properties | extractProperties (ASTNode *node) |
bool | hasSuperclass (ClassInfo &classInfo, const std::string &superclassQName) |
FieldInfo * | findField (ClassInfo &classInfo, const std::string &name) |
FieldInfo * | findSuperclassField (ClassInfo &classInfo, const std::string &fieldName) |
bool | hasProperty (const Properties &p, const char *name) |
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()) |
std::string | getMethodProperty (const Properties &props, const char *propName, bool existingClass) |
std::string | decorateType (const std::string &typeName, bool isConst, bool isPointer, bool isRef) |
std::string | makeRelative (const std::string &qname, const std::string &namespaceName) |
std::string | lookupExistingClassName (const std::string &name, const std::string &contextNamespace, ClassInfo *contextClass=nullptr) |
void | validateProperty (const Property &property, const char *usage) |
Protected Attributes | |
ErrorStore * | errors |
MsgTypeTable * | typeTable |
const MsgCompilerOptions & | opts |
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 |
MsgAnalyzer | ( | const MsgCompilerOptions & | opts, |
MsgTypeTable * | typeTable, | ||
ErrorStore * | errors | ||
) |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
References MsgTypeTable::Properties::get().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void ensureAnalyzed | ( | ClassInfo & | classInfo | ) |
void ensureFieldsAnalyzed | ( | ClassInfo & | classInfo | ) |
EnumInfo extractEnumDecl | ( | EnumDeclElement * | node, |
const std::string & | namespaceName | ||
) |
EnumInfo extractEnumInfo | ( | EnumElement * | node, |
const std::string & | namespaceName | ||
) |
ClassInfo extractClassInfoFromEnum | ( | EnumElement * | node, |
const std::string & | namespaceName, | ||
bool | isImported | ||
) |
Property extractProperty | ( | PropertyElement * | propertyElem | ) |
void validateFileProperty | ( | const Property & | property | ) |
void analyzeCplusplusBlockTarget | ( | CplusplusElement * | cppElem, |
const std::string & | currentNamespace | ||
) |
|
static |
|
protected |
|
protected |
|
protected |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |