Fast RTPS  Version 2.14.1
Fast RTPS
Loading...
Searching...
No Matches
DynamicTypeBuilder Class Reference

#include <DynamicTypeBuilder.h>

Public Member Functions

RTPS_DllAPI ReturnCode_t add_empty_member (uint32_t index, const std::string &name)
 
RTPS_DllAPI ReturnCode_t add_member (const MemberDescriptor *descriptor)
 
RTPS_DllAPI ReturnCode_t add_member (MemberId id, const std::string &name, DynamicTypeBuilder *type_=nullptr)
 
RTPS_DllAPI ReturnCode_t add_member (MemberId id, const std::string &name, DynamicTypeBuilder *type_, const std::string &defaultValue)
 
RTPS_DllAPI ReturnCode_t add_member (MemberId id, const std::string &name, DynamicTypeBuilder *type_, const std::string &defaultValue, const std::vector< uint64_t > &unionLabels, bool isDefaultLabel)
 
RTPS_DllAPI ReturnCode_t add_member (MemberId id, const std::string &name, DynamicType_ptr type_=DynamicType_ptr(nullptr))
 
RTPS_DllAPI ReturnCode_t add_member (MemberId id, const std::string &name, DynamicType_ptr type_, const std::string &defaultValue)
 
RTPS_DllAPI ReturnCode_t add_member (MemberId id, const std::string &name, DynamicType_ptr type_, const std::string &defaultValue, const std::vector< uint64_t > &unionLabels, bool isDefaultLabel)
 
RTPS_DllAPI ReturnCode_t apply_annotation (AnnotationDescriptor &descriptor)
 
RTPS_DllAPI ReturnCode_t apply_annotation (const std::string &annotation_name, const std::string &key, const std::string &value)
 
RTPS_DllAPI ReturnCode_t apply_annotation_to_member (MemberId id, AnnotationDescriptor &descriptor)
 
RTPS_DllAPI ReturnCode_t apply_annotation_to_member (MemberId id, const std::string &annotation_name, const std::string &key, const std::string &value)
 
RTPS_DllAPI DynamicType_ptr build ()
 
RTPS_DllAPI ReturnCode_t copy_from (const DynamicTypeBuilder *other)
 
ReturnCode_t get_all_members (std::map< MemberId, DynamicTypeMember * > &members)
 
RTPS_DllAPI TypeKind get_kind () const
 
RTPS_DllAPI std::string get_name () const
 
RTPS_DllAPI MemberId get_member_id_by_name (const std::string &name) const
 
const TypeDescriptorget_type_descriptor () const
 
bool is_consistent () const
 
bool is_discriminator_type () const
 
RTPS_DllAPI ReturnCode_t set_name (const std::string &name)
 

Protected Member Functions

 DynamicTypeBuilder ()
 
 DynamicTypeBuilder (const DynamicTypeBuilder *builder)
 
 DynamicTypeBuilder (const TypeDescriptor *descriptor)
 
virtual ~DynamicTypeBuilder ()
 
ReturnCode_t _apply_annotation_to_member (MemberId id, AnnotationDescriptor &descriptor)
 
ReturnCode_t _apply_annotation_to_member (MemberId id, const std::string &annotation_name, const std::string &key, const std::string &value)
 
bool check_union_configuration (const MemberDescriptor *descriptor)
 
bool exists_member_by_name (const std::string &name) const
 
void refresh_member_ids ()
 
void clear ()
 
ReturnCode_t copy_from_builder (const DynamicTypeBuilder *other)
 

Protected Attributes

TypeDescriptordescriptor_
 
std::map< MemberId, DynamicTypeMember * > member_by_id_
 
std::map< std::string, DynamicTypeMember * > member_by_name_
 
std::string name_
 
TypeKind kind_
 
MemberId current_member_id_
 
uint32_t max_index_
 

Friends

class DynamicType
 
class DynamicTypeBuilderFactory
 

Constructor & Destructor Documentation

◆ DynamicTypeBuilder() [1/3]

DynamicTypeBuilder ( )
protected

◆ DynamicTypeBuilder() [2/3]

DynamicTypeBuilder ( const DynamicTypeBuilder builder)
protected

◆ DynamicTypeBuilder() [3/3]

DynamicTypeBuilder ( const TypeDescriptor descriptor)
protected

◆ ~DynamicTypeBuilder()

virtual ~DynamicTypeBuilder ( )
protectedvirtual

Member Function Documentation

◆ _apply_annotation_to_member() [1/2]

ReturnCode_t _apply_annotation_to_member ( MemberId  id,
AnnotationDescriptor descriptor 
)
protected

◆ _apply_annotation_to_member() [2/2]

ReturnCode_t _apply_annotation_to_member ( MemberId  id,
const std::string &  annotation_name,
const std::string &  key,
const std::string &  value 
)
protected

◆ add_empty_member()

RTPS_DllAPI ReturnCode_t add_empty_member ( uint32_t  index,
const std::string &  name 
)

◆ add_member() [1/7]

RTPS_DllAPI ReturnCode_t add_member ( const MemberDescriptor descriptor)

◆ add_member() [2/7]

RTPS_DllAPI ReturnCode_t add_member ( MemberId  id,
const std::string &  name,
DynamicType_ptr  type_,
const std::string &  defaultValue 
)

◆ add_member() [3/7]

RTPS_DllAPI ReturnCode_t add_member ( MemberId  id,
const std::string &  name,
DynamicType_ptr  type_,
const std::string &  defaultValue,
const std::vector< uint64_t > &  unionLabels,
bool  isDefaultLabel 
)

◆ add_member() [4/7]

RTPS_DllAPI ReturnCode_t add_member ( MemberId  id,
const std::string &  name,
DynamicType_ptr  type_ = DynamicType_ptr(nullptr) 
)

◆ add_member() [5/7]

RTPS_DllAPI ReturnCode_t add_member ( MemberId  id,
const std::string &  name,
DynamicTypeBuilder type_,
const std::string &  defaultValue 
)

◆ add_member() [6/7]

RTPS_DllAPI ReturnCode_t add_member ( MemberId  id,
const std::string &  name,
DynamicTypeBuilder type_,
const std::string &  defaultValue,
const std::vector< uint64_t > &  unionLabels,
bool  isDefaultLabel 
)

◆ add_member() [7/7]

RTPS_DllAPI ReturnCode_t add_member ( MemberId  id,
const std::string &  name,
DynamicTypeBuilder type_ = nullptr 
)

◆ apply_annotation() [1/2]

RTPS_DllAPI ReturnCode_t apply_annotation ( AnnotationDescriptor descriptor)

◆ apply_annotation() [2/2]

RTPS_DllAPI ReturnCode_t apply_annotation ( const std::string &  annotation_name,
const std::string &  key,
const std::string &  value 
)

◆ apply_annotation_to_member() [1/2]

RTPS_DllAPI ReturnCode_t apply_annotation_to_member ( MemberId  id,
AnnotationDescriptor descriptor 
)

◆ apply_annotation_to_member() [2/2]

RTPS_DllAPI ReturnCode_t apply_annotation_to_member ( MemberId  id,
const std::string &  annotation_name,
const std::string &  key,
const std::string &  value 
)

◆ build()

RTPS_DllAPI DynamicType_ptr build ( )

◆ check_union_configuration()

bool check_union_configuration ( const MemberDescriptor descriptor)
protected

◆ clear()

void clear ( )
protected

◆ copy_from()

RTPS_DllAPI ReturnCode_t copy_from ( const DynamicTypeBuilder other)

◆ copy_from_builder()

ReturnCode_t copy_from_builder ( const DynamicTypeBuilder other)
protected

◆ exists_member_by_name()

bool exists_member_by_name ( const std::string &  name) const
protected

◆ get_all_members()

ReturnCode_t get_all_members ( std::map< MemberId, DynamicTypeMember * > &  members)

◆ get_kind()

RTPS_DllAPI TypeKind get_kind ( ) const
inline

◆ get_member_id_by_name()

RTPS_DllAPI MemberId get_member_id_by_name ( const std::string &  name) const

◆ get_name()

RTPS_DllAPI std::string get_name ( ) const

◆ get_type_descriptor()

const TypeDescriptor * get_type_descriptor ( ) const
inline

◆ is_consistent()

bool is_consistent ( ) const

◆ is_discriminator_type()

bool is_discriminator_type ( ) const

◆ refresh_member_ids()

void refresh_member_ids ( )
protected

◆ set_name()

RTPS_DllAPI ReturnCode_t set_name ( const std::string &  name)

Friends And Related Symbol Documentation

◆ DynamicType

friend class DynamicType
friend

◆ DynamicTypeBuilderFactory

friend class DynamicTypeBuilderFactory
friend

Member Data Documentation

◆ current_member_id_

MemberId current_member_id_
protected

◆ descriptor_

TypeDescriptor* descriptor_
protected

◆ kind_

TypeKind kind_
protected

◆ max_index_

uint32_t max_index_
protected

◆ member_by_id_

std::map<MemberId, DynamicTypeMember*> member_by_id_
protected

◆ member_by_name_

std::map<std::string, DynamicTypeMember*> member_by_name_
protected

◆ name_

std::string name_
protected

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