Class CTypeDeclaration#
Defined in File entity_base.h
Inheritance Relationships#
Base Types#
public sdv::idl::IDeclarationType
(Struct IDeclarationType)public sdv::IInterfaceAccess
(Struct IInterfaceAccess)
Class Documentation#
-
class CTypeDeclaration : public sdv::idl::IDeclarationType, public sdv::IInterfaceAccess#
Type declaration struct containing all the type information of this declaration including dependent type information of templated types and information.
Public Functions
-
virtual sdv::idl::EDeclType GetBaseType() const override#
Return the base type. Overload of sdv::idl::IDeclarationType::GetBaseType.
The bse type might be a templated type (string, sequence, map, etc.) which means that additional information is needed. Furthermore, the type might be a complex type (struct, union, enum) or a typedef. In these cases the type definition interface is available.
- Returns:
The base type of this type.
-
void SetBaseType(sdv::idl::EDeclType eBaseType)#
Set the base type.
- Parameters:
eBaseType – [in] The base type to set.
-
virtual sdv::u8string GetTypeString() const override#
Return the string that described the type in the code. Overload of sdv::idl::IDeclarationType::GetTypeString.
- Returns:
The type string.
-
void SetTypeString(const sdv::u8string &rssType)#
Set the type string.
- Parameters:
rssType – [in] Reference to the type string.
-
void AddTypeString(const sdv::u8string &rss)#
Add a string chunk to the type string.
- Parameters:
rss – [in] Reference to the chunk string to add.
-
virtual sdv::IInterfaceAccess *GetTypeDefinition() const override#
Return the type definition for complex types or typedefs. Overload of sdv::idl::IDeclarationType::GetTypeDefinition.
- Returns:
Pointer to the interface representing the type definition. Will be NULL for all other types.
-
CEntityPtr GetTypeDefinitionEntityPtr() const#
Return the type definition entity pointer.
- Returns:
The type definition entity pointer.
-
void SetTypeDefinitionEntityPtr(const CEntityPtr &rptrDefinition)#
Set the definition entity pointer.
- Parameters:
rptrDefinition – [in] Reference to the definition entity pointer.
-
virtual uint32_t GetFixedLength() const override#
Fixed length parameter for some templated types. Overload of sdv::idl::IDeclarationType::GetFixedLength.
Fixed length template parameter for “fixed”, “string”, “sequence”, “pointer”, “map” and “bitfields”. When not compulsory (for “fixed”, “string”, “sequence”, “pointer” and “map”) could be 0 to indicate a dynamic length (or defined over assignment with “fixed”). Bitfields allow a length between 1 and 64 bits.
- Returns:
Returns the fixed length for some templated types or 0 for all other other types.
-
void SetFixedLength(uint32_t uiFixedLength)#
Set the fixed length.
- Parameters:
uiFixedLength – [in] The fixed length or 0 for dynamic length.
-
virtual uint32_t GetDecimals() const override#
The amount of decimals of the “fixed” data type. Must be equal or smaller than the fixed length. Overload of sdv::idl::IDeclarationType::GetDecimals.
- Returns:
The amount of decimals for the “fixed” data type or 0 for all other data types.
-
void SetDecimals(uint32_t uiDecimals)#
Set the amount of decimals for the fixed type.
- Parameters:
uiDecimals – [in] The amount of decimals to set.
-
virtual sdv::IInterfaceAccess *GetValueType() const override#
The value type template parameter for the “sequence”, “pointer”, “map” and “bitfield” data types. Overload of sdv::idl::IDeclarationType::GetValueType.
- Returns:
Interface to the value data type for some templated types of NULL for all other types.
Set value type pointer.
- Parameters:
rptrValueType – [in] Reference to the value type pointer.
-
virtual sdv::IInterfaceAccess *GetKeyType() const override#
The key type template parameter for the “map” data type. Overload of sdv::idl::IDeclarationType::GetKeyType.
- Returns:
Interface to the key data type for the “map” type of NULL for all other types.
Set key type pointer.
- Parameters:
rptrKeyType – [in] Reference to the key type pointer.
-
virtual sdv::idl::EDeclType GetBaseType() const override#