msgtypetable.h Source File¶
|
NEDXML API
|
msgtypetable.h
53 Property(const std::string& name, const std::string& index, ASTNode *astNode) : astNode(astNode), name(name), index(index) {}
73 bool contains(const std::string& name, const std::string& index="") const {return get(name, index) != nullptr;}
83 std::string value; // value (or empty). for arrays, this is the value for one array element (we have no syntax for initializing with a list of values)
84 std::string symbolicConstant; // symbolic name for local field index in the generated class descriptor
87 bool byValue; // @byValue(true); whether value should be passed by value (instead of by reference) in setters/getters
89 bool isOwnedPointer; // from @owned; if true, field is a pointer or pointer array, and allocated memory is owned by the object (needs to be duplicated in dup(), and deleted in destructor).
111 std::string getter; // getter function name: "T getter() const;" "const T& getter() const" default value is getFoo
112 std::string getterForUpdate; // mutable getter function name: "T& getterForUpdate();" default value is getFooForUpdate
114 bool allowReplace; // @allowReplace; whether setter of an owned pointer field is allowed to delete an already-set object
115 std::string remover; // remover function name (for pointers: drop object if owned, set pointer to nullptr, return object)
117 std::string clone; // @clone; code to duplicate (one array element of) the field (for owned pointers)
126 // if tostring begins with a dot, then it is taken as member function call, parentheses needed in property; otherwise toString is understood as name of a normal function, do not use parentheses
133 std::string fromString; // function to convert string to data member, defined in property @fromString
135 std::string toValue; // function to convert data to cValue, defined in property @toValue; syntax is similar to toString
136 std::string fromValue; // function to convert data from cValue, defined in property @fromValue; syntax is similar to fromString
141 bool isOpaque; // @opaque(true), means that field type is treated as atomic (has no fields), i.e. has no descriptor
142 bool overrideGetter; // @overrideGetter|@override, used when field getter function overrides a function in base class
143 bool overrideSetter; // @overrideSetter|@override, used when field setter function overrides a function in base class
145 bool isCustomImpl; // @customImpl: if true: do not generate implementation for the field's accessor methods
148 bool isEditable; // @editable(true): field value is editable via the descriptor's setFieldValueFromString() method
149 bool isReplaceable; // @replaceable(true): field value is a pointer which can be set via the descriptor's setFieldStructValuePointer() method
150 bool isResizable; // @resizable(true): field is an array whose size can be set via the descriptor's setFieldArraySize() method
192 bool isAbstract; // whether class can be instantiated (base class not abstract, and has no abstract fields)
197 std::string className; // name of actual C++ class or struct generated (<name>_Base when @customize is present)
207 bool generateTypeDefinition = true; // whether the code for this class/struct/enum should be generated
219 mutable std::set<std::string> usedMethodCplusplusBlocks; // collects method names; used during generation
230 std::string fromString; // @fromString; function to convert string to data member, defined in property @fromString
232 std::string fromValue; // @fromString; function to convert cValue to data member, defined in property @fromValue
233 std::string clone; // @clone; code to clone a dynamically allocated object of this type (for owned pointer fields)
234 std::string getterConversion; // @getterConversion; conversion from storage type to return type in getters
251 StringVector lookupExistingEnumName(const std::string& name, const std::string& contextNamespace);
252 bool isClassDefined(const std::string& classqname) { return definedClasses.find(classqname) != definedClasses.end(); }
Definition astnode.h:88
Generated on for NEDXML API by