CoreDX DDS C++ Reference Manual
Public Member Functions | Public Attributes | List of all members
DDS::TypeDescriptor Class Reference

A TypeDescriptor comprises the state of a type. More...

Public Member Functions

 TypeDescriptor ()
 
ReturnCode_t copy_from (const class TypeDescriptor *other)
 Overwrite the contents of this descriptor with those of another descriptor. More...
 
unsigned char equals (const class TypeDescriptor *other)
 Compare two TypeDescriptor's. More...
 
unsigned char is_consistent ()
 Indicates whether the states of all of this descriptor’s properties are consistent. More...
 

Public Attributes

TypeKind kind
 the 'kind' of this type
 
ObjectName name
 the 'name' of this type
 
class DynamicTypebase_type
 the 'base_type' of this type More...
 
class DynamicTypediscriminator_type
 If this descriptor represents a union type, this field indicates the type of the discriminator of the union.
 
BoundSeq bound
 The bound property indicates the bound of collection and similar types. More...
 
class DynamicTypeelement_type
 If this descriptor represents an array, sequence, or string type, this property indicates the element type of the collection. More...
 
class DynamicTypekey_element_type
 If this descriptor represents a map type, this property indicates the value element type of the map. More...
 

Detailed Description

A TypeDescriptor comprises the state of a type.

Constructor & Destructor Documentation

DDS::TypeDescriptor::TypeDescriptor ( )

Constructor, Copy Constructor, Destructor, Assignment operator

Member Function Documentation

ReturnCode_t DDS::TypeDescriptor::copy_from ( const class TypeDescriptor other)

Overwrite the contents of this descriptor with those of another descriptor.

Subsequent calls to equals, passing the same argument as to this method, return true. The other descriptor shall not be changed by this operation.

Return values
RETCODE_BAD_PARAMETERin the case of an invalid parameter
RETCODE_ERRORin the case of any other error
unsigned char DDS::TypeDescriptor::equals ( const class TypeDescriptor other)

Compare two TypeDescriptor's.

Two type descriptors are considered equal if and only if the values of all of the properties identified in the table above are equal in each of them.

unsigned char DDS::TypeDescriptor::is_consistent ( )

Indicates whether the states of all of this descriptor’s properties are consistent.

The definitions of consistency for each property are given in the section corresponding to that property.

Return values
non-zeroif descriptor is consistent
zeroif descriptor is not consistent

Member Data Documentation

class DynamicType* DDS::TypeDescriptor::base_type

the 'base_type' of this type

  • If this descriptor represents a structure type, base_type indicates the supertype of that type. A nil value of this property indicates that the structure type has no supertype.
  • If this descriptor represents an alias type, base_type indicates the type being aliased. A nil value for this property is not considered consistent.

In all other cases, a consistent descriptor shall have a nil value for this property.

BoundSeq DDS::TypeDescriptor::bound

The bound property indicates the bound of collection and similar types.

  • If this descriptor represents an array type, the length of the property value indicates the number of dimensions in the array, and each value indicates the bound of the corresponding dimension.
  • If this descriptor represents a sequence, map, bit set, or string type, the length of the property value is one and the integral value in that property indicates the bound of the collection.

In all other cases, a consistent descriptor shall have a nil value for this property.

class DynamicType* DDS::TypeDescriptor::element_type

If this descriptor represents an array, sequence, or string type, this property indicates the element type of the collection.

It must not be nil for the descriptor to be consistent. If this descriptor represents a map type, this property indicates the value element type of the map. It must not be nil for the descriptor to be consistent.

If this descriptor represents a bit set type, this property must indicate a Boolean type for the descriptor to be consistent.

If this descriptor represents any other kind of type, this property must be nil for the descriptor to be consistent.

class DynamicType* DDS::TypeDescriptor::key_element_type

If this descriptor represents a map type, this property indicates the value element type of the map.

It must not be nil for the descriptor to be consistent.

If this descriptor represents any other kind of type, this property must be nil for the descriptor to be consistent.


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