OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OpenDDS::XTypes::TypeIdentifier Class Reference

#include <TypeObject.h>

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

Public Member Functions

 TypeIdentifier (ACE_CDR::Octet kind=TK_NONE)
 
 TypeIdentifier (const TypeIdentifier &other)
 
TypeIdentifieroperator= (const TypeIdentifier &other)
 
 ~TypeIdentifier ()
 
 TypeIdentifier (ACE_CDR::Octet kind, const StringSTypeDefn &sdefn)
 
 TypeIdentifier (ACE_CDR::Octet kind, const StringLTypeDefn &ldefn)
 
 TypeIdentifier (ACE_CDR::Octet kind, const PlainSequenceSElemDefn &sdefn)
 
 TypeIdentifier (ACE_CDR::Octet kind, const PlainSequenceLElemDefn &ldefn)
 
 TypeIdentifier (ACE_CDR::Octet kind, const PlainArraySElemDefn &sdefn)
 
 TypeIdentifier (ACE_CDR::Octet kind, const PlainArrayLElemDefn &ldefn)
 
 TypeIdentifier (ACE_CDR::Octet kind, const EquivalenceHashWrapper &equivalence_hash)
 
 TypeIdentifier (ACE_CDR::Octet kind, const StronglyConnectedComponentId &sc_component_id)
 
ACE_CDR::Octet kind () const
 
 OPENDDS_UNION_ACCESSORS (StringSTypeDefn, string_sdefn)
 
 OPENDDS_UNION_ACCESSORS (StringLTypeDefn, string_ldefn)
 
 OPENDDS_UNION_ACCESSORS (PlainSequenceSElemDefn, seq_sdefn)
 
 OPENDDS_UNION_ACCESSORS (PlainSequenceLElemDefn, seq_ldefn)
 
 OPENDDS_UNION_ACCESSORS (PlainArraySElemDefn, array_sdefn)
 
 OPENDDS_UNION_ACCESSORS (PlainArrayLElemDefn, array_ldefn)
 
 OPENDDS_UNION_ACCESSORS (PlainMapSTypeDefn, map_sdefn)
 
 OPENDDS_UNION_ACCESSORS (PlainMapLTypeDefn, map_ldefn)
 
 OPENDDS_UNION_ACCESSORS (StronglyConnectedComponentId, sc_component_id)
 
 OPENDDS_UNION_ACCESSORS (EquivalenceHash, equivalence_hash)
 
 OPENDDS_UNION_ACCESSORS (ExtendedTypeDefn, extended_defn)
 
bool operator< (const TypeIdentifier &other) const
 
bool operator== (const TypeIdentifier &other) const
 

Private Member Functions

void activate (const TypeIdentifier *other=0)
 
void reset ()
 

Private Attributes

ACE_CDR::Octet kind_
 
void * active_
 
union {
   ACE_CDR::ULongLong   max_alignment
 
}; 
 

Detailed Description

Definition at line 732 of file TypeObject.h.

Constructor & Destructor Documentation

◆ TypeIdentifier() [1/10]

OpenDDS::XTypes::TypeIdentifier::TypeIdentifier ( ACE_CDR::Octet  kind = TK_NONE)
explicit

Definition at line 64 of file TypeObject.cpp.

References activate().

65  : kind_(kind)
66  , active_(0)
67 {
68  activate();
69 }
ACE_CDR::Octet kind() const
Definition: TypeObject.h:748
void activate(const TypeIdentifier *other=0)
Definition: TypeObject.cpp:71

◆ TypeIdentifier() [2/10]

OpenDDS::XTypes::TypeIdentifier::TypeIdentifier ( const TypeIdentifier other)

Definition at line 128 of file TypeObject.cpp.

References activate().

129  : kind_(other.kind_)
130  , active_(0)
131 {
132  activate(&other);
133 }
void activate(const TypeIdentifier *other=0)
Definition: TypeObject.cpp:71

◆ ~TypeIdentifier()

OpenDDS::XTypes::TypeIdentifier::~TypeIdentifier ( )
inline

Definition at line 737 of file TypeObject.h.

◆ TypeIdentifier() [3/10]

OpenDDS::XTypes::TypeIdentifier::TypeIdentifier ( ACE_CDR::Octet  kind,
const StringSTypeDefn sdefn 
)

Definition at line 198 of file TypeObject.cpp.

References activate().

199  : kind_(k)
200 {
201  activate();
202  string_sdefn() = sdefn;
203 }
void activate(const TypeIdentifier *other=0)
Definition: TypeObject.cpp:71

◆ TypeIdentifier() [4/10]

OpenDDS::XTypes::TypeIdentifier::TypeIdentifier ( ACE_CDR::Octet  kind,
const StringLTypeDefn ldefn 
)

Definition at line 205 of file TypeObject.cpp.

References activate().

206  : kind_(k)
207 {
208  activate();
209  string_ldefn() = ldefn;
210 }
void activate(const TypeIdentifier *other=0)
Definition: TypeObject.cpp:71

◆ TypeIdentifier() [5/10]

OpenDDS::XTypes::TypeIdentifier::TypeIdentifier ( ACE_CDR::Octet  kind,
const PlainSequenceSElemDefn sdefn 
)

Definition at line 212 of file TypeObject.cpp.

References activate().

213  : kind_(k)
214 {
215  activate();
216  seq_sdefn() = sdefn;
217 }
void activate(const TypeIdentifier *other=0)
Definition: TypeObject.cpp:71

◆ TypeIdentifier() [6/10]

OpenDDS::XTypes::TypeIdentifier::TypeIdentifier ( ACE_CDR::Octet  kind,
const PlainSequenceLElemDefn ldefn 
)

Definition at line 219 of file TypeObject.cpp.

References activate().

220  : kind_(k)
221 {
222  activate();
223  seq_ldefn() = ldefn;
224 }
void activate(const TypeIdentifier *other=0)
Definition: TypeObject.cpp:71

◆ TypeIdentifier() [7/10]

OpenDDS::XTypes::TypeIdentifier::TypeIdentifier ( ACE_CDR::Octet  kind,
const PlainArraySElemDefn sdefn 
)

Definition at line 226 of file TypeObject.cpp.

References activate().

227  : kind_(k)
228 {
229  activate();
230  array_sdefn() = sdefn;
231 }
void activate(const TypeIdentifier *other=0)
Definition: TypeObject.cpp:71

◆ TypeIdentifier() [8/10]

OpenDDS::XTypes::TypeIdentifier::TypeIdentifier ( ACE_CDR::Octet  kind,
const PlainArrayLElemDefn ldefn 
)

Definition at line 233 of file TypeObject.cpp.

References activate().

234  : kind_(k)
235 {
236  activate();
237  array_ldefn() = ldefn;
238 }
void activate(const TypeIdentifier *other=0)
Definition: TypeObject.cpp:71

◆ TypeIdentifier() [9/10]

OpenDDS::XTypes::TypeIdentifier::TypeIdentifier ( ACE_CDR::Octet  kind,
const EquivalenceHashWrapper equivalence_hash 
)

Definition at line 240 of file TypeObject.cpp.

References activate(), and OpenDDS::XTypes::EquivalenceHashWrapper::eh_.

241  : kind_(k)
242 {
243  activate();
244  std::memcpy(equivalence_hash(), eh.eh_, sizeof eh.eh_);
245 }
void activate(const TypeIdentifier *other=0)
Definition: TypeObject.cpp:71

◆ TypeIdentifier() [10/10]

OpenDDS::XTypes::TypeIdentifier::TypeIdentifier ( ACE_CDR::Octet  kind,
const StronglyConnectedComponentId sc_component_id 
)

Definition at line 247 of file TypeObject.cpp.

References activate().

248  : kind_(k)
249 {
250  activate();
251  sc_component_id() = id;
252 }
void activate(const TypeIdentifier *other=0)
Definition: TypeObject.cpp:71

Member Function Documentation

◆ activate()

void OpenDDS::XTypes::TypeIdentifier::activate ( const TypeIdentifier other = 0)
private

Definition at line 71 of file TypeObject.cpp.

References active_, OpenDDS::XTypes::EK_COMPLETE, OpenDDS::XTypes::EK_MINIMAL, kind_, OPENDDS_BRANCH_ACTIVATE, OpenDDS::XTypes::TI_PLAIN_ARRAY_LARGE, OpenDDS::XTypes::TI_PLAIN_ARRAY_SMALL, OpenDDS::XTypes::TI_PLAIN_MAP_LARGE, OpenDDS::XTypes::TI_PLAIN_MAP_SMALL, OpenDDS::XTypes::TI_PLAIN_SEQUENCE_LARGE, OpenDDS::XTypes::TI_PLAIN_SEQUENCE_SMALL, OpenDDS::XTypes::TI_STRING16_LARGE, OpenDDS::XTypes::TI_STRING16_SMALL, OpenDDS::XTypes::TI_STRING8_LARGE, OpenDDS::XTypes::TI_STRING8_SMALL, OpenDDS::XTypes::TI_STRONGLY_CONNECTED_COMPONENT, OpenDDS::XTypes::TK_BOOLEAN, OpenDDS::XTypes::TK_BYTE, OpenDDS::XTypes::TK_CHAR16, OpenDDS::XTypes::TK_CHAR8, OpenDDS::XTypes::TK_FLOAT128, OpenDDS::XTypes::TK_FLOAT32, OpenDDS::XTypes::TK_FLOAT64, OpenDDS::XTypes::TK_INT16, OpenDDS::XTypes::TK_INT32, OpenDDS::XTypes::TK_INT64, OpenDDS::XTypes::TK_INT8, OpenDDS::XTypes::TK_NONE, OpenDDS::XTypes::TK_UINT16, OpenDDS::XTypes::TK_UINT32, OpenDDS::XTypes::TK_UINT64, and OpenDDS::XTypes::TK_UINT8.

Referenced by operator=(), and TypeIdentifier().

72 {
73 #define OPENDDS_BRANCH_ACTIVATE(T, N) \
74  active_ = new(N ## _) T(); \
75  if (other) N() = other->N(); \
76  break
77 
78  switch (kind_) {
79  case TI_STRING8_SMALL:
80  case TI_STRING16_SMALL:
81  OPENDDS_BRANCH_ACTIVATE(StringSTypeDefn, string_sdefn);
82  case TI_STRING8_LARGE:
83  case TI_STRING16_LARGE:
84  OPENDDS_BRANCH_ACTIVATE(StringLTypeDefn, string_ldefn);
86  OPENDDS_BRANCH_ACTIVATE(PlainSequenceSElemDefn, seq_sdefn);
88  OPENDDS_BRANCH_ACTIVATE(PlainSequenceLElemDefn, seq_ldefn);
90  OPENDDS_BRANCH_ACTIVATE(PlainArraySElemDefn, array_sdefn);
92  OPENDDS_BRANCH_ACTIVATE(PlainArrayLElemDefn, array_ldefn);
93  case TI_PLAIN_MAP_SMALL:
94  OPENDDS_BRANCH_ACTIVATE(PlainMapSTypeDefn, map_sdefn);
95  case TI_PLAIN_MAP_LARGE:
96  OPENDDS_BRANCH_ACTIVATE(PlainMapLTypeDefn, map_ldefn);
98  OPENDDS_BRANCH_ACTIVATE(StronglyConnectedComponentId, sc_component_id);
99  case EK_COMPLETE:
100  case EK_MINIMAL:
101  active_ = equivalence_hash_;
102  if (other) {
103  std::memcpy(equivalence_hash(), other->equivalence_hash(), sizeof(EquivalenceHash));
104  }
105  break;
106  case TK_NONE:
107  case TK_BOOLEAN:
108  case TK_BYTE:
109  case TK_INT16:
110  case TK_INT32:
111  case TK_INT64:
112  case TK_UINT16:
113  case TK_UINT32:
114  case TK_UINT64:
115  case TK_FLOAT32:
116  case TK_FLOAT64:
117  case TK_FLOAT128:
118  case TK_INT8:
119  case TK_UINT8:
120  case TK_CHAR8:
121  case TK_CHAR16:
122  break; // no-op, no member selected
123  default:
124  OPENDDS_BRANCH_ACTIVATE(ExtendedTypeDefn, extended_defn);
125  }
126 }
const TypeKind TK_INT8
Definition: TypeObject.h:225
const TypeIdentifierKind TI_STRONGLY_CONNECTED_COMPONENT
Definition: TypeObject.h:269
const TypeIdentifierKind TI_STRING16_LARGE
Definition: TypeObject.h:258
const TypeKind TK_FLOAT128
Definition: TypeObject.h:224
const TypeKind TK_CHAR16
Definition: TypeObject.h:228
const TypeIdentifierKind TI_STRING8_LARGE
Definition: TypeObject.h:256
const EquivalenceKind EK_MINIMAL
Definition: TypeObject.h:205
const TypeIdentifierKind TI_PLAIN_ARRAY_LARGE
Definition: TypeObject.h:264
const TypeKind TK_INT32
Definition: TypeObject.h:217
const TypeKind TK_CHAR8
Definition: TypeObject.h:227
const TypeIdentifierKind TI_PLAIN_SEQUENCE_LARGE
Definition: TypeObject.h:261
ACE_CDR::Octet EquivalenceHash[14]
Definition: TypeObject.h:287
const TypeIdentifierKind TI_STRING16_SMALL
Definition: TypeObject.h:257
const TypeKind TK_NONE
Definition: TypeObject.h:213
const TypeIdentifierKind TI_PLAIN_ARRAY_SMALL
Definition: TypeObject.h:263
const TypeKind TK_UINT16
Definition: TypeObject.h:219
const TypeIdentifierKind TI_PLAIN_MAP_LARGE
Definition: TypeObject.h:267
const TypeIdentifierKind TI_PLAIN_MAP_SMALL
Definition: TypeObject.h:266
const TypeKind TK_INT64
Definition: TypeObject.h:218
const TypeKind TK_UINT8
Definition: TypeObject.h:226
const TypeKind TK_FLOAT32
Definition: TypeObject.h:222
const TypeKind TK_BOOLEAN
Definition: TypeObject.h:214
const TypeKind TK_INT16
Definition: TypeObject.h:216
const TypeKind TK_FLOAT64
Definition: TypeObject.h:223
#define OPENDDS_BRANCH_ACTIVATE(T, N)
const TypeKind TK_UINT32
Definition: TypeObject.h:220
const TypeKind TK_BYTE
Definition: TypeObject.h:215
const TypeKind TK_UINT64
Definition: TypeObject.h:221
const TypeIdentifierKind TI_PLAIN_SEQUENCE_SMALL
Definition: TypeObject.h:260
const EquivalenceKind EK_COMPLETE
Definition: TypeObject.h:206
const TypeIdentifierKind TI_STRING8_SMALL
Definition: TypeObject.h:255

◆ kind()

ACE_CDR::Octet OpenDDS::XTypes::TypeIdentifier::kind ( void  ) const
inline

Definition at line 748 of file TypeObject.h.

References OPENDDS_UNION_ACCESSORS.

Referenced by OpenDDS::XTypes::TypeAssignability::assignable(), OpenDDS::XTypes::TypeAssignability::assignable_alias(), OpenDDS::XTypes::TypeAssignability::assignable_array(), OpenDDS::XTypes::TypeAssignability::assignable_bitmask(), OpenDDS::XTypes::TypeAssignability::assignable_enum(), OpenDDS::XTypes::TypeAssignability::assignable_map(), OpenDDS::XTypes::TypeAssignability::assignable_plain_array(), OpenDDS::XTypes::TypeAssignability::assignable_plain_map(), OpenDDS::XTypes::TypeAssignability::assignable_plain_sequence(), OpenDDS::XTypes::TypeAssignability::assignable_primitive(), OpenDDS::XTypes::TypeAssignability::assignable_sequence(), OpenDDS::XTypes::TypeAssignability::assignable_string(), OpenDDS::XTypes::TypeAssignability::assignable_struct(), OpenDDS::XTypes::TypeAssignability::assignable_union(), OpenDDS::XTypes::TypeLookupService::complete_to_dynamic_i(), OpenDDS::XTypes::compute_dependencies(), OpenDDS::RTPS::Sedp::DiscoveryReader::data_received_i(), OpenDDS::XTypes::TypeAssignability::equal_type_id(), OpenDDS::XTypes::TypeAssignability::get_base_type(), OpenDDS::XTypes::TypeAssignability::get_map_bound(), OpenDDS::XTypes::TypeLookupService::get_minimal_type_identifier(), OpenDDS::XTypes::TypeAssignability::get_sequence_bound(), OpenDDS::XTypes::TypeAssignability::get_string_bound(), OpenDDS::XTypes::TypeAssignability::get_struct_member(), OpenDDS::DCPS::TypeSupportImpl::get_type_name(), OpenDDS::XTypes::TypeAssignability::get_union_member(), OpenDDS::XTypes::TypeLookupService::has_complete(), OpenDDS::XTypes::has_type_object(), OpenDDS::XTypes::TypeAssignability::hold_key(), OpenDDS::XTypes::TypeAssignability::is_delimited(), OpenDDS::XTypes::is_fully_descriptive(), OpenDDS::XTypes::is_plain_collection(), OpenDDS::RTPS::Sedp::match(), OpenDDS::DCPS::StaticEndpointManager::match_continue(), OpenDDS::RTPS::Sedp::match_continue(), OpenDDS::RTPS::Sedp::need_minimal_and_or_complete_types(), OpenDDS::DCPS::operator<<(), OpenDDS::DCPS::serialized_size(), typeobject_generator::strong_connect(), OpenDDS::XTypes::TypeAssignability::struct_rule_enum_key(), OpenDDS::DCPS::TypeSupportImpl::to_type_info(), and OpenDDS::XTypes::TypeLookupService::type_identifier_to_dynamic().

748 { return kind_; }

◆ OPENDDS_UNION_ACCESSORS() [1/11]

OpenDDS::XTypes::TypeIdentifier::OPENDDS_UNION_ACCESSORS ( StringSTypeDefn  ,
string_sdefn   
)

◆ OPENDDS_UNION_ACCESSORS() [2/11]

OpenDDS::XTypes::TypeIdentifier::OPENDDS_UNION_ACCESSORS ( StringLTypeDefn  ,
string_ldefn   
)

◆ OPENDDS_UNION_ACCESSORS() [3/11]

OpenDDS::XTypes::TypeIdentifier::OPENDDS_UNION_ACCESSORS ( PlainSequenceSElemDefn  ,
seq_sdefn   
)

◆ OPENDDS_UNION_ACCESSORS() [4/11]

OpenDDS::XTypes::TypeIdentifier::OPENDDS_UNION_ACCESSORS ( PlainSequenceLElemDefn  ,
seq_ldefn   
)

◆ OPENDDS_UNION_ACCESSORS() [5/11]

OpenDDS::XTypes::TypeIdentifier::OPENDDS_UNION_ACCESSORS ( PlainArraySElemDefn  ,
array_sdefn   
)

◆ OPENDDS_UNION_ACCESSORS() [6/11]

OpenDDS::XTypes::TypeIdentifier::OPENDDS_UNION_ACCESSORS ( PlainArrayLElemDefn  ,
array_ldefn   
)

◆ OPENDDS_UNION_ACCESSORS() [7/11]

OpenDDS::XTypes::TypeIdentifier::OPENDDS_UNION_ACCESSORS ( PlainMapSTypeDefn  ,
map_sdefn   
)

◆ OPENDDS_UNION_ACCESSORS() [8/11]

OpenDDS::XTypes::TypeIdentifier::OPENDDS_UNION_ACCESSORS ( PlainMapLTypeDefn  ,
map_ldefn   
)

◆ OPENDDS_UNION_ACCESSORS() [9/11]

OpenDDS::XTypes::TypeIdentifier::OPENDDS_UNION_ACCESSORS ( StronglyConnectedComponentId  ,
sc_component_id   
)

◆ OPENDDS_UNION_ACCESSORS() [10/11]

OpenDDS::XTypes::TypeIdentifier::OPENDDS_UNION_ACCESSORS ( EquivalenceHash  ,
equivalence_hash   
)

◆ OPENDDS_UNION_ACCESSORS() [11/11]

OpenDDS::XTypes::TypeIdentifier::OPENDDS_UNION_ACCESSORS ( ExtendedTypeDefn  ,
extended_defn   
)

◆ operator<()

bool OpenDDS::XTypes::TypeIdentifier::operator< ( const TypeIdentifier other) const
inline

Definition at line 766 of file TypeObject.h.

References OpenDDS::XTypes::EK_COMPLETE, OpenDDS::XTypes::EK_MINIMAL, kind_, OpenDDS::XTypes::TI_PLAIN_ARRAY_LARGE, OpenDDS::XTypes::TI_PLAIN_ARRAY_SMALL, OpenDDS::XTypes::TI_PLAIN_MAP_LARGE, OpenDDS::XTypes::TI_PLAIN_MAP_SMALL, OpenDDS::XTypes::TI_PLAIN_SEQUENCE_LARGE, OpenDDS::XTypes::TI_PLAIN_SEQUENCE_SMALL, OpenDDS::XTypes::TI_STRING16_LARGE, OpenDDS::XTypes::TI_STRING16_SMALL, OpenDDS::XTypes::TI_STRING8_LARGE, OpenDDS::XTypes::TI_STRING8_SMALL, and OpenDDS::XTypes::TI_STRONGLY_CONNECTED_COMPONENT.

767  {
768  if (kind_ != other.kind_) {
769  return kind_ < other.kind_;
770  }
771 
772  switch (kind_) {
774  return sc_component_id() < other.sc_component_id();
775  case EK_COMPLETE:
776  case EK_MINIMAL:
777  return std::memcmp(equivalence_hash(), other.equivalence_hash(), sizeof equivalence_hash()) < 0;
778  case TI_STRING8_SMALL:
779  case TI_STRING16_SMALL:
780  return string_sdefn() < other.string_sdefn();
781  case TI_STRING8_LARGE:
782  case TI_STRING16_LARGE:
783  return string_ldefn() < other.string_ldefn();
785  return seq_sdefn() < other.seq_sdefn();
787  return seq_ldefn() < other.seq_ldefn();
789  return array_sdefn() < other.array_sdefn();
791  return array_ldefn() < other.array_ldefn();
792  case TI_PLAIN_MAP_SMALL:
793  return map_sdefn() < other.map_sdefn();
794  case TI_PLAIN_MAP_LARGE:
795  return map_ldefn() < other.map_ldefn();
796 
797  default:
798  return false;
799  }
800  }
const TypeIdentifierKind TI_STRONGLY_CONNECTED_COMPONENT
Definition: TypeObject.h:269
const TypeIdentifierKind TI_STRING16_LARGE
Definition: TypeObject.h:258
const TypeIdentifierKind TI_STRING8_LARGE
Definition: TypeObject.h:256
const EquivalenceKind EK_MINIMAL
Definition: TypeObject.h:205
const TypeIdentifierKind TI_PLAIN_ARRAY_LARGE
Definition: TypeObject.h:264
const TypeIdentifierKind TI_PLAIN_SEQUENCE_LARGE
Definition: TypeObject.h:261
const TypeIdentifierKind TI_STRING16_SMALL
Definition: TypeObject.h:257
const TypeIdentifierKind TI_PLAIN_ARRAY_SMALL
Definition: TypeObject.h:263
const TypeIdentifierKind TI_PLAIN_MAP_LARGE
Definition: TypeObject.h:267
const TypeIdentifierKind TI_PLAIN_MAP_SMALL
Definition: TypeObject.h:266
const TypeIdentifierKind TI_PLAIN_SEQUENCE_SMALL
Definition: TypeObject.h:260
const EquivalenceKind EK_COMPLETE
Definition: TypeObject.h:206
const TypeIdentifierKind TI_STRING8_SMALL
Definition: TypeObject.h:255

◆ operator=()

TypeIdentifier & OpenDDS::XTypes::TypeIdentifier::operator= ( const TypeIdentifier other)

Definition at line 187 of file TypeObject.cpp.

References activate(), kind_, and reset().

188 {
189  if (&other == this) {
190  return *this;
191  }
192  reset();
193  kind_ = other.kind_;
194  activate(&other);
195  return *this;
196 }
void activate(const TypeIdentifier *other=0)
Definition: TypeObject.cpp:71

◆ operator==()

bool OpenDDS::XTypes::TypeIdentifier::operator== ( const TypeIdentifier other) const
inline

Definition at line 802 of file TypeObject.h.

803  {
804  return !(*this < other) && !(other < *this);
805  }

◆ reset()

void OpenDDS::XTypes::TypeIdentifier::reset ( void  )
private

Definition at line 135 of file TypeObject.cpp.

References active_, OpenDDS::XTypes::EK_COMPLETE, OpenDDS::XTypes::EK_MINIMAL, kind_, OPENDDS_BRANCH_RESET, OpenDDS::XTypes::TI_PLAIN_ARRAY_LARGE, OpenDDS::XTypes::TI_PLAIN_ARRAY_SMALL, OpenDDS::XTypes::TI_PLAIN_MAP_LARGE, OpenDDS::XTypes::TI_PLAIN_MAP_SMALL, OpenDDS::XTypes::TI_PLAIN_SEQUENCE_LARGE, OpenDDS::XTypes::TI_PLAIN_SEQUENCE_SMALL, OpenDDS::XTypes::TI_STRING16_LARGE, OpenDDS::XTypes::TI_STRING16_SMALL, OpenDDS::XTypes::TI_STRING8_LARGE, OpenDDS::XTypes::TI_STRING8_SMALL, OpenDDS::XTypes::TI_STRONGLY_CONNECTED_COMPONENT, OpenDDS::XTypes::TK_BOOLEAN, OpenDDS::XTypes::TK_BYTE, OpenDDS::XTypes::TK_CHAR16, OpenDDS::XTypes::TK_CHAR8, OpenDDS::XTypes::TK_FLOAT128, OpenDDS::XTypes::TK_FLOAT32, OpenDDS::XTypes::TK_FLOAT64, OpenDDS::XTypes::TK_INT16, OpenDDS::XTypes::TK_INT32, OpenDDS::XTypes::TK_INT64, OpenDDS::XTypes::TK_INT8, OpenDDS::XTypes::TK_NONE, OpenDDS::XTypes::TK_UINT16, OpenDDS::XTypes::TK_UINT32, OpenDDS::XTypes::TK_UINT64, and OpenDDS::XTypes::TK_UINT8.

Referenced by operator=().

136 {
137  if (!active_) {
138  return;
139  }
140 #define OPENDDS_BRANCH_RESET(T) static_cast<T*>(active_)->~T(); break
141  switch (kind_) {
142  case TI_STRING8_SMALL:
143  case TI_STRING16_SMALL:
144  OPENDDS_BRANCH_RESET(StringSTypeDefn);
145  case TI_STRING8_LARGE:
146  case TI_STRING16_LARGE:
147  OPENDDS_BRANCH_RESET(StringLTypeDefn);
149  OPENDDS_BRANCH_RESET(PlainSequenceSElemDefn);
151  OPENDDS_BRANCH_RESET(PlainSequenceLElemDefn);
153  OPENDDS_BRANCH_RESET(PlainArraySElemDefn);
155  OPENDDS_BRANCH_RESET(PlainArrayLElemDefn);
156  case TI_PLAIN_MAP_SMALL:
157  OPENDDS_BRANCH_RESET(PlainMapSTypeDefn);
158  case TI_PLAIN_MAP_LARGE:
159  OPENDDS_BRANCH_RESET(PlainMapLTypeDefn);
161  OPENDDS_BRANCH_RESET(StronglyConnectedComponentId);
162  case EK_COMPLETE:
163  case EK_MINIMAL:
164  break; // no-op, data is just an array of octets
165  case TK_NONE:
166  case TK_BOOLEAN:
167  case TK_BYTE:
168  case TK_INT16:
169  case TK_INT32:
170  case TK_INT64:
171  case TK_UINT16:
172  case TK_UINT32:
173  case TK_UINT64:
174  case TK_FLOAT32:
175  case TK_FLOAT64:
176  case TK_FLOAT128:
177  case TK_INT8:
178  case TK_UINT8:
179  case TK_CHAR8:
180  case TK_CHAR16:
181  break; // no-op, no member selected
182  default:
183  OPENDDS_BRANCH_RESET(ExtendedTypeDefn);
184  }
185 }
const TypeKind TK_INT8
Definition: TypeObject.h:225
const TypeIdentifierKind TI_STRONGLY_CONNECTED_COMPONENT
Definition: TypeObject.h:269
const TypeIdentifierKind TI_STRING16_LARGE
Definition: TypeObject.h:258
const TypeKind TK_FLOAT128
Definition: TypeObject.h:224
const TypeKind TK_CHAR16
Definition: TypeObject.h:228
const TypeIdentifierKind TI_STRING8_LARGE
Definition: TypeObject.h:256
const EquivalenceKind EK_MINIMAL
Definition: TypeObject.h:205
const TypeIdentifierKind TI_PLAIN_ARRAY_LARGE
Definition: TypeObject.h:264
const TypeKind TK_INT32
Definition: TypeObject.h:217
const TypeKind TK_CHAR8
Definition: TypeObject.h:227
const TypeIdentifierKind TI_PLAIN_SEQUENCE_LARGE
Definition: TypeObject.h:261
const TypeIdentifierKind TI_STRING16_SMALL
Definition: TypeObject.h:257
const TypeKind TK_NONE
Definition: TypeObject.h:213
#define OPENDDS_BRANCH_RESET(T)
const TypeIdentifierKind TI_PLAIN_ARRAY_SMALL
Definition: TypeObject.h:263
const TypeKind TK_UINT16
Definition: TypeObject.h:219
const TypeIdentifierKind TI_PLAIN_MAP_LARGE
Definition: TypeObject.h:267
const TypeIdentifierKind TI_PLAIN_MAP_SMALL
Definition: TypeObject.h:266
const TypeKind TK_INT64
Definition: TypeObject.h:218
const TypeKind TK_UINT8
Definition: TypeObject.h:226
const TypeKind TK_FLOAT32
Definition: TypeObject.h:222
const TypeKind TK_BOOLEAN
Definition: TypeObject.h:214
const TypeKind TK_INT16
Definition: TypeObject.h:216
const TypeKind TK_FLOAT64
Definition: TypeObject.h:223
const TypeKind TK_UINT32
Definition: TypeObject.h:220
const TypeKind TK_BYTE
Definition: TypeObject.h:215
const TypeKind TK_UINT64
Definition: TypeObject.h:221
const TypeIdentifierKind TI_PLAIN_SEQUENCE_SMALL
Definition: TypeObject.h:260
const EquivalenceKind EK_COMPLETE
Definition: TypeObject.h:206
const TypeIdentifierKind TI_STRING8_SMALL
Definition: TypeObject.h:255

Member Data Documentation

◆ @25

union { ... }

◆ active_

void* OpenDDS::XTypes::TypeIdentifier::active_
private

Definition at line 809 of file TypeObject.h.

Referenced by activate(), and reset().

◆ kind_

ACE_CDR::Octet OpenDDS::XTypes::TypeIdentifier::kind_
private

Definition at line 808 of file TypeObject.h.

Referenced by activate(), operator<(), operator=(), and reset().

◆ max_alignment

ACE_CDR::ULongLong OpenDDS::XTypes::TypeIdentifier::max_alignment

Definition at line 811 of file TypeObject.h.


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