13 #if OPENDDS_HAS_DYNAMIC_DATA_ADAPTER 48 DDS::MemberDescriptor_var active_branch;
54 "get_selected_union_branch returned %C\n",
59 return branch_active ? 2 : 1;
72 ACE_ERROR((
LM_ERROR,
"(%P|%t) ERROR: DynamicDataAdapterImpl<%C>::get_item_count: " 73 "this %C should have implemented get_item_count\n",
91 DDS::DynamicTypeMember_var dtm;
111 DDS::DynamicTypeMember_var dtm;
112 rc =
type_->get_member_by_index(dtm, index);
116 ACE_ERROR((
LM_WARNING,
"(%P|%t) WARNING: DynamicDataAdapterImpl<%C>::get_member_id_at_index: " 117 "get_member_by_index returned %C\n",
122 return dtm->get_id();
128 }
else if (index == 1) {
130 DDS::MemberDescriptor_var active_branch;
135 ACE_ERROR((
LM_WARNING,
"(%P|%t) WARNING: DynamicDataAdapterImpl<%C>::get_member_id_at_index: " 136 "get_selected_union_branch returned %C\n",
142 return active_branch->id();
145 ACE_ERROR((
LM_WARNING,
"(%P|%t) WARNING: DynamicDataAdapterImpl<%C>::get_member_id_at_index: " 146 "union doesn't have an active branch, so index 1 is invalid\n",
151 ACE_ERROR((
LM_WARNING,
"(%P|%t) WARNING: DynamicDataAdapterImpl<%C>::get_member_id_at_index: " 152 "index %u is invalid for unions\n",
153 type_name.
in(), index));
165 ACE_ERROR((
LM_WARNING,
"(%P|%t) WARNING: DynamicDataAdapterImpl<%C>::get_member_id_at_index: " 166 "check_index returned %C\n",
176 ACE_ERROR((
LM_WARNING,
"(%P|%t) WARNING: DynamicDataAdapterImpl<%C>::get_member_id_at_index: " 177 "not supported for %C\n",
209 ACE_ERROR((
LM_NOTICE,
"(%P|%t) NOTICE: DynamicDataAdapterImpl<%C>::%C: invalid member id %u\n",
210 type_name.
in(), method, id));
220 "member id %u doesn't have a DynamicDataAdapterImpl\n",
221 type_name.
in(), method, id));
232 "can't set values as this DynamicDataAdapter is read only\n",
233 type_name.
in(), method));
241 const char* method, DDS::UInt32 index, DDS::UInt32 size)
const 247 "index %u is larger or equal to than the size (%u)\n",
248 type_name.
in(), method, index, size));
264 DDS::DynamicType_var member_type;
275 char*& dest_value = *
static_cast<char**
>(dest);
301 char*& dest_value = *
static_cast<char**
>(dest);
313 dest =
static_cast<const char*
>(source);
375 #endif // OPENDDS_HAS_DYNAMIC_DATA_ADAPTER const TypeKind TK_SEQUENCE
DDS::ReturnCode_t set_cpp11_s8_raw_value(const char *method, std::string &dest, DDS::MemberId id, const void *source, DDS::TypeKind tk)
DDS::ReturnCode_t check_index(const char *method, DDS::UInt32 index, DDS::UInt32 size) const
DDS::ReturnCode_t unsupported_method(const char *method_name, bool warning=false) const
const TypeKind TK_STRING16
const TypeKind TK_FLOAT128
void wstring_free(WChar *const)
virtual DDS::MemberId get_member_id_at_index_impl(DDS::UInt32)
DDS::ReturnCode_t get_s8_raw_value(const char *method, void *dest, DDS::TypeKind tk, const char *source, DDS::MemberId id)
DDS::ReturnCode_t check_member(DDS::DynamicType_var &member_type, const char *method, DDS::TypeKind tk, DDS::MemberId id)
DDS::ReturnCode_t clear_nonkey_values()
DDS::ReturnCode_t get_cpp11_s16_raw_value(const char *method, void *dest, DDS::TypeKind tk, const std::wstring &source, DDS::MemberId id)
const ACE_CDR::ULong DISCRIMINATOR_ID
Implementation specific sentinel for a union discriminator used in DynamicData.
#define OPENDDS_ASSERT(C)
DDS::TypeDescriptor_var type_desc_
DDS::ReturnCode_t get_cpp11_s8_raw_value(const char *method, void *dest, DDS::TypeKind tk, const std::string &source, DDS::MemberId id)
DDS::ReturnCode_t clear_value(DDS::MemberId)
DDS::ReturnCode_t clear_all_values()
char * string_dup(const char *)
const TypeKind TK_BOOLEAN
const char * typekind_to_string(TypeKind tk)
const TypeKind TK_BITMASK
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)
WChar * wstring_dup(const WChar *const)
DDS::UInt32 bound_total(DDS::TypeDescriptor_var descriptor)
const ACE_CDR::ULong MEMBER_ID_INVALID
DDS::DynamicType_var type_
The actual (i.e., non-alias) DynamicType of the associated type.
const ReturnCode_t RETCODE_ILLEGAL_OPERATION
const TypeKind TK_STRUCTURE
DDS::MemberId get_member_id_at_index(DDS::UInt32 index)
DDS::ReturnCode_t invalid_id(const char *method, DDS::MemberId id) const
const TypeKind TK_FLOAT32
DDS::ReturnCode_t missing_dda(const char *method, DDS::MemberId id) const
const TypeKind TK_STRING8
OpenDDS_Dcps_Export LogLevel log_level
DDS::UInt32 get_item_count()
const char * retcode_to_string(DDS::ReturnCode_t value)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
const TypeKind TK_ANNOTATION
DDS::MemberId get_member_id_by_name(const char *name)
DDS::ReturnCode_t get_s16_raw_value(const char *method, void *dest, DDS::TypeKind tk, const DDS::Char16 *source, DDS::MemberId id)
const ReturnCode_t RETCODE_OK
DDS::ReturnCode_t set_s16_raw_value(const char *method, DDS::Char16 *&dest, DDS::MemberId id, const void *source, DDS::TypeKind tk)
const character_type * in(void) const
DDS::ReturnCode_t set_cpp11_s16_raw_value(const char *method, std::wstring &dest, DDS::MemberId id, const void *source, DDS::TypeKind tk)
The Internal API and Implementation of OpenDDS.
DDS::ReturnCode_t set_s8_raw_value(const char *method, char *&dest, DDS::MemberId id, const void *source, DDS::TypeKind tk)
DDS::DynamicData_ptr clone()
DDS::ReturnCode_t get_selected_union_branch(DDS::Int32 disc, bool &found_selected_member, DDS::MemberDescriptor_var &selected_md) const
const TypeKind TK_FLOAT64
DDS::ReturnCode_t assert_mutable(const char *method) const
const ReturnCode_t RETCODE_BAD_PARAMETER