11 #ifndef RTIREFLEX_DD_EXTRA_H
12 #define RTIREFLEX_DD_EXTRA_H
15 #include "ndds/ndds_cpp.h"
22 #define SET_SEQUENCE_DECL(DDS_SEQ_TYPE) \
23 REFLEX_DLL_EXPORT DDS_ReturnCode_t set_sequence(DDS_DynamicData &instance, \
24 const MemberAccess & ma, \
25 const DDS_SEQ_TYPE &value);
27 #define GET_SEQUENCE_DECL(DDS_SEQ_TYPE) \
28 REFLEX_DLL_EXPORT DDS_ReturnCode_t get_sequence(const DDS_DynamicData & instance, \
30 const MemberAccess & ma);
32 #define SET_ARRAY_DECL(BASIC_TYPE) \
33 REFLEX_DLL_EXPORT DDS_ReturnCode_t set_array(DDS_DynamicData &instance, \
34 const MemberAccess & ma, \
35 DDS_UnsignedLong length, \
36 const BASIC_TYPE *array);
38 #define GET_ARRAY_DECL(BASIC_TYPE) \
39 REFLEX_DLL_EXPORT DDS_ReturnCode_t get_array(const DDS_DynamicData & instance, \
41 DDS_UnsignedLong *length, \
42 const MemberAccess & ma);
57 REFLEX_DLL_EXPORT void check_exception_code(
const char * message, DDS_ExceptionCode_t ex);
71 bool access_by_id()
const;
72 bool access_by_name()
const;
74 const char * get_name()
const;
75 MemberAccess operator + (
int i)
const;
77 static MemberAccess BY_ID(
int id);
78 static MemberAccess BY_NAME(
const char *name = 0);
85 DDS_DynamicData *outer_;
86 DDS_DynamicData *inner_;
89 DDS_DynamicData * outer_;
90 DDS_DynamicData * inner_;
92 SafeBinder(SafeBinder &);
93 SafeBinder& operator = (SafeBinder &);
98 SafeBinder(
const DDS_DynamicData & outer,
99 DDS_DynamicData & inner,
100 const char * member_name,
103 SafeBinder(
const DDS_DynamicData & outer,
104 DDS_DynamicData & inner,
105 const MemberAccess &ma);
107 ~SafeBinder() throw();
109 SafeBinder(proxy p) throw();
111 void swap(SafeBinder & sb) throw();
113 SafeBinder & operator = (proxy p) throw();
115 operator proxy () throw();
117 friend SafeBinder move(SafeBinder & sb) throw();
184 static DDS_ReturnCode_t set_array(
185 DDS_DynamicData &instance,
186 const MemberAccess & ma,
187 DDS_UnsignedLong length,
190 if (ma.access_by_id())
191 return instance.set_long_array(
195 reinterpret_cast<const DDS_Long *
>(array));
197 return instance.set_long_array(
199 DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED,
201 reinterpret_cast<const DDS_Long *
>(array));
205 static DDS_ReturnCode_t get_array(
206 const DDS_DynamicData & instance,
208 DDS_UnsignedLong *length,
209 const MemberAccess &ma)
211 if (ma.access_by_id())
212 return instance.get_long_array(
213 reinterpret_cast<DDS_Long *>(array),
218 return instance.get_long_array(
219 reinterpret_cast<DDS_Long *>(array),
222 DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED);
226 DDS_DynamicData & seq,
235 #ifndef REFLEX_NO_HEADER_ONLY
236 #include "reflex/../../src/dd_extra.cxx"
240 #endif // RTIREFLEX_DD_EXTRA_H
void swap(AutoDynamicData &lhs, AutoDynamicData &rhs)
Swap the contents of two AutoDynamicData instances. Never throws.
Definition: auto_dd.cxx:106
#define REFLEX_DLL_EXPORT
Definition: dllexport.h:35
unsigned char octet_t
Definition: dd_extra.h:48