25 #ifndef _DDS_XTYPES_DTYPE_HH 26 #define _DDS_XTYPES_DTYPE_HH 30 #include <dds/xtypes_typeobject.hh> 31 #include <dds/dds_typesupport.hh> 44 class DynamicTypeMember;
45 class DynamicTypeBuilder;
48 class DynamicDataReader;
49 class DynamicDataWriter;
51 DECLARE_CPP_UNBOUNDED_SEQ(
char *,
StringSeq );
52 DECLARE_CPP_UNBOUNDED_SEQ(
char *, IncludePathSeq );
53 DECLARE_CPP_UNBOUNDED_SEQ(
int, Int32Seq );
54 DECLARE_CPP_UNBOUNDED_SEQ( uint32_t, UInt32Seq );
55 DECLARE_CPP_UNBOUNDED_SEQ(
short, Int16Seq );
56 DECLARE_CPP_UNBOUNDED_SEQ(
unsigned short, UInt16Seq );
57 DECLARE_CPP_UNBOUNDED_SEQ( int64_t, Int64Seq );
58 DECLARE_CPP_UNBOUNDED_SEQ( uint64_t, UInt64Seq );
59 DECLARE_CPP_UNBOUNDED_SEQ(
float, Float32Seq );
60 DECLARE_CPP_UNBOUNDED_SEQ(
double, Float64Seq );
61 DECLARE_CPP_UNBOUNDED_SEQ(
char, CharSeq );
62 DECLARE_CPP_UNBOUNDED_SEQ( cdx_char32_t, WcharSeq );
63 DECLARE_CPP_UNBOUNDED_SEQ(
unsigned char, BooleanSeq );
64 DECLARE_CPP_UNBOUNDED_SEQ(
unsigned char, ByteSeq );
65 DECLARE_CPP_UNBOUNDED_SEQ( cdx_char32_t *, WstringSeq );
67 DDS_CPP_MAP_DECLARE(
char *,
char *, coredx_map_compare_string, Parameters);
68 DDS_CPP_MAP_DECLARE(
char *, DynamicTypeMember *, coredx_map_compare_string, DynamicTypeMembersByName);
69 DDS_CPP_MAP_DECLARE(MemberId, DynamicTypeMember *, coredx_map_compare_uint32, DynamicTypeMembersById);
115 virtual class DynamicType * get_primitive_type (
const TypeKind kind ) = 0;
154 virtual class DynamicTypeBuilder * create_type_w_type_object (
const struct TypeObject * type_object ) = 0;
213 const uint32_t bound ) = 0;
240 const BoundSeq * bound ) = 0;
266 const uint32_t bound ) = 0;
310 const char * type_name,
311 const IncludePathSeq * include_paths ) = 0;
342 const char * type_name,
343 const IncludePathSeq * include_paths ) = 0;
380 virtual class DynamicTypeBuilder * create_enumeration_type(
const uint32_t bound = 32 ) = 0;
450 const char * type_name ) = 0;
455 virtual const char * get_type_name ( ) = 0;
466 virtual TypeSupport * narrow ( ) = 0;
476 virtual DynamicData * create_dynamic_sample ( ) = 0;
479 virtual DataReader * alloc_datareader ( ) = 0;
480 virtual DataWriter * alloc_datawriter ( ) = 0;
500 Parameters parameters;
526 const char * key )
const;
538 const char * value );
553 unsigned char is_consistent ( )
const;
658 unsigned char is_consistent ( );
679 char * default_value;
681 UnionCaseLabelSeq label;
682 unsigned char default_label;
711 unsigned char is_consistent ( );
747 virtual uint32_t get_annotation_count ( ) = 0;
754 const uint32_t idx ) = 0;
767 virtual MemberId get_id ( ) = 0;
773 virtual const char * get_name ( ) = 0;
777 virtual MemberFlag get_flags ( ) = 0;
816 virtual const char * get_name ( ) = 0;
822 virtual TypeKind get_kind ( ) = 0;
836 const char * name ) = 0;
844 virtual ReturnCode_t get_all_members_by_name ( DynamicTypeMembersByName * member ) = 0;
858 const MemberId
id ) = 0;
866 virtual ReturnCode_t get_all_members ( DynamicTypeMembersById * member ) = 0;
872 virtual uint32_t get_annotation_count ( ) = 0;
879 const uint32_t idx ) = 0;
886 virtual unsigned char equals (
const class DynamicType * other ) = 0;
917 virtual ReturnCode_t apply_annotation_to_member (
const MemberId member_id,
931 virtual ReturnCode_t apply_flags_to_member (
const MemberId member_id,
932 const MemberFlag flags ) = 0;
987 virtual const char * get_name ( ) = 0;
994 virtual TypeKind get_kind ( ) = 0;
1008 const char * name )
const = 0;
1016 virtual ReturnCode_t get_all_members_by_name ( DynamicTypeMembersByName * member )
const = 0;
1030 const MemberId
id )
const = 0;
1038 virtual ReturnCode_t get_all_members ( DynamicTypeMembersById * member )
const = 0;
1044 virtual uint32_t get_annotation_count ( ) = 0;
1051 const uint32_t * idx ) = 0;
1058 virtual unsigned char equals (
const class DynamicType * other ) = 0;
1181 virtual const class DynamicType * get_type (
void ) = 0;
1190 const MemberId
id ) = 0;
1194 virtual ReturnCode_t set_descriptor (
const MemberId
id,
1209 virtual unsigned char equals (
const class DynamicData * other ) = 0;
1213 virtual MemberId get_member_id_by_name (
const char * name ) = 0;
1217 virtual MemberId get_member_id_at_index (
const uint32_t index ) = 0;
1239 virtual uint32_t get_item_count ( ) = 0;
1245 virtual ReturnCode_t get_name_by_id (
const char ** name_str,
1246 const MemberId
id ) = 0;
1283 virtual ReturnCode_t clear_value (
const MemberId
id ) = 0;
1301 virtual class DynamicData * loan_value (
const MemberId
id ) = 0;
1328 virtual ReturnCode_t get_int32_value ( int32_t * value,
1329 const MemberId
id ) = 0;
1340 virtual ReturnCode_t set_int32_value (
const MemberId
id,
1341 const int32_t value ) = 0;
1352 virtual ReturnCode_t get_uint32_value ( uint32_t * value,
1353 const MemberId
id ) = 0;
1364 virtual ReturnCode_t set_uint32_value (
const MemberId
id,
1365 const uint32_t value ) = 0;
1377 const MemberId
id ) = 0;
1388 virtual ReturnCode_t set_int16_value (
const MemberId
id,
1389 const short value ) = 0;
1400 virtual ReturnCode_t get_uint16_value (
unsigned short * value,
1401 const MemberId
id ) = 0;
1412 virtual ReturnCode_t set_uint16_value (
const MemberId
id,
1413 const unsigned short value ) = 0;
1424 virtual ReturnCode_t get_int64_value ( int64_t * value,
1425 const MemberId
id ) = 0;
1436 virtual ReturnCode_t set_int64_value (
const MemberId
id,
1437 const int64_t value ) = 0;
1448 virtual ReturnCode_t get_uint64_value ( uint64_t * value,
1449 const MemberId
id ) = 0;
1460 virtual ReturnCode_t set_uint64_value (
const MemberId
id,
1461 const uint64_t value ) = 0;
1472 virtual ReturnCode_t get_float32_value (
float * value,
1473 const MemberId
id ) = 0;
1484 virtual ReturnCode_t set_float32_value (
const MemberId
id,
1485 const float value ) = 0;
1496 virtual ReturnCode_t get_float64_value (
double * value,
1497 const MemberId
id ) = 0;
1508 virtual ReturnCode_t set_float64_value (
const MemberId
id,
1509 const double value ) = 0;
1521 const MemberId
id ) = 0;
1532 virtual ReturnCode_t set_char8_value (
const MemberId
id,
1533 const char value ) = 0;
1544 virtual ReturnCode_t get_char32_value ( cdx_char32_t * value,
1545 const MemberId
id ) = 0;
1556 virtual ReturnCode_t set_char32_value (
const MemberId
id,
1557 const cdx_char32_t value ) = 0;
1568 virtual ReturnCode_t get_byte_value (
unsigned char * value,
1569 const MemberId
id ) = 0;
1580 virtual ReturnCode_t set_byte_value (
const MemberId
id,
1581 const unsigned char value ) = 0;
1592 virtual ReturnCode_t get_boolean_value (
unsigned char * value,
1593 const MemberId
id ) = 0;
1604 virtual ReturnCode_t set_boolean_value (
const MemberId
id,
1605 const unsigned char value ) = 0;
1616 virtual ReturnCode_t get_string_value (
char * * value,
1617 const MemberId
id ) = 0;
1628 virtual ReturnCode_t set_string_value (
const MemberId
id,
1629 const char * value ) = 0;
1640 virtual ReturnCode_t get_wstring_value ( cdx_char32_t * * value,
1641 const MemberId
id ) = 0;
1652 virtual ReturnCode_t set_wstring_value (
const MemberId
id,
1653 const cdx_char32_t * value ) = 0;
1665 const MemberId
id ) = 0;
1676 virtual ReturnCode_t set_complex_value (
const MemberId
id,
1682 virtual ReturnCode_t get_int32_values ( Int32Seq * value,
1683 const MemberId
id ) = 0;
1688 virtual ReturnCode_t set_int32_values (
const MemberId
id,
1689 const Int32Seq * value ) = 0;
1694 virtual ReturnCode_t get_uint32_values ( UInt32Seq * value,
1695 const MemberId
id ) = 0;
1700 virtual ReturnCode_t set_uint32_values (
const MemberId
id,
1701 const UInt32Seq * value ) = 0;
1706 virtual ReturnCode_t get_int16_values ( Int16Seq * value,
1707 const MemberId
id ) = 0;
1712 virtual ReturnCode_t set_int16_values (
const MemberId
id,
1713 const Int16Seq * value ) = 0;
1718 virtual ReturnCode_t get_uint16_values ( UInt16Seq * value,
1719 const MemberId
id ) = 0;
1724 virtual ReturnCode_t set_uint16_values (
const MemberId
id,
1725 const UInt16Seq * value ) = 0;
1730 virtual ReturnCode_t get_int64_values ( Int64Seq * value,
1731 const MemberId
id ) = 0;
1736 virtual ReturnCode_t set_int64_values (
const MemberId
id,
1737 const Int64Seq * value ) = 0;
1742 virtual ReturnCode_t get_uint64_values ( UInt64Seq * value,
1743 const MemberId
id ) = 0;
1748 virtual ReturnCode_t set_uint64_values (
const MemberId
id,
1749 const UInt64Seq * value ) = 0;
1754 virtual ReturnCode_t get_float32_values ( Float32Seq * value,
1755 const MemberId
id ) = 0;
1760 virtual ReturnCode_t set_float32_values (
const MemberId
id,
1761 const Float32Seq * value ) = 0;
1766 virtual ReturnCode_t get_float64_values ( Float64Seq * value,
1767 const MemberId
id ) = 0;
1772 virtual ReturnCode_t set_float64_values (
const MemberId
id,
1773 const Float64Seq * value ) = 0;
1778 virtual ReturnCode_t get_char8_values ( CharSeq * value,
1779 const MemberId
id ) = 0;
1784 virtual ReturnCode_t set_char8_values (
const MemberId
id,
1785 const CharSeq * value ) = 0;
1790 virtual ReturnCode_t get_char32_values ( WcharSeq * value,
1791 const MemberId
id ) = 0;
1796 virtual ReturnCode_t set_char32_values (
const MemberId
id,
1797 const WcharSeq * value ) = 0;
1802 virtual ReturnCode_t get_byte_values ( ByteSeq * value,
1803 const MemberId
id ) = 0;
1808 virtual ReturnCode_t set_byte_values (
const MemberId
id,
1809 const ByteSeq * value ) = 0;
1814 virtual ReturnCode_t get_boolean_values ( BooleanSeq * value,
1815 const MemberId
id ) = 0;
1820 virtual ReturnCode_t set_boolean_values (
const MemberId
id,
1821 const BooleanSeq * value ) = 0;
1827 const MemberId
id ) = 0;
1832 virtual ReturnCode_t set_string_values (
const MemberId
id,
1838 virtual ReturnCode_t get_wstring_values ( WstringSeq * value,
1839 const MemberId
id ) = 0;
1844 virtual ReturnCode_t set_wstring_values (
const MemberId
id,
1845 const WstringSeq * value ) = 0;
1851 TypeObject * DynamicType_to_TypeObject(
DynamicType * dt);
class DynamicType * base_type
the 'base_type' of this type
Definition: xtypes_dtype.hh:588
A DynamicData object represents an individual data sample. It provides reflective getters and setters...
Definition: xtypes_dtype.hh:1167
long ReturnCode_t
Definition: dds.hh:208
BoundSeq bound
The bound property indicates the bound of collection and similar types.
Definition: xtypes_dtype.hh:608
The DataWriter entity provides an interface for the application to publish (write) data...
Definition: dds.hh:2233
The DomainParticipant is used to configure, create and destroy Publisher, Subscriber and Topic object...
Definition: dds.hh:1087
An instance of DynamicType represent a type’s schema: its physical name, kind, member definitions (i...
Definition: xtypes_dtype.hh:963
Sequence data type.
Definition: dds_seq.hh:61
A AnnotationDescriptor object comprises the state of an annotation as it is applied to some element...
Definition: xtypes_dtype.hh:490
DDS::TypeObject * TypecodeQosPolicy_to_typeobject(TypecodeQosPolicy *tc_qos)
Helper function to get DDS::TypeObject from a discovered (or otherwise obtained) TypeCode byte buffer...
The Subscriber configures, creates, manages and destroys DataReaders.
Definition: dds.hh:1797
A TypeDescriptor comprises the state of a type.
Definition: xtypes_dtype.hh:561
TopicDescription is an abstract 'class' that provides the foundation for Topic, ContentFilteredTopic...
Definition: dds.hh:2010
TypeKind kind
the 'kind' of this type
Definition: xtypes_dtype.hh:572
The DataReaderListener provides asynchronous notification of DataReader events.
Definition: dds.hh:3399
An instance of this type is responsible for creating DynamicType and DynamicTypeSupport objects...
Definition: xtypes_dtype.hh:78
This type is responsible for creating DynamicData instances.
Definition: xtypes_dtype.hh:1068
The DataReader entity allows the application to subscribe to and read data.
Definition: dds.hh:2520
A MemberDescriptor comprises the state of a DynamicTypeMember.
Definition: xtypes_dtype.hh:667
Typecode representing the datatype a DataReader reads or a DataWriter writes.
Definition: dds_builtin.hh:1404
Topic is the basic description of data to be published or subscribed.
Definition: dds.hh:2051
Provides the DDS infrastructure.
Definition: dds_builtin_basic.hh:27
class DynamicType * discriminator_type
If this descriptor represents a union type, this field indicates the type of the discriminator of the...
Definition: xtypes_dtype.hh:592
class DynamicType * element_type
If this descriptor represents an array, sequence, or string type, this property indicates the element...
Definition: xtypes_dtype.hh:622
class DynamicType * type
Definition: xtypes_dtype.hh:505
DDS::sequence< char * > StringSeq
sequence of character pointers (c strings)
Definition: dds.hh:262
Structure that holds DataWriter Quality of Service policies.
Definition: dds.hh:619
unsigned long StatusMask
Definition: dds.hh:217
The DataWriterListener provides asynchronous notification of DataWriter events.
Definition: dds.hh:3298
Structure that holds DataReader Quality of Service policies.
Definition: dds.hh:704
ObjectName name
the 'name' of this type
Definition: xtypes_dtype.hh:575
The Publisher configures, creates, manages and destroys DataWriters.
Definition: dds.hh:1588
A DynamicTypeBuilder object represents the state of a particular type defined according to the Type S...
Definition: xtypes_dtype.hh:795
A DynamicTypeMember represents a "member" of a type. A "member" in this sense may be a member of an a...
Definition: xtypes_dtype.hh:723
class DynamicType * key_element_type
If this descriptor represents a map type, this property indicates the value element type of the map...
Definition: xtypes_dtype.hh:630
The DynamicTypeSupport interface extends the TypeSupport interface defined by the DDS specification...
Definition: xtypes_dtype.hh:411