| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
DynamicTypeBuilder Class Referenceabstract

`#include <DynamicTypeBuilder.hpp>`

Inheritance diagram for DynamicTypeBuilder:
[legend]

## Public Types

using | _ref_type = typename traits<DynamicTypeBuilder>::ref_type

## Public Member Functions

virtual FASTDDS_EXPORTED_API ReturnCode_t | get_descriptor (traits< TypeDescriptor >::ref_type &descriptor)=0
| Provides a summary of the state of this type overwriting a provided object.
virtual FASTDDS_EXPORTED_API ObjectName | get_name ()=0
| Returns the fully qualified name of this type.
virtual FASTDDS_EXPORTED_API TypeKind | get_kind ()=0
| Returns the TypeKind associated.
virtual FASTDDS_EXPORTED_API ReturnCode_t | get_member_by_name (traits< DynamicTypeMember >::ref_type &member, const ObjectName &name)=0
| Returns a member looked for by name.
virtual FASTDDS_EXPORTED_API ReturnCode_t | get_all_members_by_name (DynamicTypeMembersByName &member)=0
| Returns all members sorted by name.
virtual FASTDDS_EXPORTED_API ReturnCode_t | get_member (traits< DynamicTypeMember >::ref_type &member, MemberId id)=0
| Returns a member looked for by MemberId.
virtual FASTDDS_EXPORTED_API ReturnCode_t | get_all_members (DynamicTypeMembersById &member)=0
| Returns all members sorted by MemberId.
virtual FASTDDS_EXPORTED_API uint32_t | get_member_count ()=0
| This operation returns the current number of members.
virtual FASTDDS_EXPORTED_API ReturnCode_t | get_member_by_index (traits< DynamicTypeMember >::ref_type &member, uint32_t index)=0
| This operation returns the member that corresponds to the specified index.
virtual FASTDDS_EXPORTED_API uint32_t | get_annotation_count ()=0
| This operation returns the current number of annotations to the type.
virtual FASTDDS_EXPORTED_API ReturnCode_t | get_annotation (traits< AnnotationDescriptor >::ref_type &descriptor, uint32_t idx)=0
| This operation returns the annotation that corresponds to the specified index.
virtual FASTDDS_EXPORTED_API bool | equals (traits< DynamicType >::ref_type other)=0
| Compares current state against a DynamicType reference.
virtual FASTDDS_EXPORTED_API ReturnCode_t | add_member (traits< MemberDescriptor >::ref_type descriptor)=0
| Adds a 'member' to this type, where the new 'member' has the meaning defined in the specification of the DynamicTypeMember class.
virtual FASTDDS_EXPORTED_API ReturnCode_t | apply_annotation (traits< AnnotationDescriptor >::ref_type descriptor)=0
| Apply the given annotation to this type.
virtual FASTDDS_EXPORTED_API ReturnCode_t | apply_annotation_to_member (MemberId member_id, traits< AnnotationDescriptor >::ref_type descriptor)=0
| Apply the given annotation to a member of this type.
virtual FASTDDS_EXPORTED_API traits< DynamicType >::ref_type | build ()=0
| Create an immutable DynamicType object containing a snapshot of this builder's current state.

## Protected Member Functions

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

## Member Typedef Documentation

## ◆ _ref_type

using _ref_type = typename traits<DynamicTypeBuilder>::ref_type

## Constructor & Destructor Documentation

## ◆ DynamicTypeBuilder()

DynamicTypeBuilder | ( |  | ) |

protected default

## ◆ ~DynamicTypeBuilder()

virtual ~DynamicTypeBuilder | ( |  | ) |

protected virtual default

## Member Function Documentation

## ◆ _this()

traits< DynamicTypeBuilder >::ref_type _this | ( |  | ) |

protected

## ◆ add_member()

virtual FASTDDS_EXPORTED_API ReturnCode_t add_member | ( | traits< MemberDescriptor >::ref_type | descriptor | ) |

pure virtual

Adds a 'member' to this type, where the new 'member' has the meaning defined in the specification of the DynamicTypeMember class.

Parameters

  [in] | descriptor | MemberDescriptor reference used for the new member.

Returns
  ReturnCode_t

Return values

  RETCODE_OK | when the member was created successfully.
  RETCODE_BAD_PARAMETER | when there is an inconsistency.
  RETCODE_PRECONDITION_NOT_MET | when the type does not have members.

## ◆ apply_annotation()

virtual FASTDDS_EXPORTED_API ReturnCode_t apply_annotation | ( | traits< AnnotationDescriptor >::ref_type | descriptor | ) |

pure virtual

Apply the given annotation to this type.

Parameters

  [in] | descriptor | AnnotationDescriptor reference to be applied.

Returns
  ReturnCode_t

Return values

  RETCODE_OK | when the annotation was applied successful.
  RETCODE_BAD_PARAMETER | when there is an inconsistency.

## ◆ apply_annotation_to_member()

virtual FASTDDS_EXPORTED_API ReturnCode_t apply_annotation_to_member | ( | MemberId | member_id,
|  | traits< AnnotationDescriptor >::ref_type | descriptor )

pure virtual

Apply the given annotation to a member of this type.

Parameters

  [in] | member_id | Member identifier.
  [in] | descriptor | AnnotationDescriptor reference to be applied.

Returns
  ReturnCode_t

Return values

  RETCODE_OK | when the annotation was applied successful.
  RETCODE_BAD_PARAMETER | when there is an inconsistency.

## ◆ build()

virtual FASTDDS_EXPORTED_API traits< DynamicType >::ref_type build | ( |  | ) |

pure virtual

Create an immutable DynamicType object containing a snapshot of this builder's current state.

Returns
  DynamicType reference.

## ◆ equals()

virtual FASTDDS_EXPORTED_API bool equals | ( | traits< DynamicType >::ref_type | other | ) |

pure virtual

Compares current state against a DynamicType reference.

Parameters

  [in] | other | DynamicType reference to compare to.

Returns
  bool true on equality

## ◆ get_all_members()

virtual FASTDDS_EXPORTED_API ReturnCode_t get_all_members | ( | DynamicTypeMembersById & | member | ) |

pure virtual

Returns all members sorted by MemberId.

Parameters

  [in,out] | member | DynamicTypeMemberById reference used to return all members.

Returns
  ReturnCode_t

Return values

  RETCODE_OK | always.

## ◆ get_all_members_by_name()

virtual FASTDDS_EXPORTED_API ReturnCode_t get_all_members_by_name | ( | DynamicTypeMembersByName & | member | ) |

pure virtual

Returns all members sorted by name.

Parameters

  [in,out] | member | DynamicTypeMemberByName reference used to return all members.

Returns
  ReturnCode_t

Return values

  RETCODE_OK | always.

## ◆ get_annotation()

virtual FASTDDS_EXPORTED_API ReturnCode_t get_annotation | ( | traits< AnnotationDescriptor >::ref_type & | descriptor,
|  | uint32_t | idx )

pure virtual

This operation returns the annotation that corresponds to the specified index.

Parameters

  [in,out] | descriptor | AnnotationDescriptor reference where information is copied.
  [in] | idx | Index

Returns
  ReturnCode_t

Return values

  RETCODE_OK | when member was found.
  RETCODE_BAD_PARAMETER | when reference is nil or index is out-of-range.

## ◆ get_annotation_count()

virtual FASTDDS_EXPORTED_API uint32_t get_annotation_count | ( |  | ) |

pure virtual

This operation returns the current number of annotations to the type.

Returns
  Current number of annotations

## ◆ get_descriptor()

virtual FASTDDS_EXPORTED_API ReturnCode_t get_descriptor | ( | traits< TypeDescriptor >::ref_type & | descriptor | ) |

pure virtual

Provides a summary of the state of this type overwriting a provided object.

Parameters

  [in,out] | descriptor | TypeDescriptor

Returns
  ReturnCode_t

Return values

  RETCODE_OK | when the copy was successful.
  RETCODE_BAD_PARAMETER | when descriptor reference is nil.

## ◆ get_kind()

virtual FASTDDS_EXPORTED_API TypeKind get_kind | ( |  | ) |

pure virtual

Returns the TypeKind associated.

Returns
  TypeKind

## ◆ get_member()

virtual FASTDDS_EXPORTED_API ReturnCode_t get_member | ( | traits< DynamicTypeMember >::ref_type & | member,
|  | MemberId | id )

pure virtual

Returns a member looked for by MemberId.

Parameters

  [in,out] | member | DynamicTypeMember reference used to return the member.
  [in] | id | Member identifier.

Returns
  ReturnCode_t

Return values

  RETCODE_OK | when member was found.
  RETCODE_BAD_PARAMETER | when member wasn't found.

## ◆ get_member_by_index()

virtual FASTDDS_EXPORTED_API ReturnCode_t get_member_by_index | ( | traits< DynamicTypeMember >::ref_type & | member,
|  | uint32_t | index )

pure virtual

This operation returns the member that corresponds to the specified index.

Parameters

  [in,out] | member | DynamicTypeMember reference used to return the member.
  [in] | index | Index

Returns
  ReturnCode_t

Return values

  RETCODE_OK | when member was found.
  RETCODE_BAD_PARAMETER | when index is out-of-range.

## ◆ get_member_by_name()

virtual FASTDDS_EXPORTED_API ReturnCode_t get_member_by_name | ( | traits< DynamicTypeMember >::ref_type & | member,
|  | const ObjectName & | name )

pure virtual

Returns a member looked for by name.

Parameters

  [in,out] | member | DynamicTypeMember reference used to return the member.
  [in] | name | Member name.

Returns
  ReturnCode_t

Return values

  RETCODE_OK | when member was found.
  RETCODE_BAD_PARAMETER | when member wasn't found.

## ◆ get_member_count()

virtual FASTDDS_EXPORTED_API uint32_t get_member_count | ( |  | ) |

pure virtual

This operation returns the current number of members.

Returns
  Current number of members

## ◆ get_name()

virtual FASTDDS_EXPORTED_API ObjectName get_name | ( |  | ) |

pure virtual

Returns the fully qualified name of this type.

Returns
  Type name.

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

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