PICODEINFO::accessOffsetFunction
add offset generation in pip_cmg for retrieve bytes offset of struct member add pip_cmg -V doc
This commit is contained in:
@@ -55,11 +55,12 @@ PIVariant PICodeInfo::getMemberAsVariant(const void * p, const char * class_name
|
||||
|
||||
|
||||
PICodeInfo::__Storage__::__Storage__() {
|
||||
classesInfo = new PIMap<PIConstChars, ClassInfo *>;
|
||||
enumsInfo = new PIMap<PIConstChars, EnumInfo *>;
|
||||
accessValueFunctions = new PIMap<PIConstChars, AccessValueFunction>;
|
||||
accessTypeFunctions = new PIMap<PIConstChars, AccessTypeFunction>;
|
||||
(*enumsInfo)[""] = new EnumInfo();
|
||||
classesInfo = new PIMap<PIConstChars, ClassInfo *>;
|
||||
enumsInfo = new PIMap<PIConstChars, EnumInfo *>;
|
||||
accessValueFunctions = new PIMap<PIConstChars, AccessValueFunction>;
|
||||
accessTypeFunctions = new PIMap<PIConstChars, AccessTypeFunction>;
|
||||
accessOffsetFunctions = new PIMap<PIConstChars, AccessOffsetFunction>;
|
||||
(*enumsInfo)[""] = new EnumInfo();
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +71,7 @@ PICodeInfo::__Storage__::~__Storage__() {
|
||||
piDeleteSafety(enumsInfo);
|
||||
piDeleteSafety(accessValueFunctions);
|
||||
piDeleteSafety(accessTypeFunctions);
|
||||
piDeleteSafety(accessOffsetFunctions);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ typedef PIFlags<PICodeInfo::TypeFlag> TypeFlags;
|
||||
typedef PIMap<PIString, PIString> MetaMap;
|
||||
typedef PIByteArray (*AccessValueFunction)(const void *, const char *);
|
||||
typedef const char * (*AccessTypeFunction)(const char *);
|
||||
typedef int (*AccessOffsetFunction)(const char *);
|
||||
|
||||
|
||||
//! \~english Type information
|
||||
@@ -289,6 +290,7 @@ public:
|
||||
PIMap<PIConstChars, PICodeInfo::EnumInfo *> * enumsInfo;
|
||||
PIMap<PIConstChars, PICodeInfo::AccessValueFunction> * accessValueFunctions;
|
||||
PIMap<PIConstChars, PICodeInfo::AccessTypeFunction> * accessTypeFunctions;
|
||||
PIMap<PIConstChars, PICodeInfo::AccessOffsetFunction> * accessOffsetFunctions;
|
||||
|
||||
private:
|
||||
NO_COPY_CLASS(__Storage__)
|
||||
@@ -314,6 +316,10 @@ static const PIMap<PIConstChars, PICodeInfo::AccessValueFunction> & accessValueF
|
||||
static const PIMap<PIConstChars, PICodeInfo::AccessTypeFunction> & accessTypeFunctions() {
|
||||
return *(__Storage__::instance()->accessTypeFunctions);
|
||||
}
|
||||
|
||||
static const PIMap<PIConstChars, PICodeInfo::AccessOffsetFunction> & accessOffsetFunctions() {
|
||||
return *(__Storage__::instance()->accessOffsetFunctions);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user