| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
DynamicTypeBuilderFactory Class Referenceabstract

`#include <DynamicTypeBuilderFactory.hpp>`

Inheritance diagram for DynamicTypeBuilderFactory:
[legend]

## 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 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 void | set_preprocessor (const std::string &preprocessor)=0
| Sets the path to the preprocessor executable to be used when parsing type descriptions.
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 | ( |  | ) |

protected default

## ◆ ~DynamicTypeBuilderFactory()

virtual ~DynamicTypeBuilderFactory | ( |  | ) |

protected virtual default

## 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_type | DynamicType reference which becomes the element type
  [in] | bound | uint32_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] | bound | uint32_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_type | DynamicType reference which becomes the map's key type
  [in] | element_type | DynamicType reference which becomes the map's value type
  [in] | bound | uint32_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_type | DynamicType reference which becomes the element type
  [in] | bound | uint32_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] | bound | uint32_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] | descriptor | TypeDescriptor 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] | type | DynamicType 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] | document | containing the type description.
  [in] | type_name | Fully qualified name of the type to be loaded from the string.
  [in] | include_paths | A 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 TypeObject instance.

Parameters

  [in] | type_object | 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.

Parameters

  [in] | document_url | pointing to the url containing the type description.
  [in] | type_name | Fully qualified name of the type to be loaded from the document.
  [in] | include_paths | A 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] | bound | uint32_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()

FASTDDS_EXPORTED_API ReturnCode_t delete_instance | ( |  | ) |

static

Resets the singleton reference.

Returns
  ReturnCode_t

Return values

  RETCODE_BAD_PARAMETER | if singleton reference is currently nil.
  RETCODE_OK | otherwise.

## ◆ 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] | type | DynamicType reference whose internal cached reference to reset.

Returns
  standard ReturnCode_t

Return values

  RETCODE_OK | is always returned.

## ◆ get_instance()

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] | kind | Type identifying the primitive type to retrieve.

Returns
  DynamicType reference. Nil reference returned in error case.

## ◆ set_preprocessor()

virtual FASTDDS_EXPORTED_API void set_preprocessor | ( | const std::string & | preprocessor | ) |

pure virtual

Sets the path to the preprocessor executable to be used when parsing type descriptions.

Parameters

  [in] | preprocessor | path to the preprocessor executable.

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

- include/fastdds/dds/xtypes/dynamic_types/DynamicTypeBuilderFactory.hpp