CoreDX DDS C++ Reference Manual
Public Member Functions | Protected Member Functions | List of all members
DDS::DynamicTypeBuilder Class Referenceabstract

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...

Public Member Functions

virtual ReturnCode_t get_descriptor (class TypeDescriptor *descriptor)=0
 This operation provides a summary of the state of this type. More...
 
virtual const char * get_name ()=0
 This convenience operation provides the fully qualified name of this type. I. More...
 
virtual TypeKind get_kind ()=0
 This convenience operation indicates the kind of this type (e.g., integer, structure, etc.). More...
 
virtual ReturnCode_t get_member_by_name (class DynamicTypeMember **member, const char *name)=0
 This operation accesses a member by name. More...
 
virtual ReturnCode_t get_all_members_by_name (DynamicTypeMembersByName *member)=0
 This operation provides access to the 'members_by_name' map. More...
 
virtual ReturnCode_t get_member (class DynamicTypeMember **member, const MemberId id)=0
 This operation accesses a member by id. More...
 
virtual ReturnCode_t get_all_members (DynamicTypeMembersById *member)=0
 This operation provides access to the 'members_by_id' map. More...
 
virtual unsigned int get_annotation_count ()=0
 Return the number of annotations applied to this type. More...
 
virtual ReturnCode_t get_annotation (class AnnotationDescriptor *descriptor, const unsigned int idx)=0
 Access an annotation at the specified index. On success, the 'descriptor' parameter is set to the annotation. More...
 
virtual unsigned char equals (const class DynamicType *other)=0
 Two types shall be considered equal if and only if all of their respective properties are equal. More...
 
virtual ReturnCode_t add_member (const class MemberDescriptor *descriptor)=0
 Add a member to the type. More...
 
virtual ReturnCode_t apply_annotation (const class AnnotationDescriptor *descriptor)=0
 Apply the given annotation to this type. More...
 
virtual class DynamicTypebuild ()=0
 Create an immutable DynamicType object defined by the builder's current state. More...
 
virtual ReturnCode_t delete_type (class DynamicType *type)=0
 Destroy the type information contained in this DynamicTypeBuilder instance. More...
 

Protected Member Functions

 DynamicTypeBuilder ()
 

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

Constructor & Destructor Documentation

DDS::DynamicTypeBuilder::DynamicTypeBuilder ( )
protected

Constructor, Copy Constructor, Destructor, Assignment operator

Member Function Documentation

virtual ReturnCode_t DDS::DynamicTypeBuilder::add_member ( const class MemberDescriptor descriptor)
pure virtual

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
virtual ReturnCode_t DDS::DynamicTypeBuilder::apply_annotation ( const class AnnotationDescriptor descriptor)
pure virtual

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
Not Yet Supported:
This operation is not yet implemented.
virtual class DynamicType* DDS::DynamicTypeBuilder::build ( )
pure virtual

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
virtual ReturnCode_t DDS::DynamicTypeBuilder::delete_type ( class DynamicType type)
pure virtual

Destroy the type information contained in this DynamicTypeBuilder instance.

Return values
RETCODE_BAD_PARAMETERin the case of an invalid parameter
RETCODE_OKon success
virtual unsigned char DDS::DynamicTypeBuilder::equals ( const class DynamicType other)
pure virtual

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
virtual ReturnCode_t DDS::DynamicTypeBuilder::get_all_members ( DynamicTypeMembersById *  member)
pure virtual

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
virtual ReturnCode_t DDS::DynamicTypeBuilder::get_all_members_by_name ( DynamicTypeMembersByName *  member)
pure virtual

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
virtual ReturnCode_t DDS::DynamicTypeBuilder::get_annotation ( class AnnotationDescriptor descriptor,
const unsigned int  idx 
)
pure virtual

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.
virtual unsigned int DDS::DynamicTypeBuilder::get_annotation_count ( )
pure virtual

Return the number of annotations applied to this type.

Return values
uintthe number of annotations
Not Yet Supported:
This operation is not yet implemented.
virtual ReturnCode_t DDS::DynamicTypeBuilder::get_descriptor ( class TypeDescriptor descriptor)
pure virtual

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
virtual TypeKind DDS::DynamicTypeBuilder::get_kind ( )
pure virtual

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.

virtual ReturnCode_t DDS::DynamicTypeBuilder::get_member ( class DynamicTypeMember **  member,
const MemberId  id 
)
pure virtual

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
virtual ReturnCode_t DDS::DynamicTypeBuilder::get_member_by_name ( class DynamicTypeMember **  member,
const char *  name 
)
pure virtual

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
virtual const char* DDS::DynamicTypeBuilder::get_name ( )
pure virtual

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-2017 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.