CoreDX Data Distribution Service
The High Performance, Small Footprint DDS from Twin Oaks Computing, Inc
|
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 uint32_t | get_annotation_count ()=0 |
Return the number of annotations applied to this type. More... | |
virtual ReturnCode_t | get_annotation (class AnnotationDescriptor *descriptor, const uint32_t 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 ReturnCode_t | apply_annotation_to_member (const MemberId member_id, const class AnnotationDescriptor *descriptor)=0 |
Apply the given annotation to the specified member of the type of DynamicTypeBuilder. More... | |
virtual ReturnCode_t | apply_flags_to_member (const MemberId member_id, const MemberFlag flags)=0 |
Modify the flags (KEY, OPTIONAL, etc) of the specified member. More... | |
virtual class DynamicType * | build ()=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 () | |
A DynamicTypeBuilder object represents the state of a particular type defined according to the Type System. It is used to instantiate concrete DynamicType objects.
|
protected |
Constructor, Copy Constructor, Destructor, Assignment operator
|
pure virtual |
Add a member to the type.
RETCODE_PRECONDITION_NOT_MET | if the type does not have members or a member with the same id already exists |
RETCODE_BAD_PARAMETER | in the case of an invalid parameter |
RETCODE_OUT_OF_RESOURCES | in the case of a memory shortage |
RETCODE_OK | on success |
|
pure virtual |
Apply the given annotation to this type.
Parameter descriptor - A consistent descriptor for the annotation to apply.
RETCODE_BAD_PARAMETER | If this 'descriptor' parameter is not consistent |
|
pure virtual |
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.
RETCODE_BAD_PARAMETER | If this 'descriptor' parameter is not consistent |
DDS_RETCODE_BAD_PARAMETER | If member_id does not identify a member in 'dtb' |
|
pure virtual |
Modify the flags (KEY, OPTIONAL, etc) of the specified member.
This is a convenience function. The same effect can be achieved by constructing an annotation and applying it to the member. (See DynamicTypeBuilder::apply_annotation_to_member.) This sets the internal state of the member to the logical OR of the existing state and the provided 'flags' parameter. The valid flags are: DDS::IS_KEY, DDS::IS_OPTIONAL, and DDS::MUST_UNDERSTAND.
DDS_RETCODE_BAD_PARAMETER | in the case of an invalid parameter |
DDS_RETCODE_OK | on success |
|
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.
nil | in the case of an error |
|
pure virtual |
Destroy the type information contained in this DynamicTypeBuilder instance.
RETCODE_BAD_PARAMETER | in the case of an invalid parameter |
RETCODE_OK | on success |
|
pure virtual |
Two types shall be considered equal if and only if all of their respective properties are equal.
zero | if not equal |
non-zero | if equal |
|
pure virtual |
This operation provides access to the 'members_by_id' map.
RETCODE_PRECONDITION_NOT_MET | if the type does not have members |
RETCODE_BAD_PARAMETER | in the case of an invalid parameter |
DDRETCODE_OK | on success |
|
pure virtual |
This operation provides access to the 'members_by_name' map.
RETCODE_PRECONDITION_NOT_MET | if the type does not have members |
RETCODE_BAD_PARAMETER | in the case of an invalid parameter |
RETCODE_OK | on success |
|
pure virtual |
Access an annotation at the specified index. On success, the 'descriptor' parameter is set to the annotation.
|
pure virtual |
Return the number of annotations applied to this type.
uint | the number of annotations |
|
pure virtual |
This operation provides a summary of the state of this type.
It overwrites the state of the application-provided 'descriptor' object.
RETCODE_BAD_PARAMETER | if the descriptor parameter is invalid |
RETCODE_OK | on success |
|
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.
|
pure virtual |
This operation accesses a member by id.
Several types are considered to have 'members"
On success, the 'member' parameter is set to the member that has a matching member id.
RETCODE_PRECONDITION_NOT_MET | if the type does not have members |
RETCODE_BAD_PARAMETER | in the case of an invalid parameter |
RETCODE_ERROR | if the member id is not present in the type |
RETCODE_OK | on success |
|
pure virtual |
This operation accesses a member by name.
Several types are considered to have 'members"
On success, the 'member' parameter is set to the named member.
RETCODE_PRECONDITION_NOT_MET | if the type does not have members |
RETCODE_BAD_PARAMETER | in the case of an invalid parameter |
RETCODE_ERROR | if the named member is not present in the type |
RETCODE_OK | on success |
|
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.