OpenDDS  Snapshot(2023/04/28-20:55)
DynamicDataBase.cpp
Go to the documentation of this file.
1 /*
2  * Distributed under the OpenDDS License.
3  * See: http://www.opendds.org/license.html
4  */
5 
6 #include <DCPS/DdsDcps_pch.h>
7 
8 #ifndef OPENDDS_SAFETY_PROFILE
9 # include "DynamicDataBase.h"
10 
11 # include "Utils.h"
12 # include "DynamicDataFactory.h"
13 
14 # include <dds/DCPS/debug.h>
15 # include <dds/DCPS/ValueHelper.h>
16 # include <dds/DCPS/DCPS_Utils.h>
17 
19 
20 namespace OpenDDS {
21 namespace XTypes {
22 
23 using DCPS::LogLevel;
24 using DCPS::log_level;
26 
27 namespace {
28  DDS::TypeDescriptor_var get_type_desc(DDS::DynamicType_ptr type)
29  {
30  if (!type && log_level >= LogLevel::Warning) {
31  ACE_ERROR((LM_WARNING, "(%P|%t) WARNING: DynamicDataBase: "
32  "Passed null DynamicType pointer\n"));
33  return DDS::TypeDescriptor_var();
34  }
35  DDS::TypeDescriptor_var td;
36  const DDS::ReturnCode_t rc = type->get_descriptor(td);
38  const CORBA::String_var name = type->get_name();
39  ACE_ERROR((LM_WARNING, "(%P|%t) WARNING: DynamicDataBase: "
40  "Failed to get type descriptor for %C\n", name.in()));
41  }
42  return td;
43  }
44 }
45 
47 {
48 }
49 
50 DynamicDataBase::DynamicDataBase(DDS::DynamicType_ptr type)
51  : type_(get_base_type(type))
52  , type_desc_(get_type_desc(type_))
53 {}
54 
56 {
57  // Operations defined in IDL interfaces don't use pointer-to-const
58  // parameter types.
59  return const_cast<DynamicDataBase*>(this);
60 }
61 
63 {
64  DDS::DynamicTypeMember_var dtm;
65  const DDS::ReturnCode_t rc = type_->get_member(dtm, id);
66  if (rc != DDS::RETCODE_OK) {
67  return rc;
68  }
69  return dtm->get_descriptor(value);
70 }
71 
73  DDS::MemberId /*id*/, DDS::MemberDescriptor* /*value*/)
74 {
75  return unsupported_method("DynamicData::set_descriptor");
76 }
77 
79 {
80  const TypeKind tk = type_->get_kind();
81  switch (tk) {
82  case TK_BOOLEAN:
83  case TK_BYTE:
84  case TK_INT16:
85  case TK_INT32:
86  case TK_INT64:
87  case TK_UINT16:
88  case TK_UINT32:
89  case TK_UINT64:
90  case TK_FLOAT32:
91  case TK_FLOAT64:
92  case TK_FLOAT128:
93  case TK_INT8:
94  case TK_UINT8:
95  case TK_CHAR8:
96  case TK_CHAR16:
97  case TK_ENUM:
98  return MEMBER_ID_INVALID;
99  case TK_STRING8:
100  case TK_STRING16:
101  case TK_SEQUENCE:
102  case TK_ARRAY:
103  // Elements of string, sequence, array must be accessed by index.
104  return MEMBER_ID_INVALID;
105  case TK_MAP:
106  // Values in map can be accessed by strings which is converted from map keys.
107  // But need to find out how this conversion works. In the meantime, only allow
108  // accessing map using index.
109  return MEMBER_ID_INVALID;
110  case TK_BITMASK:
111  case TK_STRUCTURE:
112  case TK_UNION: {
113  DDS::DynamicTypeMember_var member;
114  if (type_->get_member_by_name(member, name) != DDS::RETCODE_OK) {
115  return MEMBER_ID_INVALID;
116  }
117  DDS::MemberDescriptor_var descriptor;
118  if (member->get_descriptor(descriptor) != DDS::RETCODE_OK) {
119  return MEMBER_ID_INVALID;
120  }
121  if (tk == TK_BITMASK) {
122  // Bitmask's flags don't have ID, so use index instead.
123  return descriptor->index();
124  } else {
125  return descriptor->id();
126  }
127  }
128  }
129  if (log_level >= LogLevel::Notice) {
130  ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: DynamicDataBase::get_member_id_by_name:"
131  " Calling on an unexpected type %C\n", typekind_to_string(tk)));
132  }
133  return MEMBER_ID_INVALID;
134 }
135 
136 bool DynamicDataBase::is_type_supported(TypeKind tk, const char* func_name)
137 {
138  if (!is_basic(tk)) {
139  if (log_level >= LogLevel::Notice) {
140  ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: DynamicDataBase::is_type_supported:"
141  " Called function %C on an unsupported type (%C)\n",
142  func_name, typekind_to_string(tk)));
143  }
144  return false;
145  }
146  return true;
147 }
148 
150  ACE_CDR::ULong bound) const
151 {
152  // The mapping from id to index must be consistent with get_member_id_at_index
153  // for these types. In particular, index and id are equal given that it doesn't
154  // go out of bound.
155  switch (type_->get_kind()) {
156  case TK_STRING8:
157  case TK_STRING16:
158  case TK_SEQUENCE:
159  case TK_MAP:
160  if (bound == 0 || id < bound) {
161  index = id;
162  return true;
163  }
164  break;
165  case TK_BITMASK:
166  case TK_ARRAY:
167  if (id < bound) {
168  index = id;
169  return true;
170  }
171  }
172  return false;
173 }
174 
176 {
177  DDS::DynamicType_var mtype;
178  DDS::ReturnCode_t rc = get_member_type(mtype, type_, id);
179  if (rc != DDS::RETCODE_OK || mtype->get_kind() != TK_ENUM) {
180  return false;
181  }
182  DDS::Int32 valAsInt;
183  rc = get_enum_value(valAsInt, mtype, this, id);
184  if (rc != DDS::RETCODE_OK) {
185  return false;
186  }
187  DDS::String8_var valAsStr;
188  rc = get_enumerator_name(valAsStr, valAsInt, mtype);
189  if (rc != DDS::RETCODE_OK) {
190  return false;
191  }
192  CORBA::string_free(strInOut);
193  strInOut = valAsStr._retn();
194  return true;
195 }
196 
198  DDS::MemberDescriptor_var& md, DDS::DynamicType_var& type,
199  const char* method, const char* action, DDS::MemberId id, DDS::TypeKind tk)
200 {
202  switch (type_->get_kind()) {
203  case TK_STRING8:
204  case TK_STRING16:
205  case TK_SEQUENCE:
206  case TK_ARRAY:
207  case TK_MAP:
208  type = get_base_type(type_desc_->element_type());
209  break;
210  case TK_BITMASK:
211  case TK_STRUCTURE:
212  case TK_UNION:
213  rc = get_descriptor(md, id);
214  if (rc != DDS::RETCODE_OK) {
215  return rc;
216  }
217  type = get_base_type(md->type());
218  if (!type) {
219  return DDS::RETCODE_ERROR;
220  }
221  break;
222  default:
224  }
225 
226  const TypeKind type_kind = type->get_kind();
227  TypeKind cmp_type_kind = type_kind;
228  switch (type_kind) {
229  case TK_ENUM:
230  rc = enum_bound(type, cmp_type_kind);
231  if (rc != DDS::RETCODE_OK) {
232  return rc;
233  }
234  break;
235  case TK_BITMASK:
236  rc = bitmask_bound(type, cmp_type_kind);
237  if (rc != DDS::RETCODE_OK) {
238  return rc;
239  }
240  break;
241  }
242 
243  bool invalid_tk = true;
244  if (is_basic(cmp_type_kind)) {
245  invalid_tk = cmp_type_kind != tk;
246  } else if (tk == TK_NONE) {
247  invalid_tk = !is_complex(type_kind);
248  }
249  if (invalid_tk) {
250  if (log_level >= LogLevel::Notice) {
251  const CORBA::String_var member_name = md->name();
252  const CORBA::String_var type_name = type_->get_name();
253  ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: %C: "
254  "trying to %C %C.%C id %u kind %C (%C) as an invalid kind %C\n",
255  method, action, type_name.in(), member_name.in(), id,
256  typekind_to_string(cmp_type_kind), typekind_to_string(type_kind),
257  typekind_to_string(tk)));
258  }
260  }
261  return DDS::RETCODE_OK;
262 }
263 
265 {
266  //FUTURE: non-zero defaults for union discriminators are not currently represented
267  // in the MemberDescriptors created by converting CompleteTypeObject to DynamicType.
268  // When they are supported, change disc_default below to a value derived from the
269  // 'type' parameter. Note that 64-bit discriminators are not represented in TypeObject.
270  static const ACE_CDR::Long disc_default = 0;
271  DDS::MemberId default_branch = MEMBER_ID_INVALID;
272  const ACE_CDR::ULong members = type->get_member_count();
273  for (ACE_CDR::ULong i = 0; i < members; ++i) {
274  DDS::DynamicTypeMember_var member;
275  if (type->get_member_by_index(member, i) != DDS::RETCODE_OK) {
276  return MEMBER_ID_INVALID;
277  }
278  if (member->get_id() == DISCRIMINATOR_ID) {
279  continue;
280  }
281  DDS::MemberDescriptor_var mdesc;
282  if (member->get_descriptor(mdesc) != DDS::RETCODE_OK) {
283  return MEMBER_ID_INVALID;
284  }
285  if (mdesc->is_default_label()) {
286  default_branch = mdesc->id();
287  } else {
288  const DDS::UnionCaseLabelSeq& lseq = mdesc->label();
289  for (ACE_CDR::ULong lbl = 0; lbl < lseq.length(); ++lbl) {
290  if (lseq[lbl] == disc_default) {
291  return mdesc->id();
292  }
293  }
294  }
295  }
296  // Reaching this point means that there is no explicit label for the default
297  // value of the discriminator. If there is a default branch, its member is
298  // selected. Otherwise the 'MEMBER_ID_INVALID' constant is returned.
299  return default_branch;
300 }
301 
303  bool& found_selected_member, DDS::MemberDescriptor_var& selected_md) const
304 {
305  found_selected_member = false;
306  bool has_default = false;
308  DDS::MemberDescriptor_var default_md;
309  for (DDS::UInt32 i = 0; i < type_->get_member_count(); ++i) {
310  DDS::DynamicTypeMember_var dtm;
311  rc = type_->get_member_by_index(dtm, i);
312  if (rc != DDS::RETCODE_OK) {
313  return rc;
314  }
315  if (dtm->get_id() == DISCRIMINATOR_ID) {
316  continue;
317  }
318  DDS::MemberDescriptor_var md;
319  rc = dtm->get_descriptor(md);
320  if (rc != DDS::RETCODE_OK) {
321  return rc;
322  }
323  bool found_matched_label = false;
324  const DDS::UnionCaseLabelSeq labels = md->label();
325  for (DDS::UInt32 j = 0; !found_matched_label && j < labels.length(); ++j) {
326  if (disc == labels[j]) {
327  found_matched_label = true;
328  }
329  }
330  if (found_matched_label) {
331  selected_md = md;
332  found_selected_member = true;
333  break;
334  }
335  if (md->is_default_label()) {
336  default_md = md;
337  has_default = true;
338  }
339  }
340  if (!found_selected_member && has_default) {
341  selected_md = default_md;
342  found_selected_member = true;
343  }
344  return rc;
345 }
346 
348  bool& found_selected_member, DDS::MemberDescriptor_var& selected_md)
349 {
350  // TODO: Support UInt64 and Int64 (https://issues.omg.org/issues/DDSXTY14-36)
351  DDS::Int64 i64_disc;
353  if (rc != DDS::RETCODE_OK) {
354  return rc;
355  }
356  if (i64_disc < ACE_INT32_MIN || i64_disc > ACE_INT32_MAX) {
357  if (log_level >= LogLevel::Notice) {
358  ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: DynamicDataBase::get_selected_union_branch: "
359  "union discriminator can't fit in int32: %q\n", i64_disc));
360  }
361  return DDS::RETCODE_ERROR;
362  }
363  return get_selected_union_branch(static_cast<DDS::Int32>(i64_disc), found_selected_member, selected_md);
364 }
365 
367 {
368  bool found_selected_member;
369  DDS::MemberDescriptor_var selected_md;
370  const DDS::ReturnCode_t rc = get_selected_union_branch(disc, found_selected_member, selected_md);
371  if (rc != DDS::RETCODE_OK) {
372  if (log_level >= LogLevel::Warning) {
373  ACE_ERROR((LM_WARNING, "(%P|%t) WARNING: DynamicDataBase::discriminator_selects_no_member: "
374  "get_selected_union_branch failed: %C\n", retcode_to_string(rc)));
375  }
376  return false;
377  }
378  return !found_selected_member;
379 }
380 
382 {
383  // see dds_generator.h struct_has_explicit_keys() in opendds_idl
384  DDS::TypeDescriptor_var type_descriptor;
385  DDS::ReturnCode_t ret = dt->get_descriptor(type_descriptor);
386  if (ret != DDS::RETCODE_OK) {
387  return false;
388  }
389  DDS::DynamicType* const base = type_descriptor->base_type();
390  if (base && has_explicit_keys(base)) {
391  return true;
392  }
393 
394  for (ACE_CDR::ULong i = 0; i < dt->get_member_count(); ++i) {
395  DDS::DynamicTypeMember_var member;
396  ret = dt->get_member_by_index(member, i);
397  if (ret != DDS::RETCODE_OK) {
398  return false;
399  }
400  DDS::MemberDescriptor_var descriptor;
401  ret = member->get_descriptor(descriptor);
402  if (ret != DDS::RETCODE_OK) {
403  return false;
404  }
405  if (descriptor->is_key()) {
406  return true;
407  }
408  }
409  return false;
410 }
411 
412 DDS::ReturnCode_t DynamicDataBase::unsupported_method(const char* method_name, bool warning) const
413 {
414  if (log_level >= (warning ? LogLevel::Warning : LogLevel::Notice)) {
415  ACE_ERROR((warning ? LM_WARNING : LM_NOTICE, "(%P|%t) %C: %C: not implemented\n",
416  warning ? "WARNING" : "NOTICE", method_name));
417  }
419 }
420 
421 #ifndef OPENDDS_NO_CONTENT_SUBSCRIPTION_PROFILE
423 {
424  return unsupported_method("DynamicDataBase::get_simple_value");
425 }
426 #endif
427 
428 DDS::DynamicType_ptr DynamicDataBase::type()
429 {
430  return DDS::DynamicType::_duplicate(type_);
431 }
432 
433 DDS::Boolean DynamicDataBase::equals(DDS::DynamicData_ptr /*other*/)
434 {
435  unsupported_method("DynamicDataBase::equals", true);
436  return false;
437 }
438 
439 DDS::DynamicData_ptr DynamicDataBase::loan_value(DDS::MemberId /*id*/)
440 {
441  unsupported_method("DynamicDataBase::loan_value");
442  return 0;
443 }
444 
446 {
447  return unsupported_method("DynamicDataBase::return_loaned_value");
448 }
449 
450 DDS::DynamicData_ptr DynamicDataBase::clone()
451 {
452  DDS::DynamicData_var new_copy = DDS::DynamicDataFactory::get_instance()->create_data(type_);
453  if (!new_copy || copy(new_copy, this) != DDS::RETCODE_OK) {
454  if (log_level >= LogLevel::Notice) {
455  ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: DynamicDataBase::clone: Failed to create a copy\n"));
456  }
457  return 0;
458  }
459  return new_copy._retn();
460 }
461 
462 namespace {
463  DDS::ReturnCode_t invalid_cast(const char* method, TypeKind to, TypeKind from)
464  {
465  if (log_level >= LogLevel::Notice) {
466  ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: DynamicDataBase::%C: Can't cast %C to %C\n",
467  method, typekind_to_string(from), typekind_to_string(to)));
468  }
470  }
471 }
472 
474 {
475  DDS::DynamicType_var member_type;
476  DDS::ReturnCode_t rc = get_member_type(member_type, type_, id);
477  if (rc != DDS::RETCODE_OK) {
478  return rc;
479  }
480  const TypeKind tk = member_type->get_kind();
481  switch (tk) {
482  case TK_BOOLEAN:
483  {
484  DDS::Boolean tmp;
485  rc = get_boolean_value(tmp, id);
486  if (rc == DDS::RETCODE_OK) {
487  value = static_cast<DDS::Int64>(tmp);
488  }
489  return rc;
490  }
491  case TK_BYTE:
492  {
493  DDS::Byte tmp;
494  rc = get_byte_value(tmp, id);
495  if (rc == DDS::RETCODE_OK) {
496  value = static_cast<DDS::Int64>(tmp);
497  }
498  return rc;
499  }
500  case TK_INT8:
501  case TK_INT16:
502  case TK_INT32:
503  return get_int_value(value, this, id, tk);
504  case TK_INT64:
505  return get_int64_value_impl(value, id);
506  case TK_UINT8:
507  case TK_UINT16:
508  case TK_UINT32:
509  {
510  DDS::UInt64 tmp;
511  rc = get_uint_value(tmp, this, id, tk);
512  if (rc == DDS::RETCODE_OK) {
513  value = static_cast<DDS::Int64>(tmp);
514  }
515  return rc;
516  }
517  case TK_CHAR8:
518  {
519  DDS::Char8 tmp;
520  rc = get_char8_value(tmp, id);
521  if (rc == DDS::RETCODE_OK) {
522  value = static_cast<DDS::Int64>(tmp);
523  }
524  return rc;
525  }
526  case TK_CHAR16:
527  {
528  DDS::Char16 tmp;
529  rc = get_char16_value(tmp, id);
530  if (rc == DDS::RETCODE_OK) {
531  value = static_cast<DDS::Int64>(tmp);
532  }
533  return rc;
534  }
535  case TK_ENUM:
536  {
537  DDS::Int32 tmp;
538  rc = get_enum_value(tmp, member_type, this, id);
539  if (rc == DDS::RETCODE_OK) {
540  value = static_cast<DDS::Int64>(tmp);
541  }
542  return rc;
543  }
544  default:
545  return invalid_cast("get_int64_value", TK_INT64, tk);
546  }
547 }
548 
550 {
551  DDS::DynamicType_var member_type;
552  DDS::ReturnCode_t rc = get_member_type(member_type, type_, id);
553  if (rc != DDS::RETCODE_OK) {
554  return rc;
555  }
556  const TypeKind tk = member_type->get_kind();
557  switch (tk) {
558  case TK_BOOLEAN:
559  {
560  DDS::Boolean tmp;
561  rc = get_boolean_value(tmp, id);
562  if (rc == DDS::RETCODE_OK) {
563  value = tmp ? 1 : 0;
564  }
565  return rc;
566  }
567  case TK_BYTE:
568  {
569  DDS::Byte tmp;
570  rc = get_byte_value(tmp, id);
571  if (rc == DDS::RETCODE_OK) {
572  value = static_cast<DDS::UInt64>(tmp);
573  }
574  return rc;
575  }
576  case TK_INT8:
577  case TK_INT16:
578  case TK_INT32:
579  {
580  DDS::Int64 tmp;
581  rc = get_int_value(tmp, this, id, tk);
582  if (rc == DDS::RETCODE_OK) {
583  value = static_cast<DDS::UInt64>(tmp);
584  }
585  return rc;
586  }
587  case TK_UINT8:
588  case TK_UINT16:
589  case TK_UINT32:
590  return get_uint_value(value, this, id, tk);
591  case TK_UINT64:
592  return get_uint64_value_impl(value, id);
593  case TK_CHAR8:
594  {
595  DDS::Char8 tmp;
596  rc = get_char8_value(tmp, id);
597  if (rc == DDS::RETCODE_OK) {
598  value = DCPS::char_value(tmp);
599  }
600  return rc;
601  }
602  case TK_CHAR16:
603  {
604  DDS::Char16 tmp;
605  rc = get_char16_value(tmp, id);
606  if (rc == DDS::RETCODE_OK) {
607  value = DCPS::char_value(tmp);
608  }
609  return rc;
610  }
611  default:
612  return invalid_cast("get_uint64_value", TK_UINT64, tk);
613  }
614 }
615 
616 } // namespace XTypes
617 } // namespace OpenDDS
618 
620 
621 #endif // OPENDDS_SAFETY_PROFILE
const TypeKind TK_SEQUENCE
Definition: TypeObject.h:248
#define ACE_ERROR(X)
bool is_complex(TypeKind tk)
ACE_CDR::ULong MemberId
Definition: TypeObject.h:910
const LogLevel::Value value
Definition: debug.cpp:61
const TypeKind TK_INT32
Definition: TypeObject.h:217
DDS::ReturnCode_t unsupported_method(const char *method_name, bool warning=false) const
const TypeKind TK_STRING16
Definition: TypeObject.h:232
const TypeKind TK_FLOAT128
Definition: TypeObject.h:224
DDS::ReturnCode_t get_byte_value(inout octet value, in MemberId id)
DDS::ReturnCode_t get_member_type(DDS::DynamicType_var &member_type, DDS::DynamicType_ptr container_type, DDS::MemberId id)
const TypeKind TK_BYTE
Definition: TypeObject.h:215
DDS::ReturnCode_t return_loaned_value(DDS::DynamicData_ptr other)
DynamicData_ptr create_data(DynamicType_ptr type)
const TypeKind TK_UNION
Definition: TypeObject.h:244
const TypeKind TK_INT16
Definition: TypeObject.h:216
bool is_type_supported(TypeKind tk, const char *func_name)
Verify that a given type is primitive or string or wstring.
DDS::DynamicType_var get_base_type(DDS::DynamicType_ptr type)
const ACE_CDR::ULong DISCRIMINATOR_ID
Implementation specific sentinel for a union discriminator used in DynamicData.
Definition: TypeObject.h:913
const TypeKind TK_UINT16
Definition: TypeObject.h:219
DDS::TypeDescriptor_var type_desc_
DDS::ReturnCode_t get_boolean_value(inout boolean value, in MemberId id)
octet Byte
Definition: DdsDcpsCore.idl:31
const TypeKind TK_INT8
Definition: TypeObject.h:225
ACE_CDR::Octet TypeKind
Definition: TypeObject.h:210
DDS::ReturnCode_t get_descriptor(inout TypeDescriptor descriptor)
DDS::Boolean equals(DDS::DynamicData_ptr other)
DDS::ReturnCode_t get_int64_value(DDS::Int64 &value, DDS::MemberId id)
DDS::ReturnCode_t get_descriptor(DDS::MemberDescriptor *&value, MemberId id)
static DDS::MemberId get_union_default_member(DDS::DynamicType *type)
static DynamicDataFactory_ptr get_instance()
const TypeKind TK_BOOLEAN
Definition: TypeObject.h:214
const char * typekind_to_string(TypeKind tk)
DDS::ReturnCode_t get_enum_value(DDS::Int32 &value, DDS::DynamicType_ptr enum_type, DDS::DynamicData_ptr src, DDS::MemberId id)
static bool has_explicit_keys(DDS::DynamicType *dt)
const TypeKind TK_BITMASK
Definition: TypeObject.h:239
DDS::ReturnCode_t get_member_by_index(inout DynamicTypeMember member, in unsigned long index)
DDS::ReturnCode_t check_member(DDS::MemberDescriptor_var &member_desc, DDS::DynamicType_var &member_type, const char *method, const char *action, DDS::MemberId id, DDS::TypeKind tk=TK_NONE)
LM_NOTICE
bool get_index_from_id(DDS::MemberId id, ACE_CDR::ULong &index, ACE_CDR::ULong bound) const
char Char8
Definition: DdsDcpsCore.idl:44
const TypeKind TK_CHAR8
Definition: TypeObject.h:227
virtual DDS::ReturnCode_t get_uint64_value_impl(DDS::UInt64 &value, DDS::MemberId id)=0
const ACE_CDR::ULong MEMBER_ID_INVALID
Definition: TypeObject.h:911
DDS::DynamicType_var type_
The actual (i.e., non-alias) DynamicType of the associated type.
const ReturnCode_t RETCODE_ILLEGAL_OPERATION
DDS::MemberId get_member_id_by_name(const char *name)
void string_free(char *)
LM_WARNING
ACE_UINT32 ULong
const TypeKind TK_STRUCTURE
Definition: TypeObject.h:243
const char *const name
Definition: debug.cpp:60
const TypeKind TK_FLOAT32
Definition: TypeObject.h:222
DDS::DynamicData_ptr loan_value(DDS::MemberId id)
const TypeKind TK_STRING8
Definition: TypeObject.h:231
DDS::ReturnCode_t get_char16_value(inout wchar value, in MemberId id)
ACE_INT32 Long
DDS::ReturnCode_t get_char8_value(inout char value, in MemberId id)
unsigned long get_member_count()
const TypeKind TK_UINT64
Definition: TypeObject.h:221
DDS::DynamicData * interface_from_this() const
OpenDDS_Dcps_Export LogLevel log_level
DDS::ReturnCode_t enum_bound(DDS::DynamicType_ptr enum_type, DDS::TypeKind &bound_kind)
const TypeKind TK_INT64
Definition: TypeObject.h:218
const char * retcode_to_string(DDS::ReturnCode_t value)
Definition: DCPS_Utils.cpp:29
virtual DDS::ReturnCode_t get_simple_value(DCPS::Value &value, DDS::MemberId id)
const TypeKind TK_UINT32
Definition: TypeObject.h:220
DDS::ReturnCode_t copy(DDS::DynamicData_ptr dest, DDS::DynamicData_ptr src)
const ReturnCode_t RETCODE_ERROR
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
DDS::ReturnCode_t get_enumerator_name(DDS::String8_var &name, DDS::Int32 value, DDS::DynamicType_ptr type)
const TypeKind TK_ENUM
Definition: TypeObject.h:238
const ReturnCode_t RETCODE_OK
DDS::ReturnCode_t get_uint64_value(DDS::UInt64 &value, DDS::MemberId id)
DDS::ReturnCode_t get_int_value(DDS::Int64 &value, DDS::DynamicData_ptr src, DDS::MemberId id, DDS::TypeKind kind)
const ReturnCode_t RETCODE_UNSUPPORTED
wchar Char16
Definition: DdsDcpsCore.idl:45
bool discriminator_selects_no_member(DDS::Int32 disc) const
const TypeKind TK_ARRAY
Definition: TypeObject.h:249
const TypeKind TK_UINT8
Definition: TypeObject.h:226
DDS::ReturnCode_t get_uint_value(DDS::UInt64 &value, DDS::DynamicData_ptr src, DDS::MemberId id, DDS::TypeKind kind)
const character_type * in(void) const
const TypeKind TK_NONE
Definition: TypeObject.h:213
const TypeKind TK_MAP
Definition: TypeObject.h:250
unsigned char_value(CharType value)
Definition: ValueHelper.h:58
DDS::ReturnCode_t bitmask_bound(DDS::DynamicType_ptr type, DDS::TypeKind &bound_kind)
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
bool enum_string_helper(char *&strInOut, MemberId id)
DDS::ReturnCode_t get_selected_union_branch(DDS::Int32 disc, bool &found_selected_member, DDS::MemberDescriptor_var &selected_md) const
DDS::ReturnCode_t set_descriptor(DDS::MemberId id, DDS::MemberDescriptor *value)
ACE_CDR::ULong length() const
Definition: TypeObject.h:167
const TypeKind TK_CHAR16
Definition: TypeObject.h:228
const TypeKind TK_FLOAT64
Definition: TypeObject.h:223
#define ACE_INT32_MAX
virtual DDS::ReturnCode_t get_int64_value_impl(DDS::Int64 &value, DDS::MemberId id)=0
bool is_basic(TypeKind tk)
const ReturnCode_t RETCODE_BAD_PARAMETER