mirror of
https://github.com/nasa/trick.git
synced 2025-06-22 08:50:06 +00:00
ICG exclude of class member variables now defines incorrect memory offsets in io_src #311
This changes back the default behavior to not use offsetof in io_src code. Added a flag to ICG, -c or --compat15, to globally generate offsetof statements. Added an ENV variable that can be used to generate offsetof statements by file or directory. Added in a warning if classes parsed at ICG time are different in size than at runtime.
This commit is contained in:
@ -68,6 +68,8 @@ class ClassValues : public ConstructValues {
|
||||
bool getHasInitAttrFriend() ;
|
||||
void setPOD(bool in_val) ;
|
||||
bool isPOD() ;
|
||||
void setSize(unsigned int size) ;
|
||||
unsigned int getSize() ;
|
||||
void setAbstract(bool in_val) ;
|
||||
bool isAbstract() ;
|
||||
void setHasDefaultConstructor(bool in_val) ;
|
||||
@ -78,6 +80,8 @@ class ClassValues : public ConstructValues {
|
||||
void setMangledTypeName( std::string in_val ) ;
|
||||
std::string getMangledTypeName() ;
|
||||
std::string getFullyQualifiedMangledTypeName() ;
|
||||
void setCompat15(bool in_val) ;
|
||||
bool isCompat15() ;
|
||||
|
||||
void print_namespaces(std::ostream & os, const char * delimiter) ;
|
||||
|
||||
@ -102,6 +106,9 @@ class ClassValues : public ConstructValues {
|
||||
/** Is this class plain old data? */
|
||||
bool is_pod ;
|
||||
|
||||
/** Size of class in bytes */
|
||||
unsigned int size ;
|
||||
|
||||
/** Is this class abstract? */
|
||||
bool is_abstract ;
|
||||
|
||||
@ -113,6 +120,10 @@ class ClassValues : public ConstructValues {
|
||||
|
||||
/** Mangled type name. Templates will have a mangled_type_name. */
|
||||
std::string mangled_type_name ;
|
||||
|
||||
/** Generate Trick 15 compatible io_src code */
|
||||
bool compat15 ;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user