OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Private Attributes | List of all members
OpenDDS::XTypes::DynamicTypeMemberImpl Class Reference

#include <DynamicTypeMemberImpl.h>

Inheritance diagram for OpenDDS::XTypes::DynamicTypeMemberImpl:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::XTypes::DynamicTypeMemberImpl:
Collaboration graph
[legend]

Public Member Functions

 DynamicTypeMemberImpl ()
 
 ~DynamicTypeMemberImpl ()
 
DDS::ReturnCode_t set_descriptor (DDS::MemberDescriptor *descriptor)
 
DDS::ReturnCode_t get_descriptor (DDS::MemberDescriptor *&descriptor)
 
CORBA::ULong get_annotation_count ()
 
DDS::ReturnCode_t get_annotation (DDS::AnnotationDescriptor *&descriptor, CORBA::ULong idx)
 
CORBA::ULong get_verbatim_text_count ()
 
DDS::ReturnCode_t get_verbatim_text (DDS::VerbatimTextDescriptor *&descriptor, CORBA::ULong idx)
 
bool equals (DDS::DynamicTypeMember_ptr other)
 
MemberId get_id ()
 
char * get_name ()
 
- Public Member Functions inherited from DDS::DynamicTypeMember
DDS::ReturnCode_t get_descriptor (inout MemberDescriptor descriptor)
 
DDS::ReturnCode_t get_annotation (inout AnnotationDescriptor descriptor, in unsigned long idx)
 
DDS::ReturnCode_t get_verbatim_text (inout VerbatimTextDescriptor descriptor, in unsigned long idx)
 
boolean equals (in DynamicTypeMember other)
 

Private Attributes

DDS::MemberDescriptor_var descriptor_
 

Detailed Description

Definition at line 14 of file DynamicTypeMemberImpl.h.

Constructor & Destructor Documentation

◆ DynamicTypeMemberImpl()

OpenDDS::XTypes::DynamicTypeMemberImpl::DynamicTypeMemberImpl ( )

Definition at line 13 of file DynamicTypeMemberImpl.cpp.

14 {}

◆ ~DynamicTypeMemberImpl()

OpenDDS::XTypes::DynamicTypeMemberImpl::~DynamicTypeMemberImpl ( )

Definition at line 16 of file DynamicTypeMemberImpl.cpp.

17 {}

Member Function Documentation

◆ equals()

bool OpenDDS::XTypes::DynamicTypeMemberImpl::equals ( DDS::DynamicTypeMember_ptr  other)

Definition at line 59 of file DynamicTypeMemberImpl.cpp.

References descriptor_, DDS::RETCODE_OK, and OpenDDS::XTypes::test_equality().

60 {
61  //7.5.2.6.3 Operation: equals
62  //Two members shall be considered equal if and only if they belong to the same type and all of
63  //their respective properties, as identified in Table 52 above, are equal.
64 
65  //In addition to what the spec says to compare, we will be comparing the MemberDescriptors of both
66  //DynamicTypeMembers. The spec seems to assume this is the case, despite not listing the MemberDescriptor
67  //as a property in table 52. If this were not the case, any two members within a type would be considered
68  //equal, regardless of whether they are actually the same member.
69 
70  DDS::MemberDescriptor_var other_md;
71  if (other->get_descriptor(other_md) != DDS::RETCODE_OK) {
72  return false;
73  }
74 
75  DynamicTypePtrPairSeen dt_ptr_pair;
76  return test_equality(descriptor_, other_md, dt_ptr_pair);
77 }
bool test_equality(DDS::DynamicType_ptr lhs, DDS::DynamicType_ptr rhs, DynamicTypePtrPairSeen &dt_ptr_pair)
const ReturnCode_t RETCODE_OK

◆ get_annotation()

DDS::ReturnCode_t OpenDDS::XTypes::DynamicTypeMemberImpl::get_annotation ( DDS::AnnotationDescriptor *&  descriptor,
CORBA::ULong  idx 
)

Definition at line 41 of file DynamicTypeMemberImpl.cpp.

References DDS::RETCODE_UNSUPPORTED.

42 {
43  // FUTURE
45 }
const ReturnCode_t RETCODE_UNSUPPORTED

◆ get_annotation_count()

CORBA::ULong OpenDDS::XTypes::DynamicTypeMemberImpl::get_annotation_count ( )

Implements DDS::DynamicTypeMember.

Definition at line 35 of file DynamicTypeMemberImpl.cpp.

36 {
37  // FUTURE
38  return 0;
39 }

◆ get_descriptor()

DDS::ReturnCode_t OpenDDS::XTypes::DynamicTypeMemberImpl::get_descriptor ( DDS::MemberDescriptor *&  descriptor)

Definition at line 27 of file DynamicTypeMemberImpl.cpp.

References descriptor_, and DDS::RETCODE_OK.

28 {
29  DDS::MemberDescriptor_var descriptor_v(descriptor);
30  descriptor = descriptor_;
31  CORBA::add_ref(descriptor);
32  return DDS::RETCODE_OK;
33 }
const ReturnCode_t RETCODE_OK

◆ get_id()

MemberId OpenDDS::XTypes::DynamicTypeMemberImpl::get_id ( void  )

Implements DDS::DynamicTypeMember.

Definition at line 79 of file DynamicTypeMemberImpl.cpp.

References descriptor_.

80 {
81  return descriptor_->id();
82 }

◆ get_name()

char * OpenDDS::XTypes::DynamicTypeMemberImpl::get_name ( void  )

Implements DDS::DynamicTypeMember.

Definition at line 84 of file DynamicTypeMemberImpl.cpp.

References TAO::String_var< charT >::_retn(), descriptor_, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.

85 {
86  CORBA::String_var s = descriptor_->name();
87  return s._retn();
88 }
character_type * _retn(void)

◆ get_verbatim_text()

DDS::ReturnCode_t OpenDDS::XTypes::DynamicTypeMemberImpl::get_verbatim_text ( DDS::VerbatimTextDescriptor *&  descriptor,
CORBA::ULong  idx 
)

Definition at line 53 of file DynamicTypeMemberImpl.cpp.

References DDS::RETCODE_UNSUPPORTED.

54 {
55  // FUTURE
57 }
const ReturnCode_t RETCODE_UNSUPPORTED

◆ get_verbatim_text_count()

CORBA::ULong OpenDDS::XTypes::DynamicTypeMemberImpl::get_verbatim_text_count ( )

Implements DDS::DynamicTypeMember.

Definition at line 47 of file DynamicTypeMemberImpl.cpp.

48 {
49  // FUTURE
50  return 0;
51 }

◆ set_descriptor()

DDS::ReturnCode_t OpenDDS::XTypes::DynamicTypeMemberImpl::set_descriptor ( DDS::MemberDescriptor descriptor)

Definition at line 19 of file DynamicTypeMemberImpl.cpp.

References descriptor_, and DDS::RETCODE_OK.

Referenced by OpenDDS::XTypes::TypeLookupService::complete_to_dynamic_i().

20 {
21  // ValueTypes don't have a duplicate so manually add_ref.
22  CORBA::add_ref(descriptor);
23  descriptor_ = descriptor;
24  return DDS::RETCODE_OK;
25 }
const ReturnCode_t RETCODE_OK

Member Data Documentation

◆ descriptor_

DDS::MemberDescriptor_var OpenDDS::XTypes::DynamicTypeMemberImpl::descriptor_
private

Definition at line 29 of file DynamicTypeMemberImpl.h.

Referenced by equals(), get_descriptor(), get_id(), get_name(), and set_descriptor().


The documentation for this class was generated from the following files: