CoreDX Data Distribution Service
The High Performance, Small Footprint DDS from Twin Oaks Computing, Inc
DynamicTypeBuilder Class Reference

A DynamicTypeBuilder object represents the state of a particular type defined according to the Type System. It is used to instantiate concrete DynamicType objects. More...

Inherits DynamicTypeBuilder.

Public Member Functions

ReturnCode_t get_descriptor (ref DDS_TypeDescriptor descriptor)
 This operation provides a summary of the state of this type. More...
 
String get_name ()
 This convenience operation provides the fully qualified name of this type. I. More...
 
short get_kind ()
 This convenience operation indicates the kind of this type (e.g., integer, structure, etc.). More...
 
ReturnCode_t get_member_by_name (ref DDS_DynamicTypeMember member, String name)
 This operation accesses a member by name. More...
 
ReturnCode_t get_all_members_by_name (ref Dictionary< String, DDS_DynamicTypeMember > member)
 This operation provides access to the 'members_by_name' map. More...
 
ReturnCode_t get_member (ref DDS_DynamicTypeMember member, uint id)
 This operation accesses a member by id. More...
 
ReturnCode_t get_all_members (ref Dictionary< uint, DDS_DynamicTypeMember > members)
 This operation provides access to the 'members_by_id' map. More...
 
uint get_annotation_count ()
 Return the number of annotations applied to this type. More...
 
ReturnCode_t get_annotation (ref DDS_AnnotationDescriptor descriptor, uint idx)
 Access an annotation at the specified index. On success, the 'descriptor' parameter is set to the annotation. More...
 
bool equals (DDS_DynamicType other)
 Two types shall be considered equal if and only if all of their respective properties are equal. More...
 
ReturnCode_t add_member (DDS_MemberDescriptor descriptor)
 Add a member to the type. More...
 
ReturnCode_t apply_annotation (DDS_AnnotationDescriptor descriptor)
 Apply the given annotation to this type. More...
 
ReturnCode_t apply_annotation_to_member (uint member_id, DDS_AnnotationDescriptor descriptor)
 Apply the given annotation to the specified member of the type of DynamicTypeBuilder. More...
 
DDS_DynamicType build ()
 Create an immutable DynamicType object defined by the builder's current state. More...
 

Detailed Description

A DynamicTypeBuilder object represents the state of a particular type defined according to the Type System. It is used to instantiate concrete DynamicType objects.

See also
DynamicType
DynamicTypeBuilderFactory
DynamicTypeSupport

Member Function Documentation

◆ add_member()

ReturnCode_t add_member ( DDS_MemberDescriptor  descriptor)
inline

Add a member to the type.

Return values
RETCODE_PRECONDITION_NOT_METif the type does not have members or a member with the same id already exists
RETCODE_BAD_PARAMETERin the case of an invalid parameter
RETCODE_OUT_OF_RESOURCESin the case of a memory shortage
RETCODE_OKon success

◆ apply_annotation()

ReturnCode_t apply_annotation ( DDS_AnnotationDescriptor  descriptor)
inline

Apply the given annotation to this type.

Parameter descriptor - A consistent descriptor for the annotation to apply.

Return values
RETCODE_BAD_PARAMETERIf this 'descriptor' parameter is not consistent
Note
This operation is implemented only for the builtin annotation ''.

◆ apply_annotation_to_member()

ReturnCode_t apply_annotation_to_member ( uint  member_id,
DDS_AnnotationDescriptor  descriptor 
)
inline

Apply the given annotation to the specified member of the type of DynamicTypeBuilder.

Parameter member_id - The id of the member to manipulate. Parameter descriptor - A consistent descriptor of the annotation to apply.

Return values
RETCODE_BAD_PARAMETERIf this 'descriptor' parameter is not consistent
DDS_RETCODE_BAD_PARAMETERIf member_id does not identify a member in 'dtb'
Note
This operation is implemented only for the builtin annotations '' and ''.

◆ build()

DDS_DynamicType build ( )
inline

Create an immutable DynamicType object defined by the builder's current state.

Subsequent changes to this builder, if any, shall have no effect on the state of any previously created DynamicType.

Return values
nilin the case of an error

◆ equals()

bool equals ( DDS_DynamicType  other)
inline

Two types shall be considered equal if and only if all of their respective properties are equal.

Return values
zeroif not equal
non-zeroif equal

◆ get_all_members()

ReturnCode_t get_all_members ( ref Dictionary< uint, DDS_DynamicTypeMember >  members)
inline

This operation provides access to the 'members_by_id' map.

Return values
RETCODE_PRECONDITION_NOT_METif the type does not have members
RETCODE_BAD_PARAMETERin the case of an invalid parameter
DDRETCODE_OKon success

◆ get_all_members_by_name()

ReturnCode_t get_all_members_by_name ( ref Dictionary< String, DDS_DynamicTypeMember >  member)
inline

This operation provides access to the 'members_by_name' map.

Return values
RETCODE_PRECONDITION_NOT_METif the type does not have members
RETCODE_BAD_PARAMETERin the case of an invalid parameter
RETCODE_OKon success

◆ get_annotation()

ReturnCode_t get_annotation ( ref DDS_AnnotationDescriptor  descriptor,
uint  idx 
)
inline

Access an annotation at the specified index. On success, the 'descriptor' parameter is set to the annotation.

Not Yet Supported:
This operation is not yet implemented.

◆ get_annotation_count()

uint get_annotation_count ( )
inline

Return the number of annotations applied to this type.

Return values
uintthe number of annotations
Not Yet Supported:
This operation is not yet implemented.

◆ get_descriptor()

ReturnCode_t get_descriptor ( ref DDS_TypeDescriptor  descriptor)
inline

This operation provides a summary of the state of this type.

It overwrites the state of the application-provided 'descriptor' object.

Return values
RETCODE_BAD_PARAMETERif the descriptor parameter is invalid
RETCODE_OKon success

◆ get_kind()

short get_kind ( )
inline

This convenience operation indicates the kind of this type (e.g., integer, structure, etc.).

Its result shall be the same as the kind indicated by the type’s descriptor property.

◆ get_member()

ReturnCode_t get_member ( ref DDS_DynamicTypeMember  member,
uint  id 
)
inline

This operation accesses a member by id.

Several types are considered to have 'members"

  • structures, unions, enumerations, annotations, and bitsets

On success, the 'member' parameter is set to the member that has a matching member id.

Return values
RETCODE_PRECONDITION_NOT_METif the type does not have members
RETCODE_BAD_PARAMETERin the case of an invalid parameter
RETCODE_ERRORif the member id is not present in the type
RETCODE_OKon success

◆ get_member_by_name()

ReturnCode_t get_member_by_name ( ref DDS_DynamicTypeMember  member,
String  name 
)
inline

This operation accesses a member by name.

Several types are considered to have 'members"

  • structures, unions, enumerations, annotations, and bitsets

On success, the 'member' parameter is set to the named member.

Return values
RETCODE_PRECONDITION_NOT_METif the type does not have members
RETCODE_BAD_PARAMETERin the case of an invalid parameter
RETCODE_ERRORif the named member is not present in the type
RETCODE_OKon success

◆ get_name()

String get_name ( )
inline

This convenience operation provides the fully qualified name of this type. I.

t shall be identical to the name string that is a member of the descriptor property.


© 2009-2020 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.