ADTF
3.18.2
|
TypeInfo model will check for type. More...
Public Types | |
enum class | UpdateType { only_changed = 0 , force_all = 1 , only_last = 2 , only_reference = 3 } |
Update type for the struct update. More... | |
Public Member Functions | |
DEV_ESSENTIAL_DEPRECATED_TYPEINFO_API | TypeInfo ()=default |
default CTOR | |
DEV_ESSENTIAL_DEPRECATED_TYPEINFO_API | TypeInfo (const datamodel::DataType &data_type, datamodel::DataDefinition &parent_dd) |
CTOR to create a Type Info that is initial updated with data_type information. More... | |
DEV_ESSENTIAL_DEPRECATED_TYPEINFO_API | TypeInfo (const datamodel::EnumType &enum_type, datamodel::DataDefinition &parent_dd) |
CTOR to create a Type Info that is initial updated with enum_type information. More... | |
size_t | getTypeBitSize () const |
Get the Type Bit Size. More... | |
size_t | getTypeAlignment () const |
Get the Type Alignment. More... | |
size_t | getTypeByteSize () const |
Get the Type Byte Size (depending on ddl version in structs this is aligned or not) More... | |
size_t | getTypeAlignedByteSize () const |
Get the Type Aligned Byte Size. More... | |
size_t | getTypeUnalignedByteSize () const |
Get the Type Unaligned Byte Size. More... | |
bool | isValid () const |
the content is valid, all references to other DD Objects (for calculation) are valid. More... | |
bool | isDynamic () const |
contains dynamic content (usually this is only possible for struct_type) More... | |
void | update (const datamodel::DataType &data_type, datamodel::DataDefinition &parent_dd) |
Updates the content for a data_type. More... | |
void | update (const datamodel::EnumType &enum_type, datamodel::DataDefinition &parent_dd) |
Updates the content for a enum_type. More... | |
void | update (datamodel::StructType &struct_type, datamodel::DataDefinition &parent_dd, UpdateType update_type=UpdateType::only_changed) |
Updates the content for a struct_type. More... | |
Public Member Functions inherited from IInfo | |
virtual | ~IInfo ()=default |
virtual DTOR for IInfo object | |
Static Public Attributes | |
static constexpr const uint8_t | INFO_TYPE_ID = dd::InfoType::type_info |
type info ID to use it in datamodel::Info. | |
Additional Inherited Members | |
Protected Member Functions inherited from Info< TypeInfo > | |
uint8_t | getInfoType () const override |
Get the Info Type object. More... | |
TypeInfo model will check for type.
The TypeInfo is needed to:
Definition at line 44 of file dd_typeinfomodel.h.
|
strong |
Update type for the struct update.
Enumerator | |
---|---|
only_changed | update only changed elements |
force_all | force recaculation of all elements |
only_last | update the last element only |
only_reference | update the references only |
Definition at line 138 of file dd_typeinfomodel.h.
DEV_ESSENTIAL_DEPRECATED_TYPEINFO_API TypeInfo | ( | const datamodel::DataType & | data_type, |
datamodel::DataDefinition & | parent_dd | ||
) |
CTOR to create a Type Info that is initial updated with data_type information.
data_type | the data type to initialize the info for |
parent_dd | the parent DD to retrieve dependencies from |
DEV_ESSENTIAL_DEPRECATED_TYPEINFO_API TypeInfo | ( | const datamodel::EnumType & | enum_type, |
datamodel::DataDefinition & | parent_dd | ||
) |
CTOR to create a Type Info that is initial updated with enum_type information.
enum_type | the data type to initialize the info for |
parent_dd | the parent DD to retrieve dependencies from |
size_t getTypeAlignedByteSize | ( | ) | const |
Get the Type Aligned Byte Size.
size_t getTypeAlignment | ( | ) | const |
Get the Type Alignment.
size_t getTypeBitSize | ( | ) | const |
Get the Type Bit Size.
size_t getTypeByteSize | ( | ) | const |
Get the Type Byte Size (depending on ddl version in structs this is aligned or not)
size_t getTypeUnalignedByteSize | ( | ) | const |
Get the Type Unaligned Byte Size.
bool isDynamic | ( | ) | const |
contains dynamic content (usually this is only possible for struct_type)
bool isValid | ( | ) | const |
the content is valid, all references to other DD Objects (for calculation) are valid.
This is set to false also if a recursion loop in the definition was detected.
void update | ( | const datamodel::DataType & | data_type, |
datamodel::DataDefinition & | parent_dd | ||
) |
Updates the content for a data_type.
data_type | the data_type |
parent_dd | the parent DD |
void update | ( | const datamodel::EnumType & | enum_type, |
datamodel::DataDefinition & | parent_dd | ||
) |
Updates the content for a enum_type.
enum_type | the enum_type |
parent_dd | the parent DD |
void update | ( | datamodel::StructType & | struct_type, |
datamodel::DataDefinition & | parent_dd, | ||
UpdateType | update_type = UpdateType::only_changed |
||
) |
Updates the content for a struct_type.
It will also create or update the ElementTypeInfo for all contained elements (if necessary).
struct_type | the struct_type |
parent_dd | the parent DD |
update_type | update type to determine to validate only the last, the changed or all elements. |