MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / equals

Method equals

dds/DCPS/XTypes/DynamicTypeMemberImpl.cpp:59–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59bool DynamicTypeMemberImpl::equals(DDS::DynamicTypeMember_ptr other)
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}
78
79MemberId DynamicTypeMemberImpl::get_id()
80{

Callers

nothing calls this directly

Calls 2

test_equalityFunction · 0.70
get_descriptorMethod · 0.45

Tested by

no test coverage detected