Fast DDS  Version 3.0.1
Fast DDS
Loading...
Searching...
No Matches
ITypeObjectRegistry Class Referenceabstract

#include <ITypeObjectRegistry.hpp>

Public Member Functions

virtual FASTDDS_EXPORTED_API ReturnCode_t register_type_object (const std::string &type_name, const CompleteTypeObject &complete_type_object, TypeIdentifierPair &type_ids)=0
 Register a local TypeObject.
 
virtual ReturnCode_t register_type_object (const TypeObject &type_object, TypeIdentifierPair &type_ids)=0
 Register a remote TypeObject.
 
virtual FASTDDS_EXPORTED_API ReturnCode_t register_typeobject_w_dynamic_type (const DynamicType::_ref_type &dynamic_type, TypeIdentifierPair &type_ids)=0
 Register DynamicType TypeObject.
 
virtual FASTDDS_EXPORTED_API ReturnCode_t register_type_identifier (const std::string &type_name, TypeIdentifierPair &type_identifier)=0
 Register an indirect hash TypeIdentifier.
 
virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_objects (const std::string &type_name, TypeObjectPair &type_objects)=0
 Get the TypeObjects related to the given type name.
 
virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_identifiers (const std::string &type_name, TypeIdentifierPair &type_identifiers)=0
 Get the TypeIdentifiers related to the given type name.
 
virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_object (const TypeIdentifier &type_identifier, TypeObject &type_object)=0
 Get the TypeObject related to the given TypeIdentifier.
 
virtual ReturnCode_t get_type_information (const TypeIdentifierPair &type_ids, TypeInformation &type_information, bool with_dependencies=false)=0
 Get the TypeInformation related to a specific type_name.
 

Member Function Documentation

◆ get_type_identifiers()

virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_identifiers ( const std::string &  type_name,
TypeIdentifierPair type_identifiers 
)
pure virtual

Get the TypeIdentifiers related to the given type name.

Precondition
type_name must not be empty.
Parameters
[in]type_nameName of the type being queried.
[out]type_identifiersFor direct hash TypeIdentifiers, both minimal and complete TypeIdentifiers are returned. For indirect hash TypeIdentifiers, only the corresponding TypeIdentifier is returned
Returns
ReturnCode_t RETCODE_OK if the TypeIdentifiers are found in the registry. RETCODE_NO_DATA if the type_name has not been registered. RETCODE_PRECONDITION_NOT_MET if the type_name is empty.

◆ get_type_information()

virtual ReturnCode_t get_type_information ( const TypeIdentifierPair type_ids,
TypeInformation type_information,
bool  with_dependencies = false 
)
pure virtual

Get the TypeInformation related to a specific type_name.

Precondition
type_ids must not be empty.
Parameters
[in]type_idsTypeIdentifierPair which type information is queried.
[out]type_informationRelated TypeInformation for the given TypeIdentifier.
[in]with_dependencies
Returns
ReturnCode_t RETCODE_OK if the type_ids are found within the registry. RETCODE_NO_DATA if the given type_ids is not found. RETCODE_BAD_PARAMETER if the given TypeIdentifier corresponds to a indirect hash TypeIdentifier. RETCODE_PRECONDITION_NOT_MET if any type_ids is empty.

◆ get_type_object()

virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_object ( const TypeIdentifier type_identifier,
TypeObject type_object 
)
pure virtual

Get the TypeObject related to the given TypeIdentifier.

Precondition
TypeIdentifier must be a direct hash TypeIdentifier.
Parameters
[in]type_identifierTypeIdentifier being queried.
[out]type_objectTypeObject related with the given TypeIdentifier.
Returns
ReturnCode_t RETCODE_OK if the TypeObject is found within the registry. RETCODE_NO_DATA if the given TypeIdentifier is not found in the registry. RETCODE_PRECONDITION_NOT_MET if the TypeIdentifier is not a direct hash.

◆ get_type_objects()

virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_objects ( const std::string &  type_name,
TypeObjectPair type_objects 
)
pure virtual

Get the TypeObjects related to the given type name.

Precondition
type_name must not be empty.
Parameters
[in]type_nameName of the type being queried.
[out]type_objectsBoth complete and minimal TypeObjects related with the given type_name.
Returns
ReturnCode_t RETCODE_OK if the TypeObjects are found in the registry. RETCODE_NO_DATA if the given type_name has not been registered. RETCODE_BAD_PARAMETER if the type_name correspond to a indirect hash TypeIdentifier. RETCODE_PRECONDITION_NOT_MET if the type_name is empty.

◆ register_type_identifier()

virtual FASTDDS_EXPORTED_API ReturnCode_t register_type_identifier ( const std::string &  type_name,
TypeIdentifierPair type_identifier 
)
pure virtual

Register an indirect hash TypeIdentifier.

Precondition
TypeIdentifier must not be a direct hash TypeIdentifier.
TypeIdentifier must be consistent (only checked in Debug build mode).
type_name must not be empty.
Parameters
[in]type_nameName of the type being registered.
[in,out]type_identifierTypeIdentifierPair related to the given type name. It must be set in TypeIdentifierPair::type_identifier1. At the end this object is filled with both TypeIdentifiers.
Returns
ReturnCode_t RETCODE_OK if correctly registered in TypeObjectRegistry. RETCODE_BAD_PARAMETER if there is already another different TypeIdentifier registered with the given type_name. RETCODE_PRECONDITION_NOT_MET if the given TypeIdentifier is inconsistent or a direct hash TypeIdentifier or if the given type_name is empty.

◆ register_type_object() [1/2]

virtual FASTDDS_EXPORTED_API ReturnCode_t register_type_object ( const std::string &  type_name,
const CompleteTypeObject complete_type_object,
TypeIdentifierPair type_ids 
)
pure virtual

Register a local TypeObject.

The MinimalTypeObject is generated from the CompleteTypeObject, and both are registered into the registry with the corresponding TypeIdentifiers and TypeObject serialized sizes.

Precondition
type_name must not be empty.
complete_type_object must be consistent (only checked in Debug build mode).
Parameters
[in]type_nameName of the type being registered.
[in]complete_type_objectCompleteTypeObject related to the given type name.
[out]type_idsTypeIdentifierPair corresponding to the CompleteTypeObject just registered and the generated MinimalTypeObject.
Returns
ReturnCode_t RETCODE_OK if correctly registered in TypeObjectRegistry. RETCODE_BAD_PARAMETER if there is already another different TypeObject registered with the given type_name. RETCODE_PRECONDITION_NOT_MET if the given type_name is empty or if the type_object is inconsistent.

◆ register_type_object() [2/2]

virtual ReturnCode_t register_type_object ( const TypeObject type_object,
TypeIdentifierPair type_ids 
)
pure virtual

Register a remote TypeObject.

This auxiliary method might register only the minimal TypeObject and TypeIdentifier or register both TypeObjects constructing the minimal from the complete TypeObject information. TypeObject consistency is not checked in this method as the order of the dependencies received by the TypeLookupService is not guaranteed. The consistency is checked by the TypeLookupService after all dependencies are registered.

Precondition
TypeIdentifierPair::type_identifier1 discriminator must match TypeObject discriminator or be TK_NONE. TypeIdentifierPair::type_identifier1 consistency is only checked in Debug build mode.
Parameters
[in]type_objectRelated TypeObject being registered.
[in,out]type_idsReturns the registered TypeIdentifier. TypeIdentifierPair::type_identifier1 might be TK_NONE. In other case this function will check it is consistence with the provided TypeObject.
Returns
ReturnCode_t RETCODE_OK if correctly registered. RETCODE_PRECONDITION_NOT_MET if the discriminators differ. RETCODE_PRECONDITION_NOT_MET if the TypeIdentifier is not consistent with the given TypeObject.

◆ register_typeobject_w_dynamic_type()

virtual FASTDDS_EXPORTED_API ReturnCode_t register_typeobject_w_dynamic_type ( const DynamicType::_ref_type dynamic_type,
TypeIdentifierPair type_ids 
)
pure virtual

Register DynamicType TypeObject.

Parameters
[in]dynamic_typeDynamicType to be registered.
[out]type_idsTypeIdentifierPair corresponding to the registered DynamicType TypeObject.
Returns
ReturnCode_t RETCODE_OK always.

The documentation for this class was generated from the following file: