Fast DDS  Version 3.1.2
Fast DDS
Loading...
Searching...
No Matches
DynamicTypeBuilderFactory Class Referenceabstract

#include <DynamicTypeBuilderFactory.hpp>

Inheritance diagram for DynamicTypeBuilderFactory:

Public Types

using _ref_type = typename traits< DynamicTypeBuilderFactory >::ref_type
 

Public Member Functions

virtual FASTDDS_EXPORTED_API traits< DynamicType >::ref_type get_primitive_type (TypeKind kind)=0
 Retrieves the cached DynamicType reference associated to a given primitive.
 
virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_type (traits< TypeDescriptor >::ref_type descriptor)=0
 Creates a new DynamicTypeBuilder reference based on the given TypeDescriptor state.
 
virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_type_copy (traits< DynamicType >::ref_type type)=0
 Creates a new DynamicTypeBuilder reference based on the given DynamicType reference.
 
virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_type_w_type_object (const xtypes::TypeObject &type_object)=0
 Creates a new DynamicTypeBuilder reference based on the given xtypes::TypeObject instance.
 
virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_string_type (uint32_t bound)=0
 Creates a new DynamicTypeBuilder reference representing a bounded string type.
 
virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_wstring_type (uint32_t bound)=0
 Creates a new DynamicTypeBuilder reference representing a bounded wstring type.
 
virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_sequence_type (traits< DynamicType >::ref_type element_type, uint32_t bound)=0
 Creates a new DynamicTypeBuilder reference representing a sequence.
 
virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_array_type (traits< DynamicType >::ref_type element_type, const BoundSeq &bound)=0
 Creates a new DynamicTypeBuilder reference representing an array.
 
virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_map_type (traits< DynamicType >::ref_type key_element_type, traits< DynamicType >::ref_type element_type, uint32_t bound)=0
 Creates a new DynamicTypeBuilder reference representing a map.
 
virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_bitmask_type (uint32_t bound)=0
 Creates a new DynamicTypeBuilder reference representing a bitmask.
 
virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_type_w_uri (const std::string &document_url, const std::string &type_name, const IncludePathSeq &include_paths)=0
 Creates a new DynamicTypeBuilder reference by parsing the type description at the given URL.
 
virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_type_w_document (const std::string &document, const std::string &type_name, const IncludePathSeq &include_paths)=0
 Creates a new DynamicTypeBuilder reference by parsing the type description contained in the given string.
 
virtual FASTDDS_EXPORTED_API ReturnCode_t delete_type (traits< DynamicType >::ref_type &type)=0
 Resets the internal reference if it is cached.
 

Static Public Member Functions

static FASTDDS_EXPORTED_API traits< DynamicTypeBuilderFactory >::ref_type get_instance ()
 Returns the singleton factory object.
 
static FASTDDS_EXPORTED_API ReturnCode_t delete_instance ()
 Resets the singleton reference.
 

Protected Member Functions

 DynamicTypeBuilderFactory ()=default
 
virtual ~DynamicTypeBuilderFactory ()=default
 
traits< DynamicTypeBuilderFactory >::ref_type _this ()
 

Member Typedef Documentation

◆ _ref_type

using _ref_type = typename traits<DynamicTypeBuilderFactory>::ref_type

Constructor & Destructor Documentation

◆ DynamicTypeBuilderFactory()

DynamicTypeBuilderFactory ( )
protecteddefault

◆ ~DynamicTypeBuilderFactory()

virtual ~DynamicTypeBuilderFactory ( )
protectedvirtualdefault

Member Function Documentation

◆ _this()

traits< DynamicTypeBuilderFactory >::ref_type _this ( )
protected

◆ create_array_type()

virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_array_type ( traits< DynamicType >::ref_type  element_type,
const BoundSeq bound 
)
pure virtual

Creates a new DynamicTypeBuilder reference representing an array.

Parameters
[in]element_typeDynamicType reference which becomes the element type
[in]bounduint32_t sequence representing the desired dimensions.
Returns
new DynamicTypeBuilder reference. Nil reference returned in error case.

◆ create_bitmask_type()

virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_bitmask_type ( uint32_t  bound)
pure virtual

Creates a new DynamicTypeBuilder reference representing a bitmask.

Parameters
[in]bounduint32_t representing the maximum number of elements that may be stored.
Returns
new DynamicTypeBuilder reference. Nil reference returned in error case.

◆ create_map_type()

virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_map_type ( traits< DynamicType >::ref_type  key_element_type,
traits< DynamicType >::ref_type  element_type,
uint32_t  bound 
)
pure virtual

Creates a new DynamicTypeBuilder reference representing a map.

Parameters
[in]key_element_typeDynamicType reference which becomes the map's key type
[in]element_typeDynamicType reference which becomes the map's value type
[in]bounduint32_t representing the maximum number of elements that may be stored. If the value is equal to LENGTH_UNLIMITED, the map type shall be considered to be unbounded.
Returns
new DynamicTypeBuilder reference. Nil reference returned in error case.

◆ create_sequence_type()

virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_sequence_type ( traits< DynamicType >::ref_type  element_type,
uint32_t  bound 
)
pure virtual

Creates a new DynamicTypeBuilder reference representing a sequence.

Parameters
[in]element_typeDynamicType reference which becomes the element type
[in]bounduint32_t representing the maximum number of elements that may be stored. If the value is equal to LENGTH_UNLIMITED, the sequence type shall be considered to be unbounded.
Returns
new DynamicTypeBuilder reference. Nil reference returned in error case.

◆ create_string_type()

virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_string_type ( uint32_t  bound)
pure virtual

Creates a new DynamicTypeBuilder reference representing a bounded string type.

Parameters
[in]bounduint32_t representing the maximum number of elements that may be stored. If the value is equal to LENGTH_UNLIMITED, the string type shall be considered to be unbounded.
Returns
new DynamicTypeBuilder reference.

◆ create_type()

virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_type ( traits< TypeDescriptor >::ref_type  descriptor)
pure virtual

Creates a new DynamicTypeBuilder reference based on the given TypeDescriptor state.

Parameters
[in]descriptorTypeDescriptor to be copied.
Returns
New DynamicTypeBuilder reference. Nil reference returned in error case.

◆ create_type_copy()

virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_type_copy ( traits< DynamicType >::ref_type  type)
pure virtual

Creates a new DynamicTypeBuilder reference based on the given DynamicType reference.

Parameters
[in]typeDynamicType reference to be used.
Returns
New DynamicTypeBuilder reference. Nil reference returned in error case.

◆ create_type_w_document()

virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_type_w_document ( const std::string &  document,
const std::string &  type_name,
const IncludePathSeq include_paths 
)
pure virtual

Creates a new DynamicTypeBuilder reference by parsing the type description contained in the given string.

Remarks
Not implemented yet.
Parameters
[in]documentcontaining the type description.
[in]type_nameFully qualified name of the type to be loaded from the string.
[in]include_pathsA collection of URLs to directories to be searched for additional type description documents.
Returns
new DynamicTypeBuilder reference. Nil reference returned in error case.

◆ create_type_w_type_object()

virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_type_w_type_object ( const xtypes::TypeObject type_object)
pure virtual

Creates a new DynamicTypeBuilder reference based on the given xtypes::TypeObject instance.

Parameters
[in]type_objectxtypes::TypeObject instance to be used.
Returns
New DynamicTypeBuilder reference. Nil reference returned in error case.

◆ create_type_w_uri()

virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_type_w_uri ( const std::string &  document_url,
const std::string &  type_name,
const IncludePathSeq include_paths 
)
pure virtual

Creates a new DynamicTypeBuilder reference by parsing the type description at the given URL.

Remarks
Not implemented yet.
Parameters
[in]document_urlpointing to the url containing the type description.
[in]type_nameFully qualified name of the type to be loaded from the document.
[in]include_pathsA collection of URLs to directories to be searched for additional type description documents.
Returns
new DynamicTypeBuilder reference. Nil reference returned in error case.

◆ create_wstring_type()

virtual FASTDDS_EXPORTED_API traits< DynamicTypeBuilder >::ref_type create_wstring_type ( uint32_t  bound)
pure virtual

Creates a new DynamicTypeBuilder reference representing a bounded wstring type.

Parameters
[in]bounduint32_t representing the maximum number of elements that may be stored. If the value is equal to LENGTH_UNLIMITED, the wstring type shall be considered to be unbounded.
Returns
new DynamicTypeBuilder reference.

◆ delete_instance()

static FASTDDS_EXPORTED_API ReturnCode_t delete_instance ( )
static

Resets the singleton reference.

Returns
ReturnCode_t
Return values
RETCODE_BAD_PARAMETERif singleton reference is currently nil.
RETCODE_OKotherwise.

◆ delete_type()

virtual FASTDDS_EXPORTED_API ReturnCode_t delete_type ( traits< DynamicType >::ref_type &  type)
pure virtual

Resets the internal reference if it is cached.

Parameters
[in]typeDynamicType reference whose internal cached reference to reset.
Returns
standard ReturnCode_t
Return values
RETCODE_OKis always returned.

◆ get_instance()

static FASTDDS_EXPORTED_API traits< DynamicTypeBuilderFactory >::ref_type get_instance ( )
static

Returns the singleton factory object.

Remarks
This method is non thread-safe.
Returns
DynamicTypeBuilderFactory reference.

◆ get_primitive_type()

virtual FASTDDS_EXPORTED_API traits< DynamicType >::ref_type get_primitive_type ( TypeKind  kind)
pure virtual

Retrieves the cached DynamicType reference associated to a given primitive.

Parameters
[in]kindType identifying the primitive type to retrieve.
Returns
DynamicType reference. Nil reference returned in error case.

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