mirror of
https://github.com/nasa/trick.git
synced 2025-06-21 08:29:39 +00:00
Ignore privacy
Changed the storage of offsets from bytes to bits to better handle bitfields. Added code to track classes that are defined within other classes and are private/protected. These classes cannot be used in templates because our io_src code declares variables outside of the class that would try and use these private/protected variables. When a template is found to use a private/protected class it is skipped. refs #218
This commit is contained in:
@ -247,9 +247,6 @@ void FieldDescription::setContainerClass(std::string in_name ) {
|
||||
|
||||
void FieldDescription::setFieldOffset(unsigned int in_offset) {
|
||||
field_offset = in_offset ;
|
||||
if ( is_bitfield ) {
|
||||
calcBitfieldOffset() ;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int FieldDescription::getFieldOffset() {
|
||||
@ -331,17 +328,8 @@ clang::AccessSpecifier FieldDescription::getAccess() {
|
||||
return access ;
|
||||
}
|
||||
|
||||
void FieldDescription::calcBitfieldOffset() {
|
||||
unsigned int field_offset_bits = field_offset * 8 ;
|
||||
bitfield_start_bit = 32 - (field_offset_bits % 32) - bitfield_width ;
|
||||
bitfield_word_offset = (field_offset_bits / 32) * 4 ;
|
||||
}
|
||||
|
||||
void FieldDescription::addOffset( unsigned int offset ) {
|
||||
field_offset += offset ;
|
||||
if ( is_bitfield ) {
|
||||
calcBitfieldOffset() ;
|
||||
}
|
||||
}
|
||||
|
||||
void FieldDescription::setEnumString(std::string in_str) {
|
||||
|
Reference in New Issue
Block a user