LCOV - code coverage report
Current view: top level - DCPS/XTypes - TypeObject.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 994 1080 92.0 %
Date: 2023-04-30 01:32:43 Functions: 526 675 77.9 %

          Line data    Source code
       1             : /*
       2             :  * Distributed under the OpenDDS License.
       3             :  * See: http://www.opendds.org/license.html
       4             :  */
       5             : 
       6             : #ifndef OPENDDS_DCPS_XTYPES_TYPE_OBJECT_H
       7             : #define OPENDDS_DCPS_XTYPES_TYPE_OBJECT_H
       8             : 
       9             : #include "External.h"
      10             : 
      11             : #include <dds/DCPS/PoolAllocationBase.h>
      12             : #include <dds/DCPS/PoolAllocator.h>
      13             : #include <dds/DCPS/Serializer.h>
      14             : 
      15             : #include <ace/CDR_Base.h>
      16             : 
      17             : #include <algorithm>
      18             : #include <cstring>
      19             : 
      20             : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
      21             : namespace OpenDDS {
      22             : 
      23             : namespace XTypes {
      24             :   struct TypeInformation;
      25             : }
      26             : 
      27             : namespace DCPS {
      28             :   OpenDDS_Dcps_Export
      29             :   bool operator<<(Serializer& ser, const XTypes::TypeInformation& type_info);
      30             : 
      31             :   OpenDDS_Dcps_Export
      32             :   bool operator>>(Serializer& ser, XTypes::TypeInformation& type_info);
      33             : }
      34             : 
      35             : namespace XTypes {
      36             : 
      37             :   template<typename T, typename T_slice, typename TAG>
      38             :   class Fake_TAO_Array_Forany_T {
      39             :   public:
      40             :     typedef T_slice _slice_type;
      41             : 
      42        1513 :     Fake_TAO_Array_Forany_T (_slice_type *p)
      43        1513 :       : ptr_(p)
      44        1513 :     {}
      45             : 
      46             :     typedef const _slice_type *   _in_type;
      47             :     typedef       _slice_type * & _out_type;
      48             : 
      49           2 :     _in_type      in (void) const
      50             :     {
      51           2 :       return (const T_slice *) this->ptr_;
      52             :     }
      53             : 
      54         767 :     _out_type     out (void)
      55             :     {
      56         767 :       return this->ptr_;
      57             :     }
      58             : 
      59             :   private:
      60             :     _slice_type * ptr_;
      61             :   };
      62             : 
      63             :   OpenDDS_Dcps_Export
      64             :   const DCPS::Encoding& get_typeobject_encoding();
      65             : 
      66             :   template <typename T>
      67             :   class Optional {
      68             :   public:
      69       54145 :     Optional()
      70       54145 :       : present_(false)
      71     5401657 :       , value_()
      72       54145 :     {}
      73             : 
      74          14 :     Optional(const T& v)
      75          14 :       : present_(true)
      76             :     {
      77          14 :       new(value_) T(v);
      78          14 :     }
      79             : 
      80      223777 :     ~Optional() {
      81      223777 :       if (present_) {
      82          25 :         value().~T();
      83             :       }
      84      223777 :     }
      85             : 
      86      169618 :     Optional(const Optional& rhs)
      87      169618 :       : present_(false)
      88    17862298 :       , value_()
      89             :     {
      90      169618 :       *this = rhs;
      91      169618 :     }
      92             : 
      93      178785 :     Optional& operator=(const Optional& rhs) {
      94      178785 :       if (this != &rhs) {
      95      178785 :         if (present_) {
      96           2 :           if (rhs.present_) {
      97           1 :             value() = rhs.value();
      98             :           } else {
      99           1 :             value().~T();
     100             :           }
     101             :         } else {
     102      178783 :           if (rhs.present_) {
     103          12 :             new(value_) T(rhs.value());
     104             :           }
     105             :         }
     106      178785 :         present_ = rhs.present_;
     107             :       }
     108      178785 :       return *this;
     109             :     }
     110             : 
     111         119 :     bool operator==(const Optional& other) const
     112             :     {
     113         119 :       if (present_) {
     114          10 :         return present_ == other.present_ && value() == other.value();
     115             :       }
     116             : 
     117         109 :       return present_ == other.present_;
     118             :     }
     119             : 
     120           2 :     bool operator!=(const Optional& other) const
     121             :     {
     122           2 :       return !(*this == other);
     123             :     }
     124             : 
     125        2220 :     operator bool() const {
     126        2220 :       return present_;
     127             :     }
     128             : 
     129           2 :     bool has_value() const {
     130           2 :       return present_;
     131             :     }
     132             : 
     133          27 :     T& value() {
     134          27 :       return reinterpret_cast<T&>(value_);
     135             :     }
     136             : 
     137          27 :     const T& value() const {
     138          27 :       return reinterpret_cast<const T&>(value_);
     139             :     }
     140             : 
     141             :   private:
     142             :     bool present_;
     143             :     union {
     144             :       ACE_CDR::LongDouble max_alignment;
     145             :       unsigned char value_[sizeof(T)];
     146             :     };
     147             :   };
     148             : 
     149             :   template <typename T>
     150             :   struct Sequence {
     151             :     typedef ACE_CDR::ULong size_type;
     152             :     typedef OPENDDS_VECTOR(T) Members;
     153             :     Members members;
     154             : 
     155        1059 :     Sequence& append(const T& member)
     156             :     {
     157        1059 :       members.push_back(member);
     158        1059 :       return *this;
     159             :     }
     160             : 
     161             :     Sequence& sort()
     162             :     {
     163             :       std::sort(members.begin(), members.end());
     164             :       return *this;
     165             :     }
     166             : 
     167        7931 :     ACE_CDR::ULong length() const
     168             :     {
     169        7931 :       return static_cast<ACE_CDR::ULong>(members.size());
     170             :     }
     171             : 
     172         682 :     void length(ACE_CDR::ULong len)
     173             :     {
     174         682 :       return members.resize(len);
     175             :     }
     176             : 
     177        8998 :     const T& operator[](ACE_CDR::ULong i) const
     178             :     {
     179        8998 :       return members[i];
     180             :     }
     181             : 
     182        1105 :     T& operator[](ACE_CDR::ULong i)
     183             :     {
     184        1105 :       return members[i];
     185             :     }
     186             : 
     187        1817 :     bool operator<(const Sequence& other) const { return members < other.members; }
     188          43 :     bool operator==(const Sequence& other) const { return members == other.members; }
     189           2 :     bool operator!=(const Sequence& other) const { return members != other.members; }
     190             : 
     191         406 :     T* get_buffer() { return &members[0]; }
     192           0 :     const T* get_buffer() const { return &members[0]; }
     193             : 
     194             :     typedef typename Members::const_iterator const_iterator;
     195         302 :     const_iterator begin() const { return members.begin(); }
     196         302 :     const_iterator end() const { return members.end(); }
     197             :   };
     198             : 
     199             :   // Based on dds-xtypes_typeobject.idl
     200             : 
     201             :   // The types in this file shall be serialized with XCDR encoding version 2
     202             : 
     203             :   // ---------- Equivalence Kinds -------------------
     204             :   typedef ACE_CDR::Octet EquivalenceKind;
     205             :   const EquivalenceKind EK_MINIMAL   = 0xF1; // 0x1111 0001
     206             :   const EquivalenceKind EK_COMPLETE  = 0xF2; // 0x1111 0010
     207             :   const EquivalenceKind EK_BOTH      = 0xF3; // 0x1111 0011
     208             : 
     209             :   // ---------- TypeKinds (begin) -------------------
     210             :   typedef ACE_CDR::Octet TypeKind;
     211             : 
     212             :   // Primitive TKs
     213             :   const TypeKind TK_NONE       = 0x00;
     214             :   const TypeKind TK_BOOLEAN    = 0x01;
     215             :   const TypeKind TK_BYTE       = 0x02;
     216             :   const TypeKind TK_INT16      = 0x03;
     217             :   const TypeKind TK_INT32      = 0x04;
     218             :   const TypeKind TK_INT64      = 0x05;
     219             :   const TypeKind TK_UINT16     = 0x06;
     220             :   const TypeKind TK_UINT32     = 0x07;
     221             :   const TypeKind TK_UINT64     = 0x08;
     222             :   const TypeKind TK_FLOAT32    = 0x09;
     223             :   const TypeKind TK_FLOAT64    = 0x0A;
     224             :   const TypeKind TK_FLOAT128   = 0x0B;
     225             :   const TypeKind TK_INT8       = 0x0C; // XTypes 1.3 Annex B
     226             :   const TypeKind TK_UINT8      = 0x0D; // XTypes 1.3 Annex B
     227             :   const TypeKind TK_CHAR8      = 0x10;
     228             :   const TypeKind TK_CHAR16     = 0x11;
     229             : 
     230             :   // String TKs
     231             :   const TypeKind TK_STRING8    = 0x20;
     232             :   const TypeKind TK_STRING16   = 0x21;
     233             : 
     234             :   // Constructed/Named types
     235             :   const TypeKind TK_ALIAS      = 0x30;
     236             : 
     237             :   // Enumerated TKs
     238             :   const TypeKind TK_ENUM       = 0x40;
     239             :   const TypeKind TK_BITMASK    = 0x41;
     240             : 
     241             :   // Structured TKs
     242             :   const TypeKind TK_ANNOTATION = 0x50;
     243             :   const TypeKind TK_STRUCTURE  = 0x51;
     244             :   const TypeKind TK_UNION      = 0x52;
     245             :   const TypeKind TK_BITSET     = 0x53;
     246             : 
     247             :   // Collection TKs
     248             :   const TypeKind TK_SEQUENCE   = 0x60;
     249             :   const TypeKind TK_ARRAY      = 0x61;
     250             :   const TypeKind TK_MAP        = 0x62;
     251             :   // ---------- TypeKinds (end) -------------------
     252             : 
     253             :   // ---------- Extra TypeIdentifiers (begin) ------------
     254             :   typedef ACE_CDR::Octet TypeIdentifierKind;
     255             :   const TypeIdentifierKind TI_STRING8_SMALL        = 0x70;
     256             :   const TypeIdentifierKind TI_STRING8_LARGE        = 0x71;
     257             :   const TypeIdentifierKind TI_STRING16_SMALL       = 0x72;
     258             :   const TypeIdentifierKind TI_STRING16_LARGE       = 0x73;
     259             : 
     260             :   const TypeIdentifierKind TI_PLAIN_SEQUENCE_SMALL = 0x80;
     261             :   const TypeIdentifierKind TI_PLAIN_SEQUENCE_LARGE = 0x81;
     262             : 
     263             :   const TypeIdentifierKind TI_PLAIN_ARRAY_SMALL    = 0x90;
     264             :   const TypeIdentifierKind TI_PLAIN_ARRAY_LARGE    = 0x91;
     265             : 
     266             :   const TypeIdentifierKind TI_PLAIN_MAP_SMALL      = 0xA0;
     267             :   const TypeIdentifierKind TI_PLAIN_MAP_LARGE      = 0xA1;
     268             : 
     269             :   const TypeIdentifierKind TI_STRONGLY_CONNECTED_COMPONENT = 0xB0;
     270             :   // ---------- Extra TypeIdentifiers (end) --------------
     271             : 
     272             :   // The name of some element (e.g. type, type member, module)
     273             :   // Valid characters are alphanumeric plus the "_" cannot start with digit
     274             :   const ACE_CDR::Long MEMBER_NAME_MAX_LENGTH = 256;
     275             :   typedef OPENDDS_STRING MemberName;
     276             : 
     277             :   // Qualified type name includes the name of containing modules
     278             :   // using "::" as separator. No leading "::". E.g. "MyModule::MyType"
     279             :   const ACE_CDR::Long TYPE_NAME_MAX_LENGTH = 256;
     280             :   typedef OPENDDS_STRING QualifiedTypeName;
     281             : 
     282             :   // Every type has an ID. Those of the primitive types are pre-defined.
     283             :   typedef ACE_CDR::Octet PrimitiveTypeId;
     284             : 
     285             :   // First 14 bytes of MD5 of the serialized TypeObject using XCDR
     286             :   // version 2 with Little Endian encoding
     287             :   typedef ACE_CDR::Octet EquivalenceHash[14];
     288             :   struct EquivalenceHash_tag {};
     289             :   typedef ACE_CDR::Octet EquivalenceHash_slice;
     290             :   typedef Fake_TAO_Array_Forany_T<EquivalenceHash, EquivalenceHash_slice, EquivalenceHash_tag> EquivalenceHash_forany;
     291             :   OpenDDS_Dcps_Export DCPS::String equivalence_hash_to_string(const EquivalenceHash& hash);
     292             : 
     293             :   // First 4 bytes of MD5 of of a member name converted to bytes
     294             :   // using UTF-8 encoding and without a 'nul' terminator.
     295             :   // Example: the member name "color" has NameHash {0x70, 0xDD, 0xA5, 0xDF}
     296             :   typedef ACE_CDR::Octet NameHash[4];
     297             :   struct NameHash_tag {};
     298             :   typedef ACE_CDR::Octet NameHash_slice;
     299             :   typedef Fake_TAO_Array_Forany_T<NameHash, NameHash_slice, NameHash_tag> NameHash_forany;
     300             : 
     301          16 :   inline bool name_hash_equal(const NameHash& x, const NameHash& y)
     302             :   {
     303          16 :     return x[0] == y[0] && x[1] == y[1] && x[2] == y[2] && x[3] == y[3];
     304             :   }
     305             : 
     306             :   inline bool name_hash_not_equal(const NameHash& x, const NameHash& y)
     307             :   {
     308             :     return !name_hash_equal(x, y);
     309             :   }
     310             : 
     311             :   // Long Bound of a collection type
     312             :   typedef ACE_CDR::ULong LBound;
     313             :   typedef Sequence<LBound> LBoundSeq;
     314             :   const LBound INVALID_LBOUND = 0;
     315             : 
     316             :   // Short Bound of a collection type
     317             :   typedef ACE_CDR::Octet SBound;
     318             :   typedef Sequence<SBound> SBoundSeq;
     319             :   const SBound INVALID_SBOUND = 0;
     320             : 
     321             :   struct EquivalenceHashWrapper { // not in spec
     322         453 :     EquivalenceHashWrapper(ACE_CDR::Octet a, ACE_CDR::Octet b, ACE_CDR::Octet c, ACE_CDR::Octet d,
     323             :                            ACE_CDR::Octet e, ACE_CDR::Octet f, ACE_CDR::Octet g, ACE_CDR::Octet h,
     324             :                            ACE_CDR::Octet i, ACE_CDR::Octet j, ACE_CDR::Octet k, ACE_CDR::Octet l,
     325             :                            ACE_CDR::Octet m, ACE_CDR::Octet n)
     326         453 :     {
     327         453 :       eh_[0] = a; eh_[1] = b; eh_[2] = c; eh_[3] = d; eh_[4] = e; eh_[5] = f; eh_[6] = g;
     328         453 :       eh_[7] = h; eh_[8] = i; eh_[9] = j; eh_[10] = k; eh_[11] = l; eh_[12] = m; eh_[13] = n;
     329         453 :     }
     330             :     EquivalenceHash eh_;
     331             :   };
     332             : 
     333             :   // union TypeObjectHashId switch (octet) {
     334             :   //     case EK_COMPLETE:
     335             :   //     case EK_MINIMAL:
     336             :   //         EquivalenceHash  hash;
     337             :   // };
     338             :   struct TypeObjectHashId {
     339             :     EquivalenceKind kind;
     340             :     EquivalenceHash hash;
     341             : 
     342         883 :     TypeObjectHashId()
     343         883 :       : kind(0)
     344         883 :     {}
     345             : 
     346          31 :     TypeObjectHashId(const EquivalenceKind& a_kind,
     347             :                      const EquivalenceHashWrapper& a_hash)
     348          31 :       : kind(a_kind)
     349             :     {
     350          31 :       std::memcpy(hash, a_hash.eh_, sizeof hash);
     351          31 :     }
     352             : 
     353        3507 :     bool operator<(const TypeObjectHashId& other) const
     354             :     {
     355        3507 :       if (kind < other.kind) return true;
     356        3250 :       if (other.kind < kind) return false;
     357        3074 :       int ret = std::memcmp(hash, other.hash, sizeof hash);
     358        3074 :       if (ret < 0) return true;
     359        3074 :       if (ret > 0) return false;
     360        3074 :       return false;
     361             :     }
     362             :   };
     363             : 
     364             :   // Flags that apply to struct/union/collection/enum/bitmask/bitset
     365             :   // members/elements and DO affect type assignability
     366             :   // Depending on the flag it may not apply to members of all types
     367             :   // When not all, the applicable member types are listed
     368             :   typedef ACE_CDR::UShort MemberFlag;
     369             :   const MemberFlag TRY_CONSTRUCT1 = 1 << 0;     // T1 | 00 = INVALID, 01 = DISCARD
     370             :   const MemberFlag TRY_CONSTRUCT2 = 1 << 1;     // T2 | 10 = USE_DEFAULT, 11 = TRIM
     371             :   const MemberFlag IS_EXTERNAL = 1 << 2;        // X  StructMember, UnionMember,
     372             :   //    CollectionElement
     373             :   const MemberFlag IS_OPTIONAL = 1 << 3;        // O  StructMember
     374             :   const MemberFlag IS_MUST_UNDERSTAND = 1 << 4; // M  StructMember
     375             :   const MemberFlag IS_KEY = 1 << 5;             // K  StructMember, UnionDiscriminator
     376             :   const MemberFlag IS_DEFAULT = 1 << 6;         // D  UnionMember, EnumerationLiteral
     377             : 
     378             :   typedef MemberFlag CollectionElementFlag;   // T1, T2, X
     379             :   typedef MemberFlag StructMemberFlag;        // T1, T2, O, M, K, X
     380             :   typedef MemberFlag UnionMemberFlag;         // T1, T2, D, X
     381             :   typedef MemberFlag UnionDiscriminatorFlag;  // T1, T2, K
     382             :   typedef MemberFlag EnumeratedLiteralFlag;   // D
     383             :   typedef MemberFlag AnnotationParameterFlag; // Unused. No flags apply
     384             :   typedef MemberFlag AliasMemberFlag;         // Unused. No flags apply
     385             :   typedef MemberFlag BitflagFlag;             // Unused. No flags apply
     386             :   typedef MemberFlag BitsetMemberFlag;        // Unused. No flags apply
     387             : 
     388             :   const MemberFlag TryConstructDiscardValue    = TRY_CONSTRUCT1;
     389             :   const MemberFlag TryConstructUseDefaultValue = TRY_CONSTRUCT2;
     390             :   const MemberFlag TryConstructTrimValue       = TRY_CONSTRUCT1 | TRY_CONSTRUCT2;
     391             : 
     392             :   // Mask used to remove the flags that do not affect assignability
     393             :   // Selects  T1, T2, O, M, K, D
     394             :   const MemberFlag MemberFlagMinimalMask = 0x003f;
     395             : 
     396             :   // Flags that apply to type declarations and DO affect assignability
     397             :   // Depending on the flag it may not apply to all types
     398             :   // When not all, the applicable types are listed
     399             :   typedef ACE_CDR::UShort TypeFlag;
     400             :   const TypeFlag IS_FINAL = 1 << 0;        // F |
     401             :   const TypeFlag IS_APPENDABLE = 1 << 1;   // A |-  Struct, Union
     402             :   const TypeFlag IS_MUTABLE = 1 << 2;      // M |   (exactly one flag)
     403             : 
     404             :   const TypeFlag IS_NESTED = 1 << 3;       // N     Struct, Union
     405             :   const TypeFlag IS_AUTOID_HASH = 1 << 4;  // H     Struct
     406             : 
     407             :   typedef TypeFlag StructTypeFlag;      // All flags apply
     408             :   typedef TypeFlag UnionTypeFlag;       // All flags apply
     409             :   typedef TypeFlag CollectionTypeFlag;  // Unused. No flags apply
     410             :   typedef TypeFlag AnnotationTypeFlag;  // Unused. No flags apply
     411             :   typedef TypeFlag AliasTypeFlag;       // Unused. No flags apply
     412             :   typedef TypeFlag EnumTypeFlag;        // Unused. No flags apply
     413             :   typedef TypeFlag BitmaskTypeFlag;     // Unused. No flags apply
     414             :   typedef TypeFlag BitsetTypeFlag;      // Unused. No flags apply
     415             : 
     416             :   // Mask used to remove the flags that do no affect assignability
     417             :   const TypeFlag TypeFlagMinimalMask = 0x0007; // Selects  M, A, F
     418             : 
     419             :   // Forward declaration
     420             :   class TypeIdentifier;
     421             : 
     422             :   // 1 Byte
     423             :   struct StringSTypeDefn {
     424             :     SBound bound;
     425             : 
     426        1903 :     StringSTypeDefn()
     427        1903 :       : bound(0)
     428        1903 :     {}
     429             : 
     430          60 :     explicit StringSTypeDefn(const SBound a_bound)
     431          60 :       : bound(a_bound)
     432          60 :     {}
     433             : 
     434          86 :     bool operator<(const StringSTypeDefn& other) const
     435             :     {
     436          86 :       return bound < other.bound;
     437             :     }
     438             :   };
     439             : 
     440             :   // 4 Bytes
     441             :   struct StringLTypeDefn {
     442             :     LBound bound;
     443             : 
     444         459 :     StringLTypeDefn()
     445         459 :       : bound(0)
     446         459 :     {}
     447             : 
     448          65 :     explicit StringLTypeDefn(const LBound a_bound)
     449          65 :       : bound(a_bound)
     450          65 :     {}
     451             : 
     452          22 :     bool operator<(const StringLTypeDefn& other) const
     453             :     {
     454          22 :       return bound < other.bound;
     455             :     }
     456             :   };
     457             : 
     458             :   struct PlainCollectionHeader {
     459             :     EquivalenceKind equiv_kind;
     460             :     CollectionElementFlag element_flags;
     461             : 
     462        4209 :     PlainCollectionHeader()
     463        4209 :       : equiv_kind(0)
     464        4209 :       , element_flags(0)
     465        4209 :     {}
     466             : 
     467          69 :     PlainCollectionHeader(const EquivalenceKind& a_equiv_kind,
     468             :                           const CollectionElementFlag& a_element_flags)
     469          69 :       : equiv_kind(a_equiv_kind)
     470          69 :       , element_flags(a_element_flags)
     471          69 :     {}
     472             : 
     473        8549 :     bool operator<(const PlainCollectionHeader& other) const
     474             :     {
     475        8549 :       if (equiv_kind < other.equiv_kind) return true;
     476        8108 :       if (other.equiv_kind < equiv_kind) return false;
     477        7896 :       if (element_flags < other.element_flags) return true;
     478        7896 :       if (other.element_flags < element_flags) return false;
     479        7896 :       return false;
     480             :     }
     481             :   };
     482             : 
     483             :   struct PlainSequenceSElemDefn {
     484             :     PlainCollectionHeader header;
     485             :     SBound bound;
     486             :     External<TypeIdentifier> element_identifier;
     487             : 
     488        2681 :     PlainSequenceSElemDefn()
     489        2681 :       : bound(INVALID_SBOUND)
     490        2681 :     {}
     491             : 
     492          14 :     PlainSequenceSElemDefn(const PlainCollectionHeader& a_header,
     493             :                            const SBound& a_bound,
     494             :                            const TypeIdentifier& a_element_identifier)
     495          14 :       : header(a_header)
     496          14 :       , bound(a_bound)
     497          14 :       , element_identifier(a_element_identifier)
     498          14 :     {}
     499             : 
     500             :     bool operator<(const PlainSequenceSElemDefn& other) const;
     501             :   };
     502             : 
     503             :   struct PlainSequenceLElemDefn {
     504             :     PlainCollectionHeader header;
     505             :     LBound bound;
     506             :     External<TypeIdentifier> element_identifier;
     507             : 
     508          48 :     PlainSequenceLElemDefn()
     509          48 :       : bound(INVALID_LBOUND)
     510          48 :     {}
     511             : 
     512          13 :     PlainSequenceLElemDefn(const PlainCollectionHeader& a_header,
     513             :                            const LBound& a_bound,
     514             :                            const TypeIdentifier& a_element_identifier)
     515          13 :       : header(a_header)
     516          13 :       , bound(a_bound)
     517          13 :       , element_identifier(a_element_identifier)
     518          13 :     {}
     519             : 
     520             :     bool operator<(const PlainSequenceLElemDefn& other) const;
     521             :   };
     522             : 
     523             :   struct PlainArraySElemDefn {
     524             :     PlainCollectionHeader header;
     525             :     SBoundSeq array_bound_seq;
     526             :     External<TypeIdentifier> element_identifier;
     527             : 
     528        1350 :     PlainArraySElemDefn() {}
     529             : 
     530          18 :     PlainArraySElemDefn(const PlainCollectionHeader& a_header,
     531             :                         const SBoundSeq& a_array_bound_seq,
     532             :                         const TypeIdentifier& a_element_identifier)
     533          18 :       : header(a_header)
     534          18 :       , array_bound_seq(a_array_bound_seq)
     535          18 :       , element_identifier(a_element_identifier)
     536          18 :     {}
     537             : 
     538             :     bool operator<(const PlainArraySElemDefn& other) const;
     539             :   };
     540             : 
     541             :   struct PlainArrayLElemDefn {
     542             :     PlainCollectionHeader header;
     543             :     LBoundSeq array_bound_seq;
     544             :     External<TypeIdentifier> element_identifier;
     545             : 
     546          30 :     PlainArrayLElemDefn() {}
     547             : 
     548           6 :     PlainArrayLElemDefn(const PlainCollectionHeader& a_header,
     549             :                         const LBoundSeq& a_array_bound_seq,
     550             :                         const TypeIdentifier& a_element_identifier)
     551           6 :       : header(a_header)
     552           6 :       , array_bound_seq(a_array_bound_seq)
     553           6 :       , element_identifier(a_element_identifier)
     554           6 :     {}
     555             : 
     556             :     bool operator<(const PlainArrayLElemDefn& other) const;
     557             :   };
     558             : 
     559             :   struct PlainMapSTypeDefn {
     560             :     PlainCollectionHeader header;
     561             :     SBound bound;
     562             :     External<TypeIdentifier> element_identifier;
     563             :     CollectionElementFlag key_flags;
     564             :     External<TypeIdentifier> key_identifier;
     565             : 
     566          26 :     PlainMapSTypeDefn()
     567          52 :       : bound(INVALID_SBOUND)
     568          26 :       , key_flags(0)
     569          26 :     {}
     570             : 
     571           8 :     PlainMapSTypeDefn(const PlainCollectionHeader& a_header,
     572             :                       const SBound& a_bound,
     573             :                       const TypeIdentifier& a_element_identifier,
     574             :                       const CollectionElementFlag& a_key_flags,
     575             :                       const TypeIdentifier& a_key_identifier)
     576           8 :       : header(a_header)
     577           8 :       , bound(a_bound)
     578           8 :       , element_identifier(a_element_identifier)
     579           8 :       , key_flags(a_key_flags)
     580           8 :       , key_identifier(a_key_identifier)
     581           8 :     {}
     582             : 
     583             :     bool operator<(const PlainMapSTypeDefn& other) const;
     584             :   };
     585             : 
     586             :   struct PlainMapLTypeDefn {
     587             :     PlainCollectionHeader header;
     588             :     LBound bound;
     589             :     External<TypeIdentifier> element_identifier;
     590             :     CollectionElementFlag key_flags;
     591             :     External<TypeIdentifier> key_identifier;
     592             : 
     593          74 :     PlainMapLTypeDefn()
     594         148 :       : bound(INVALID_LBOUND)
     595          74 :       , key_flags(0)
     596          74 :     {}
     597             : 
     598          10 :     PlainMapLTypeDefn(const PlainCollectionHeader& a_header,
     599             :                       const LBound& a_bound,
     600             :                       const TypeIdentifier& a_element_identifier,
     601             :                       const CollectionElementFlag& a_key_flags,
     602             :                       const TypeIdentifier& a_key_identifier)
     603          10 :       : header(a_header)
     604          10 :       , bound(a_bound)
     605          10 :       , element_identifier(a_element_identifier)
     606          10 :       , key_flags(a_key_flags)
     607          10 :       , key_identifier(a_key_identifier)
     608          10 :     {}
     609             : 
     610             :     bool operator<(const PlainMapLTypeDefn& other) const;
     611             :   };
     612             : 
     613             :   // Used for Types that have cyclic dependencies with other types
     614             :   struct StronglyConnectedComponentId {
     615             :     TypeObjectHashId sc_component_id; // Hash StronglyConnectedComponent
     616             :     ACE_CDR::Long scc_length; // StronglyConnectedComponent.length
     617             :     ACE_CDR::Long scc_index; // identify type in Strongly Connected Comp.
     618             : 
     619         883 :     StronglyConnectedComponentId()
     620        1766 :       : scc_length(0)
     621         883 :       , scc_index(0)
     622         883 :     {}
     623             : 
     624          31 :     StronglyConnectedComponentId(const TypeObjectHashId& a_sc_component_id,
     625             :                                  const ACE_CDR::Long& a_scc_length,
     626             :                                  const ACE_CDR::Long& a_scc_index)
     627          31 :       : sc_component_id(a_sc_component_id)
     628          31 :       , scc_length(a_scc_length)
     629          31 :       , scc_index(a_scc_index)
     630          31 :     {}
     631             : 
     632        1794 :     bool operator<(const StronglyConnectedComponentId& other) const
     633             :     {
     634        1794 :       if (sc_component_id < other.sc_component_id) return true;
     635        1713 :       if (other.sc_component_id < sc_component_id) return false;
     636        1537 :       if (scc_length < other.scc_length) return true;
     637        1537 :       if (other.scc_length < scc_length) return false;
     638        1537 :       if (scc_index < other.scc_index) return true;
     639         950 :       if (other.scc_index < scc_index) return false;
     640         560 :       return false;
     641             :     }
     642             :   };
     643             : 
     644             :   // Future extensibility
     645             :   struct ExtendedTypeDefn {
     646             :     // Empty. Available for future extension
     647             :   };
     648             : 
     649             :   // The TypeIdentifier uniquely identifies a type (a set of equivalent
     650             :   // types according to an equivalence relationship:  COMPLETE, MNIMAL).
     651             :   //
     652             :   // In some cases (primitive types, strings, plain types) the identifier
     653             :   // is a explicit description of the type.
     654             :   // In other cases the Identifier is a Hash of the type description
     655             :   //
     656             :   // In the case of primitive types and strings the implied equivalence
     657             :   // relation is the identity.
     658             :   //
     659             :   // For Plain Types and Hash-defined TypeIdentifiers there are three
     660             :   //  possibilities: MINIMAL, COMPLETE, and COMMON:
     661             :   //   - MINIMAL indicates the TypeIdentifier identifies equivalent types
     662             :   //     according to the MINIMAL equivalence relation
     663             :   //   - COMPLETE indicates the TypeIdentifier identifies equivalent types
     664             :   //     according to the COMPLETE equivalence relation
     665             :   //   - COMMON indicates the TypeIdentifier identifies equivalent types
     666             :   //     according to both the MINIMAL and the COMMON equivalence relation.
     667             :   //     This means the TypeIdentifier is the same for both relationships
     668             :   //
     669             :   // @extensibility(FINAL) @nested
     670             :   // union TypeIdentifier switch (octet) {
     671             :   //   // ============  Primitive types - use TypeKind ====================
     672             :   //   // All primitive types fall here.
     673             :   //   // Commented-out because Unions cannot have cases with no member.
     674             :   //   /*
     675             :   //     case TK_NONE:
     676             :   //     case TK_BOOLEAN:
     677             :   //     case TK_BYTE:
     678             :   //     case TK_INT16:
     679             :   //     case TK_INT32:
     680             :   //     case TK_INT64:
     681             :   //     case TK_UINT16:
     682             :   //     case TK_UINT32:
     683             :   //     case TK_UINT64:
     684             :   //     case TK_FLOAT32:
     685             :   //     case TK_FLOAT64:
     686             :   //     case TK_FLOAT128:
     687             :   //     case TK_CHAR8:
     688             :   //     case TK_CHAR16:
     689             :   //     // No Value
     690             :   //     */
     691             : 
     692             :   //   // ============ Strings - use TypeIdentifierKind ===================
     693             :   // case TI_STRING8_SMALL:
     694             :   // case TI_STRING16_SMALL:
     695             :   //   StringSTypeDefn         string_sdefn;
     696             : 
     697             :   // case TI_STRING8_LARGE:
     698             :   // case TI_STRING16_LARGE:
     699             :   //   StringLTypeDefn         string_ldefn;
     700             : 
     701             :   //   // ============  Plain collections - use TypeIdentifierKind =========
     702             :   // case TI_PLAIN_SEQUENCE_SMALL:
     703             :   //   PlainSequenceSElemDefn  seq_sdefn;
     704             :   // case TI_PLAIN_SEQUENCE_LARGE:
     705             :   //   PlainSequenceLElemDefn  seq_ldefn;
     706             : 
     707             :   // case TI_PLAIN_ARRAY_SMALL:
     708             :   //   PlainArraySElemDefn     array_sdefn;
     709             :   // case TI_PLAIN_ARRAY_LARGE:
     710             :   //   PlainArrayLElemDefn     array_ldefn;
     711             : 
     712             :   // case TI_PLAIN_MAP_SMALL:
     713             :   //   PlainMapSTypeDefn       map_sdefn;
     714             :   // case TI_PLAIN_MAP_LARGE:
     715             :   //   PlainMapLTypeDefn       map_ldefn;
     716             : 
     717             :   //   // ============  Types that are mutually dependent on each other ===
     718             :   // case TI_STRONGLY_CONNECTED_COMPONENT:
     719             :   //   StronglyConnectedComponentId  sc_component_id;
     720             : 
     721             :   //   // ============  The remaining cases - use EquivalenceKind =========
     722             :   // case EK_COMPLETE:
     723             :   // case EK_MINIMAL:
     724             :   //   EquivalenceHash         equivalence_hash;
     725             : 
     726             :   //   // ===================  Future extensibility  ============
     727             :   //   // Future extensions
     728             :   // default:
     729             :   //   ExtendedTypeDefn        extended_defn;
     730             :   // };
     731             : 
     732             :   class OpenDDS_Dcps_Export TypeIdentifier : public DCPS::PoolAllocationBase {
     733             :   public:
     734             :     explicit TypeIdentifier(ACE_CDR::Octet kind = TK_NONE);
     735             :     TypeIdentifier(const TypeIdentifier& other);
     736             :     TypeIdentifier& operator=(const TypeIdentifier& other);
     737      154993 :     ~TypeIdentifier() { reset(); }
     738             : 
     739             :     TypeIdentifier(ACE_CDR::Octet kind, const StringSTypeDefn& sdefn);
     740             :     TypeIdentifier(ACE_CDR::Octet kind, const StringLTypeDefn& ldefn);
     741             :     TypeIdentifier(ACE_CDR::Octet kind, const PlainSequenceSElemDefn& sdefn);
     742             :     TypeIdentifier(ACE_CDR::Octet kind, const PlainSequenceLElemDefn& ldefn);
     743             :     TypeIdentifier(ACE_CDR::Octet kind, const PlainArraySElemDefn& sdefn);
     744             :     TypeIdentifier(ACE_CDR::Octet kind, const PlainArrayLElemDefn& ldefn);
     745             :     TypeIdentifier(ACE_CDR::Octet kind, const EquivalenceHashWrapper& equivalence_hash);
     746             :     TypeIdentifier(ACE_CDR::Octet kind, const StronglyConnectedComponentId& sc_component_id);
     747             : 
     748       14330 :     ACE_CDR::Octet kind() const { return kind_; }
     749             : 
     750             : #define OPENDDS_UNION_ACCESSORS(T, N)                         \
     751             :     const T& N() const { return *static_cast<T*>(active_); }  \
     752             :     T& N() { return *static_cast<T*>(active_); }
     753        3985 :     OPENDDS_UNION_ACCESSORS(StringSTypeDefn, string_sdefn);
     754         880 :     OPENDDS_UNION_ACCESSORS(StringLTypeDefn, string_ldefn);
     755       12859 :     OPENDDS_UNION_ACCESSORS(PlainSequenceSElemDefn, seq_sdefn);
     756          86 :     OPENDDS_UNION_ACCESSORS(PlainSequenceLElemDefn, seq_ldefn);
     757        5042 :     OPENDDS_UNION_ACCESSORS(PlainArraySElemDefn, array_sdefn);
     758          55 :     OPENDDS_UNION_ACCESSORS(PlainArrayLElemDefn, array_ldefn);
     759          45 :     OPENDDS_UNION_ACCESSORS(PlainMapSTypeDefn, map_sdefn);
     760         166 :     OPENDDS_UNION_ACCESSORS(PlainMapLTypeDefn, map_ldefn);
     761        5285 :     OPENDDS_UNION_ACCESSORS(StronglyConnectedComponentId, sc_component_id);
     762      119195 :     OPENDDS_UNION_ACCESSORS(EquivalenceHash, equivalence_hash);
     763           0 :     OPENDDS_UNION_ACCESSORS(ExtendedTypeDefn, extended_defn);
     764             : #undef OPENDDS_UNION_ACCESSORS
     765             : 
     766       77518 :     bool operator<(const TypeIdentifier& other) const
     767             :     {
     768       77518 :       if (kind_ != other.kind_) {
     769       31416 :         return kind_ < other.kind_;
     770             :       }
     771             : 
     772       46102 :       switch (kind_) {
     773        1794 :       case TI_STRONGLY_CONNECTED_COMPONENT:
     774        1794 :         return sc_component_id() < other.sc_component_id();
     775       37927 :       case EK_COMPLETE:
     776             :       case EK_MINIMAL:
     777       37927 :         return std::memcmp(equivalence_hash(), other.equivalence_hash(), sizeof equivalence_hash()) < 0;
     778          86 :       case TI_STRING8_SMALL:
     779             :       case TI_STRING16_SMALL:
     780          86 :         return string_sdefn() < other.string_sdefn();
     781          22 :       case TI_STRING8_LARGE:
     782             :       case TI_STRING16_LARGE:
     783          22 :         return string_ldefn() < other.string_ldefn();
     784        3378 :       case TI_PLAIN_SEQUENCE_SMALL:
     785        3378 :         return seq_sdefn() < other.seq_sdefn();
     786           0 :       case TI_PLAIN_SEQUENCE_LARGE:
     787           0 :         return seq_ldefn() < other.seq_ldefn();
     788        1011 :       case TI_PLAIN_ARRAY_SMALL:
     789        1011 :         return array_sdefn() < other.array_sdefn();
     790           0 :       case TI_PLAIN_ARRAY_LARGE:
     791           0 :         return array_ldefn() < other.array_ldefn();
     792           0 :       case TI_PLAIN_MAP_SMALL:
     793           0 :         return map_sdefn() < other.map_sdefn();
     794           0 :       case TI_PLAIN_MAP_LARGE:
     795           0 :         return map_ldefn() < other.map_ldefn();
     796             : 
     797        1884 :       default:
     798        1884 :         return false;
     799             :       }
     800             :     }
     801             : 
     802         715 :     bool operator==(const TypeIdentifier& other) const
     803             :     {
     804         715 :       return !(*this < other) && !(other < *this);
     805             :     }
     806             : 
     807             :   private:
     808             :     ACE_CDR::Octet kind_;
     809             :     void* active_;
     810             :     union {
     811             :       ACE_CDR::ULongLong max_alignment;
     812             : #define OPENDDS_UNION_MEMBER(T, N) unsigned char N ## _[sizeof(T)]
     813             :       OPENDDS_UNION_MEMBER(StringSTypeDefn, string_sdefn);
     814             :       OPENDDS_UNION_MEMBER(StringLTypeDefn, string_ldefn);
     815             :       OPENDDS_UNION_MEMBER(PlainSequenceSElemDefn, seq_sdefn);
     816             :       OPENDDS_UNION_MEMBER(PlainSequenceLElemDefn, seq_ldefn);
     817             :       OPENDDS_UNION_MEMBER(PlainArraySElemDefn, array_sdefn);
     818             :       OPENDDS_UNION_MEMBER(PlainArrayLElemDefn, array_ldefn);
     819             :       OPENDDS_UNION_MEMBER(PlainMapSTypeDefn, map_sdefn);
     820             :       OPENDDS_UNION_MEMBER(PlainMapLTypeDefn, map_ldefn);
     821             :       OPENDDS_UNION_MEMBER(StronglyConnectedComponentId, sc_component_id);
     822             :       OPENDDS_UNION_MEMBER(EquivalenceHash, equivalence_hash);
     823             :       OPENDDS_UNION_MEMBER(ExtendedTypeDefn, extended_defn);
     824             : #undef OPENDDS_UNION_MEMBER
     825             :     };
     826             :     void activate(const TypeIdentifier* other = 0);
     827             :     void reset();
     828             :   };
     829             : 
     830             :   typedef Sequence<TypeIdentifier> TypeIdentifierSeq;
     831             : 
     832             :   // Operators less-than of member types of TypeIdentifier
     833        3378 :   inline bool PlainSequenceSElemDefn::operator<(const PlainSequenceSElemDefn& other) const
     834             :   {
     835        3378 :     if (header < other.header) return true;
     836        3196 :     if (other.header < header) return false;
     837        3035 :     if (bound < other.bound) return true;
     838        3035 :     if (other.bound < bound) return false;
     839        3035 :     if (*element_identifier < *other.element_identifier) return true;
     840        1360 :     if (*other.element_identifier < *element_identifier) return false;
     841         122 :     return false;
     842             :   }
     843             : 
     844           0 :   inline bool PlainSequenceLElemDefn::operator<(const PlainSequenceLElemDefn& other) const
     845             :   {
     846           0 :     if (header < other.header) return true;
     847           0 :     if (other.header < header) return false;
     848           0 :     if (bound < other.bound) return true;
     849           0 :     if (other.bound < bound) return false;
     850           0 :     if (*element_identifier < *other.element_identifier) return true;
     851           0 :     if (*other.element_identifier < *element_identifier) return false;
     852           0 :     return false;
     853             :   }
     854             : 
     855        1011 :   inline bool PlainArraySElemDefn::operator<(const PlainArraySElemDefn& other) const
     856             :   {
     857        1011 :     if (header < other.header) return true;
     858         964 :     if (other.header < header) return false;
     859         913 :     if (array_bound_seq < other.array_bound_seq) return true;
     860         904 :     if (other.array_bound_seq < array_bound_seq) return false;
     861         896 :     if (*element_identifier < *other.element_identifier) return true;
     862         444 :     if (*other.element_identifier < *element_identifier) return false;
     863         128 :     return false;
     864             :   }
     865             : 
     866           0 :   inline bool PlainArrayLElemDefn::operator<(const PlainArrayLElemDefn& other) const
     867             :   {
     868           0 :     if (header < other.header) return true;
     869           0 :     if (other.header < header) return false;
     870           0 :     if (array_bound_seq < other.array_bound_seq) return true;
     871           0 :     if (other.array_bound_seq < array_bound_seq) return false;
     872           0 :     if (*element_identifier < *other.element_identifier) return true;
     873           0 :     if (*other.element_identifier < *element_identifier) return false;
     874           0 :     return false;
     875             :   }
     876             : 
     877           0 :   inline bool PlainMapSTypeDefn::operator<(const PlainMapSTypeDefn& other) const
     878             :   {
     879           0 :     if (header < other.header) return true;
     880           0 :     if (other.header < header) return false;
     881           0 :     if (bound < other.bound) return true;
     882           0 :     if (other.bound < bound) return false;
     883           0 :     if (*element_identifier < *other.element_identifier) return true;
     884           0 :     if (*other.element_identifier < *element_identifier) return false;
     885           0 :     if (key_flags < other.key_flags) return true;
     886           0 :     if (other.key_flags < key_flags) return false;
     887           0 :     if (*key_identifier < *other.key_identifier) return true;
     888           0 :     if (*other.key_identifier < *key_identifier) return false;
     889           0 :     return false;
     890             :   }
     891             : 
     892           0 :   inline bool PlainMapLTypeDefn::operator<(const PlainMapLTypeDefn& other) const
     893             :   {
     894           0 :     if (header < other.header) return true;
     895           0 :     if (other.header < header) return false;
     896           0 :     if (bound < other.bound) return true;
     897           0 :     if (other.bound < bound) return false;
     898           0 :     if (*element_identifier < *other.element_identifier) return true;
     899           0 :     if (*other.element_identifier < *element_identifier) return false;
     900           0 :     if (key_flags < other.key_flags) return true;
     901           0 :     if (other.key_flags < key_flags) return false;
     902           0 :     if (*key_identifier < *other.key_identifier) return true;
     903           0 :     if (*other.key_identifier < *key_identifier) return false;
     904           0 :     return false;
     905             :   }
     906             : 
     907             :   // --- Annotation usage: -----------------------------------------------
     908             : 
     909             :   // ID of a type member
     910             :   typedef ACE_CDR::ULong MemberId;
     911             :   const ACE_CDR::ULong MEMBER_ID_INVALID = ACE_UINT32_MAX;
     912             :   /// Implementation specific sentinel for a union discriminator used in DynamicData
     913             :   const ACE_CDR::ULong DISCRIMINATOR_ID = MEMBER_ID_INVALID - 1;
     914             :   const ACE_CDR::ULong ANNOTATION_STR_VALUE_MAX_LEN = 128;
     915             :   const ACE_CDR::ULong ANNOTATION_OCTETSEC_VALUE_MAX_LEN = 128;
     916             : 
     917             :   struct ExtendedAnnotationParameterValue {
     918             :     // Empty. Available for future extension
     919           1 :     bool operator==(const ExtendedAnnotationParameterValue&) const
     920             :     {
     921           1 :       return true;
     922             :     }
     923             : 
     924             :     bool operator!=(const ExtendedAnnotationParameterValue& other) const
     925             :     {
     926             :       return !(*this == other);
     927             :     }
     928             :   };
     929             : 
     930             :   /* Literal value of an annotation member: either the default value in its
     931             :    * definition or the value applied in its usage.
     932             :    */
     933             :   // @extensibility(FINAL) @nested
     934             :   // union AnnotationParameterValue switch (octet) {
     935             :   // case TK_BOOLEAN:
     936             :   //   boolean             boolean_value;
     937             :   // case TK_BYTE:
     938             :   //   octet               byte_value;
     939             :   // case TK_INT8:
     940             :   //   int8                int8_value;
     941             :   // case TK_UINT8:
     942             :   //   uint8               uint8_value;
     943             :   // case TK_INT16:
     944             :   //   short               int16_value;
     945             :   // case TK_UINT16:
     946             :   //   unsigned short      uint_16_value;
     947             :   // case TK_INT32:
     948             :   //   long                int32_value;
     949             :   // case TK_UINT32:
     950             :   //   unsigned long       uint32_value;
     951             :   // case TK_INT64:
     952             :   //   long long           int64_value;
     953             :   // case TK_UINT64:
     954             :   //   unsigned long long  uint64_value;
     955             :   // case TK_FLOAT32:
     956             :   //   float               float32_value;
     957             :   // case TK_FLOAT64:
     958             :   //   double              float64_value;
     959             :   // case TK_FLOAT128:
     960             :   //   long double         float128_value;
     961             :   // case TK_CHAR8:
     962             :   //   char                char_value;
     963             :   // case TK_CHAR16:
     964             :   //   wchar               wchar_value;
     965             :   // case TK_ENUM:
     966             :   //   long                enumerated_value;
     967             :   // case TK_STRING8:
     968             :   //   string<ANNOTATION_STR_VALUE_MAX_LEN>  string8_value;
     969             :   // case TK_STRING16:
     970             :   //   wstring<ANNOTATION_STR_VALUE_MAX_LEN> string16_value;
     971             :   // default:
     972             :   //   ExtendedAnnotationParameterValue      extended_value;
     973             :   // };
     974             : 
     975             :   class OpenDDS_Dcps_Export AnnotationParameterValue {
     976             :   public:
     977             : 
     978             :     explicit AnnotationParameterValue(ACE_CDR::Octet kind = TK_NONE);
     979             :     AnnotationParameterValue(const AnnotationParameterValue& other);
     980             :     AnnotationParameterValue& operator=(const AnnotationParameterValue& other);
     981          93 :     ~AnnotationParameterValue() { reset(); }
     982             : 
     983           2 :     ACE_CDR::Octet kind() const { return kind_; }
     984             : 
     985             : #define OPENDDS_UNION_ACCESSORS(T, N)                         \
     986             :     const T& N() const { return *static_cast<T*>(active_); }  \
     987             :     T& N() { return *static_cast<T*>(active_); }
     988          33 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::Boolean, boolean_value);
     989           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::Octet, byte_value);
     990           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::Char, int8_value);
     991           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::Octet, uint8_value);
     992           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::Short, int16_value);
     993           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::UShort, uint16_value); // OMG Issue DDSXTY14-46.
     994           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::Long, int32_value);
     995           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::ULong, uint32_value);
     996           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::LongLong, int64_value);
     997           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::ULongLong, uint64_value);
     998           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::Float, float32_value);
     999           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::Double, float64_value);
    1000           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::LongDouble, float128_value);
    1001           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::Char, char_value);
    1002           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::WChar, wchar_value);
    1003           8 :     OPENDDS_UNION_ACCESSORS(ACE_CDR::Long, enumerated_value);
    1004           8 :     OPENDDS_UNION_ACCESSORS(OPENDDS_STRING, string8_value);
    1005          12 :     OPENDDS_UNION_ACCESSORS(OPENDDS_WSTRING, string16_value);
    1006           0 :     OPENDDS_UNION_ACCESSORS(ExtendedAnnotationParameterValue, extended_value);
    1007             : #undef OPENDDS_UNION_ACCESSORS
    1008             : 
    1009          42 :     bool operator==(const AnnotationParameterValue& other) const
    1010             :     {
    1011          42 :       if (kind_ != other.kind_) return false;
    1012             : 
    1013          41 :       switch (kind_) {
    1014           1 :       case TK_NONE:
    1015           1 :         return true;
    1016           5 :       case TK_BOOLEAN:
    1017           5 :         return boolean_value() == other.boolean_value();
    1018           2 :       case TK_BYTE:
    1019           2 :         return byte_value() == other.byte_value();
    1020           2 :       case TK_INT8:
    1021           2 :         return int8_value() == other.int8_value();
    1022           2 :       case TK_UINT8:
    1023           2 :         return uint8_value() == other.uint8_value();
    1024           2 :       case TK_INT16:
    1025           2 :         return int16_value() == other.int16_value();
    1026           2 :       case TK_UINT16:
    1027           2 :         return uint16_value() == other.uint16_value();
    1028           2 :       case TK_INT32:
    1029           2 :         return int32_value() == other.int32_value();
    1030           2 :       case TK_UINT32:
    1031           2 :         return uint32_value() == other.uint32_value();
    1032           2 :       case TK_INT64:
    1033           2 :         return int64_value() == other.int64_value();
    1034           2 :       case TK_UINT64:
    1035           2 :         return uint64_value() == other.uint64_value();
    1036           2 :       case TK_FLOAT32:
    1037           2 :         return float32_value() == other.float32_value();
    1038           2 :       case TK_FLOAT64:
    1039           2 :         return float64_value() == other.float64_value();
    1040           2 :       case TK_FLOAT128:
    1041           2 :         return float128_value() == other.float128_value();
    1042           2 :       case TK_CHAR8:
    1043           2 :         return char_value() == other.char_value();
    1044           2 :       case TK_CHAR16:
    1045           2 :         return wchar_value() == other.wchar_value();
    1046           2 :       case TK_ENUM:
    1047           2 :         return enumerated_value() == other.enumerated_value();
    1048           2 :       case TK_STRING8:
    1049           2 :         return string8_value() == other.string8_value();
    1050           3 :       case TK_STRING16:
    1051           3 :         return string16_value() == other.string16_value();
    1052           0 :       default:
    1053           0 :         return extended_value() == other.extended_value();
    1054             :       }
    1055             :     }
    1056             : 
    1057          19 :     bool operator!=(const AnnotationParameterValue& other) const
    1058             :     {
    1059          19 :       return !(*this == other);
    1060             :     }
    1061             : 
    1062             :   private:
    1063             :     ACE_CDR::Octet kind_;
    1064             :     void* active_;
    1065             :     union {
    1066             :       ACE_CDR::LongDouble max_alignment;
    1067             : #define OPENDDS_UNION_MEMBER(T, N) unsigned char N ## _[sizeof(T)]
    1068             :       OPENDDS_UNION_MEMBER(ACE_CDR::Boolean, boolean_value);
    1069             :       OPENDDS_UNION_MEMBER(ACE_CDR::Octet, byte_value);
    1070             :       OPENDDS_UNION_MEMBER(ACE_CDR::Char, int8_value);
    1071             :       OPENDDS_UNION_MEMBER(ACE_CDR::Octet, uint8_value);
    1072             :       OPENDDS_UNION_MEMBER(ACE_CDR::Short, int16_value);
    1073             :       OPENDDS_UNION_MEMBER(ACE_CDR::UShort, uint16_value); // OMG Issue DDSXTY14-46.
    1074             :       OPENDDS_UNION_MEMBER(ACE_CDR::Long, int32_value);
    1075             :       OPENDDS_UNION_MEMBER(ACE_CDR::ULong, uint32_value);
    1076             :       OPENDDS_UNION_MEMBER(ACE_CDR::LongLong, int64_value);
    1077             :       OPENDDS_UNION_MEMBER(ACE_CDR::ULongLong, uint64_value);
    1078             :       OPENDDS_UNION_MEMBER(ACE_CDR::Float, float32_value);
    1079             :       OPENDDS_UNION_MEMBER(ACE_CDR::Double, float64_value);
    1080             :       OPENDDS_UNION_MEMBER(ACE_CDR::LongDouble, float128_value);
    1081             :       OPENDDS_UNION_MEMBER(ACE_CDR::Char, char_value);
    1082             :       OPENDDS_UNION_MEMBER(ACE_CDR::WChar, wchar_value);
    1083             :       OPENDDS_UNION_MEMBER(ACE_CDR::Long, enumerated_value);
    1084             :       OPENDDS_UNION_MEMBER(DCPS::String, string8_value);
    1085             :       OPENDDS_UNION_MEMBER(DCPS::WString, string16_value);
    1086             :       OPENDDS_UNION_MEMBER(ExtendedAnnotationParameterValue, extended_value);
    1087             : #undef OPENDDS_UNION_MEMBER
    1088             :     };
    1089             :     void activate(const AnnotationParameterValue* other = 0);
    1090             :     void reset();
    1091             :   };
    1092             : 
    1093             :   // The application of an annotation to some type or type member
    1094             :   struct AppliedAnnotationParameter {
    1095             :     NameHash paramname_hash;
    1096             :     AnnotationParameterValue value;
    1097             : 
    1098           3 :     AppliedAnnotationParameter()
    1099           3 :     {
    1100           3 :       paramname_hash[0] = paramname_hash[1] = paramname_hash[2] = paramname_hash[3] = 0;
    1101           3 :     }
    1102             : 
    1103             :     AppliedAnnotationParameter(ACE_CDR::Octet a, ACE_CDR::Octet b, ACE_CDR::Octet c, ACE_CDR::Octet d, const AnnotationParameterValue& a_value)
    1104             :       : value(a_value)
    1105             :     {
    1106             :       paramname_hash[0] = a;
    1107             :       paramname_hash[1] = b;
    1108             :       paramname_hash[2] = c;
    1109             :       paramname_hash[3] = d;
    1110             :     }
    1111             : 
    1112             :     AppliedAnnotationParameter(const NameHash& a_name_hash,
    1113             :                                const AnnotationParameterValue& a_value)
    1114             :       : value(a_value)
    1115             :     {
    1116             :       std::memcpy(&paramname_hash, a_name_hash, sizeof paramname_hash);
    1117             :     }
    1118             : 
    1119             :     bool operator<(const AppliedAnnotationParameter& other) const
    1120             :     {
    1121             :       return std::memcmp(paramname_hash, other.paramname_hash, sizeof paramname_hash) < 0;
    1122             :     }
    1123             : 
    1124           2 :     bool operator==(const AppliedAnnotationParameter& other) const
    1125             :     {
    1126           2 :       return name_hash_equal(paramname_hash, other.paramname_hash) && value == other.value;
    1127             :     }
    1128             : 
    1129           1 :     bool operator!=(const AppliedAnnotationParameter& other) const
    1130             :     {
    1131           1 :       return !(*this == other);
    1132             :     }
    1133             :   };
    1134             :   // Sorted by AppliedAnnotationParameter.paramname_hash
    1135             :   typedef Sequence<AppliedAnnotationParameter> AppliedAnnotationParameterSeq;
    1136             : 
    1137             :   struct AppliedAnnotation {
    1138             :     TypeIdentifier annotation_typeid;
    1139             :     Optional<AppliedAnnotationParameterSeq> param_seq;
    1140             : 
    1141           0 :     AppliedAnnotation() {}
    1142             : 
    1143             :     AppliedAnnotation(const TypeIdentifier& ann_typeid,
    1144             :                       const Optional<AppliedAnnotationParameterSeq>& a_param_seq)
    1145             :       : annotation_typeid(ann_typeid)
    1146             :       , param_seq(a_param_seq)
    1147             :     {}
    1148             : 
    1149             :     bool operator<(const AppliedAnnotation& other) const
    1150             :     {
    1151             :       return annotation_typeid < other.annotation_typeid;
    1152             :     }
    1153             : 
    1154           0 :     bool operator==(const AppliedAnnotation& other) const
    1155             :     {
    1156           0 :       return annotation_typeid == other.annotation_typeid && param_seq == other.param_seq;
    1157             :     }
    1158             : 
    1159             :     bool operator!=(const AppliedAnnotation& other) const
    1160             :     {
    1161             :       return !(*this == other);
    1162             :     }
    1163             :   };
    1164             :   // Sorted by AppliedAnnotation.annotation_typeid
    1165             :   typedef Sequence<AppliedAnnotation> AppliedAnnotationSeq;
    1166             : 
    1167             :   // @verbatim(placement="<placement>", language="<lang>", text="<text>")
    1168             :   struct AppliedVerbatimAnnotation {
    1169             :     OPENDDS_STRING placement;
    1170             :     OPENDDS_STRING language;
    1171             :     OPENDDS_STRING text;
    1172             : 
    1173           2 :     AppliedVerbatimAnnotation() {}
    1174             : 
    1175           2 :     AppliedVerbatimAnnotation(const OPENDDS_STRING& a_placement,
    1176             :                               const OPENDDS_STRING& a_language,
    1177             :                               const OPENDDS_STRING& a_text)
    1178           2 :       : placement(a_placement)
    1179           2 :       , language(a_language)
    1180           2 :       , text(a_text)
    1181           2 :     {}
    1182             : 
    1183           3 :     bool operator==(const AppliedVerbatimAnnotation& other) const
    1184             :     {
    1185           3 :       return placement == other.placement && language == other.language && text == other.text;
    1186             :     }
    1187             : 
    1188           1 :     bool operator!=(const AppliedVerbatimAnnotation& other) const
    1189             :     {
    1190           1 :       return !(*this == other);
    1191             :     }
    1192             :   };
    1193             : 
    1194             :   // --- Aggregate types: ------------------------------------------------
    1195             :   struct OpenDDS_Dcps_Export AppliedBuiltinMemberAnnotations {
    1196             :     Optional<DCPS::String> unit; // @unit("<unit>")
    1197             :     Optional<AnnotationParameterValue> min; // @min , @range
    1198             :     Optional<AnnotationParameterValue> max; // @max , @range
    1199             :     Optional<DCPS::String> hash_id; // @hash_id("<membername>")
    1200             : 
    1201           4 :     AppliedBuiltinMemberAnnotations() {}
    1202             : 
    1203             :     AppliedBuiltinMemberAnnotations(const Optional<DCPS::String>& a_unit,
    1204             :                                     const Optional<AnnotationParameterValue>& a_min,
    1205             :                                     const Optional<AnnotationParameterValue>& a_max,
    1206             :                                     const Optional<DCPS::String>& a_hash_id);
    1207             : 
    1208           3 :     bool operator==(const AppliedBuiltinMemberAnnotations& other) const
    1209             :     {
    1210           3 :       return unit == other.unit && min == other.min && max == other.max && hash_id == other.hash_id;
    1211             :     }
    1212             : 
    1213           1 :     bool operator!=(const AppliedBuiltinMemberAnnotations& other) const
    1214             :     {
    1215           1 :       return !(*this == other);
    1216             :     }
    1217             :   };
    1218             : 
    1219             :   struct CommonStructMember {
    1220             :     MemberId member_id;
    1221             :     StructMemberFlag member_flags;
    1222             :     TypeIdentifier member_type_id;
    1223             : 
    1224         686 :     CommonStructMember()
    1225         686 :       : member_id(0)
    1226         686 :       , member_flags(0)
    1227         686 :     {}
    1228             : 
    1229          88 :     CommonStructMember (const MemberId& a_member_id,
    1230             :                         const StructMemberFlag& a_member_flags,
    1231             :                         const TypeIdentifier& a_member_type_id)
    1232          88 :       : member_id(a_member_id)
    1233          88 :       , member_flags(a_member_flags)
    1234          88 :       , member_type_id(a_member_type_id)
    1235          88 :     {}
    1236             : 
    1237           7 :     bool operator==(const CommonStructMember& other) const
    1238             :     {
    1239           7 :       return member_id == other.member_id && member_flags == other.member_flags && member_type_id == other.member_type_id;
    1240             :     }
    1241             : 
    1242           1 :     bool operator!=(const CommonStructMember& other) const
    1243             :     {
    1244           1 :       return !(*this == other);
    1245             :     }
    1246             :   };
    1247             : 
    1248             :   // COMPLETE Details for a member of an aggregate type
    1249             :   struct CompleteMemberDetail {
    1250             :     MemberName name;
    1251             :     Optional<AppliedBuiltinMemberAnnotations> ann_builtin;
    1252             :     Optional<AppliedAnnotationSeq> ann_custom;
    1253             : 
    1254         832 :     CompleteMemberDetail() {}
    1255             : 
    1256             :     CompleteMemberDetail(const MemberName& a_name,
    1257             :                          const Optional<AppliedBuiltinMemberAnnotations>& an_ann_builtin,
    1258             :                          const Optional<AppliedAnnotationSeq>& an_ann_custom)
    1259             :       : name(a_name)
    1260             :       , ann_builtin(an_ann_builtin)
    1261             :       , ann_custom(an_ann_custom)
    1262             :     {}
    1263             : 
    1264           8 :     bool operator==(const CompleteMemberDetail& other) const
    1265             :     {
    1266           8 :       return name == other.name && ann_builtin == other.ann_builtin && ann_custom == other.ann_custom;
    1267             :     }
    1268             : 
    1269           1 :     bool operator!=(const CompleteMemberDetail& other) const
    1270             :     {
    1271           1 :       return !(*this == other);
    1272             :     }
    1273             :   };
    1274             : 
    1275             :   // MINIMAL Details for a member of an aggregate type
    1276             :   struct OpenDDS_Dcps_Export MinimalMemberDetail {
    1277             :     NameHash name_hash;
    1278             : 
    1279         292 :     MinimalMemberDetail()
    1280         292 :     {
    1281         292 :       name_hash[0] = name_hash[1] = name_hash[2] = name_hash[3] = 0;
    1282         292 :     }
    1283             : 
    1284           1 :     MinimalMemberDetail(ACE_CDR::Octet a, ACE_CDR::Octet b, ACE_CDR::Octet c, ACE_CDR::Octet d)
    1285           1 :     {
    1286           1 :       name_hash[0] = a; name_hash[1] = b; name_hash[2] = c; name_hash[3] = d;
    1287           1 :     }
    1288             : 
    1289             :     explicit MinimalMemberDetail(const NameHash& a_name_hash)
    1290             :     {
    1291             :       std::memcpy(&name_hash, &a_name_hash, sizeof name_hash);
    1292             :     }
    1293             : 
    1294             :     explicit MinimalMemberDetail(const OPENDDS_STRING& name);
    1295             : 
    1296          12 :     bool operator==(const MinimalMemberDetail& other) const
    1297             :     {
    1298          12 :       return name_hash_equal(name_hash, other.name_hash);
    1299             :     }
    1300             : 
    1301           1 :     bool operator!=(const MinimalMemberDetail& other) const
    1302             :     {
    1303           1 :       return !(*this == other);
    1304             :     }
    1305             :   };
    1306             : 
    1307             :   // Member of an aggregate type
    1308             :   struct CompleteStructMember {
    1309             :     CommonStructMember common;
    1310             :     CompleteMemberDetail detail;
    1311             : 
    1312         493 :     CompleteStructMember() {}
    1313             : 
    1314             :     CompleteStructMember(const CommonStructMember& a_common,
    1315             :                          const CompleteMemberDetail& a_detail)
    1316             :       : common(a_common)
    1317             :       , detail(a_detail)
    1318             :     {}
    1319             : 
    1320             :     bool operator<(const CompleteStructMember& other) const
    1321             :     {
    1322             :       return common.member_id < other.common.member_id;
    1323             :     }
    1324             : 
    1325           2 :     bool operator==(const CompleteStructMember& other) const
    1326             :     {
    1327           2 :       return common == other.common && detail == other.detail;
    1328             :     }
    1329             : 
    1330           1 :     bool operator!=(const CompleteStructMember& other) const
    1331             :     {
    1332           1 :       return !(*this == other);
    1333             :     }
    1334             :   };
    1335             :   // Ordered by the member_index
    1336             :   typedef Sequence<CompleteStructMember> CompleteStructMemberSeq;
    1337             : 
    1338             :   // Member of an aggregate type
    1339             :   struct MinimalStructMember {
    1340             :     CommonStructMember common;
    1341             :     MinimalMemberDetail detail;
    1342             : 
    1343         192 :     MinimalStructMember () {}
    1344             : 
    1345          86 :     MinimalStructMember(const CommonStructMember& a_common,
    1346             :                         const MinimalMemberDetail& a_detail)
    1347          86 :       : common(a_common)
    1348          86 :       , detail(a_detail)
    1349          86 :     {}
    1350             : 
    1351             :     bool operator<(const MinimalStructMember& other) const
    1352             :     {
    1353             :       return common.member_id < other.common.member_id;
    1354             :     }
    1355             : 
    1356           3 :     bool operator==(const MinimalStructMember& other) const
    1357             :     {
    1358           3 :       return common == other.common && detail == other.detail;
    1359             :     }
    1360             : 
    1361           1 :     bool operator!=(const MinimalStructMember& other) const
    1362             :     {
    1363           1 :       return !(*this == other);
    1364             :     }
    1365             :   };
    1366             :   // Ordered by common.member_id
    1367             :   typedef Sequence<MinimalStructMember> MinimalStructMemberSeq;
    1368             : 
    1369             :   struct AppliedBuiltinTypeAnnotations {
    1370             :     Optional<AppliedVerbatimAnnotation> verbatim;  // @verbatim(...)
    1371             : 
    1372           3 :     AppliedBuiltinTypeAnnotations() {}
    1373             : 
    1374             :     explicit AppliedBuiltinTypeAnnotations(const Optional<AppliedVerbatimAnnotation>& a_verbatim)
    1375             :       : verbatim(a_verbatim)
    1376             :     {}
    1377             : 
    1378           2 :     bool operator==(const AppliedBuiltinTypeAnnotations& other) const
    1379             :     {
    1380           2 :       return verbatim == other.verbatim;
    1381             :     }
    1382             : 
    1383           1 :     bool operator!=(const AppliedBuiltinTypeAnnotations& other) const
    1384             :     {
    1385           1 :       return !(*this == other);
    1386             :     }
    1387             :   };
    1388             : 
    1389             :   struct MinimalTypeDetail {
    1390             :     // Empty. Available for future extension
    1391           9 :     bool operator==(const MinimalTypeDetail&) const
    1392             :     {
    1393           9 :       return true;
    1394             :     }
    1395             : 
    1396             :     bool operator!=(const MinimalTypeDetail& other) const
    1397             :     {
    1398             :       return !(*this == other);
    1399             :     }
    1400             :   };
    1401             : 
    1402             :   struct CompleteTypeDetail {
    1403             :     Optional<AppliedBuiltinTypeAnnotations> ann_builtin;
    1404             :     Optional<AppliedAnnotationSeq> ann_custom;
    1405             :     QualifiedTypeName type_name;
    1406             : 
    1407       13118 :     CompleteTypeDetail() {}
    1408             : 
    1409             :     CompleteTypeDetail(const Optional<AppliedBuiltinTypeAnnotations>& an_ann_builtin,
    1410             :                        const Optional<AppliedAnnotationSeq>& an_ann_custom,
    1411             :                        const QualifiedTypeName& a_type_name)
    1412             :       : ann_builtin(an_ann_builtin)
    1413             :       , ann_custom(an_ann_custom)
    1414             :       , type_name(a_type_name)
    1415             :     {}
    1416             : 
    1417          26 :     bool operator==(const CompleteTypeDetail& other) const
    1418             :     {
    1419          26 :       return ann_builtin == other.ann_builtin && ann_custom == other.ann_custom && type_name == other.type_name;
    1420             :     }
    1421             : 
    1422           1 :     bool operator!=(const CompleteTypeDetail& other) const
    1423             :     {
    1424           1 :       return !(*this == other);
    1425             :     }
    1426             :   };
    1427             : 
    1428             :   struct CompleteStructHeader {
    1429             :     TypeIdentifier base_type;
    1430             :     CompleteTypeDetail detail;
    1431             : 
    1432        1874 :     CompleteStructHeader() {}
    1433             : 
    1434             :     CompleteStructHeader(const TypeIdentifier& a_base_type,
    1435             :                          const CompleteTypeDetail& a_detail)
    1436             :       : base_type(a_base_type)
    1437             :       , detail(a_detail)
    1438             :     {}
    1439             : 
    1440           4 :     bool operator==(const CompleteStructHeader& other) const
    1441             :     {
    1442           4 :       return base_type == other.base_type && detail == other.detail;
    1443             :     }
    1444             : 
    1445           1 :     bool operator!=(const CompleteStructHeader& other) const
    1446             :     {
    1447           1 :       return !(*this == other);
    1448             :     }
    1449             :   };
    1450             : 
    1451             :   struct MinimalStructHeader {
    1452             :     TypeIdentifier base_type;
    1453             :     MinimalTypeDetail detail;
    1454             : 
    1455        1640 :     MinimalStructHeader() {}
    1456             : 
    1457           1 :     MinimalStructHeader(const TypeIdentifier& a_base_type,
    1458             :                         const MinimalTypeDetail& a_detail)
    1459           1 :       : base_type(a_base_type)
    1460             :       , detail(a_detail)
    1461           1 :     {}
    1462             : 
    1463           5 :     bool operator==(const MinimalStructHeader& other) const
    1464             :     {
    1465           5 :       return base_type == other.base_type && detail == other.detail;
    1466             :     }
    1467             : 
    1468           1 :     bool operator!=(const MinimalStructHeader& other) const
    1469             :     {
    1470           1 :       return !(*this == other);
    1471             :     }
    1472             :   };
    1473             : 
    1474             :   struct CompleteStructType {
    1475             :     StructTypeFlag struct_flags;
    1476             :     CompleteStructHeader header;
    1477             :     CompleteStructMemberSeq member_seq;
    1478             : 
    1479        1871 :     CompleteStructType()
    1480        1871 :       : struct_flags(0)
    1481        1871 :     {}
    1482             : 
    1483             :     CompleteStructType(const StructTypeFlag& a_struct_flags,
    1484             :                        const CompleteStructHeader& a_header,
    1485             :                        const CompleteStructMemberSeq& a_member_seq)
    1486             :       : struct_flags(a_struct_flags)
    1487             :       , header(a_header)
    1488             :       , member_seq(a_member_seq)
    1489             :     {}
    1490             : 
    1491           3 :     bool operator==(const CompleteStructType& other) const
    1492             :     {
    1493           3 :       return struct_flags == other.struct_flags && header == other.header && member_seq == other.member_seq;
    1494             :     }
    1495             : 
    1496           1 :     bool operator!=(const CompleteStructType& other) const
    1497             :     {
    1498           1 :       return !(*this == other);
    1499             :     }
    1500             :   };
    1501             : 
    1502             :   struct MinimalStructType {
    1503             :     StructTypeFlag struct_flags;
    1504             :     MinimalStructHeader header;
    1505             :     MinimalStructMemberSeq member_seq;
    1506             : 
    1507        1637 :     MinimalStructType()
    1508        1637 :       : struct_flags(0)
    1509        1637 :     {}
    1510             : 
    1511           1 :     MinimalStructType(const StructTypeFlag& a_struct_flags,
    1512             :                       const MinimalStructHeader& a_header,
    1513             :                       const MinimalStructMemberSeq& a_member_seq)
    1514           1 :       : struct_flags(a_struct_flags)
    1515           1 :       , header(a_header)
    1516           1 :       , member_seq(a_member_seq)
    1517           1 :     {}
    1518             : 
    1519           4 :     bool operator==(const MinimalStructType& other) const
    1520             :     {
    1521           4 :       return struct_flags == other.struct_flags && header == other.header && member_seq == other.member_seq;
    1522             :     }
    1523             : 
    1524           1 :     bool operator!=(const MinimalStructType& other) const
    1525             :     {
    1526           1 :       return !(*this == other);
    1527             :     }
    1528             :   };
    1529             : 
    1530             :   // --- Union: ----------------------------------------------------------
    1531             : 
    1532             :   // Case labels that apply to a member of a union type
    1533             :   // Ordered by their values
    1534             :   typedef Sequence<ACE_CDR::Long> UnionCaseLabelSeq;
    1535             : 
    1536             :   struct CommonUnionMember {
    1537             :     MemberId member_id;
    1538             :     UnionMemberFlag member_flags;
    1539             :     TypeIdentifier type_id;
    1540             :     UnionCaseLabelSeq label_seq;
    1541             : 
    1542         314 :     CommonUnionMember()
    1543         314 :       : member_id(0)
    1544         314 :       , member_flags(0)
    1545         314 :     {}
    1546             : 
    1547          66 :     CommonUnionMember(const MemberId& a_member_id,
    1548             :                       const UnionMemberFlag& a_member_flags,
    1549             :                       const TypeIdentifier& a_type_id,
    1550             :                       const UnionCaseLabelSeq& a_label_seq)
    1551          66 :       : member_id(a_member_id)
    1552          66 :       , member_flags(a_member_flags)
    1553          66 :       , type_id(a_type_id)
    1554          66 :       , label_seq(a_label_seq)
    1555          66 :     {}
    1556             : 
    1557           8 :     bool operator==(const CommonUnionMember& other) const
    1558             :     {
    1559           8 :       return member_id == other.member_id && member_flags == other.member_flags && type_id == other.type_id && label_seq == other.label_seq;
    1560             :     }
    1561             : 
    1562           1 :     bool operator!=(const CommonUnionMember& other) const
    1563             :     {
    1564           1 :       return !(*this == other);
    1565             :     }
    1566             :   };
    1567             : 
    1568             :   // Member of a union type
    1569             :   struct CompleteUnionMember {
    1570             :     CommonUnionMember common;
    1571             :     CompleteMemberDetail detail;
    1572             : 
    1573         266 :     CompleteUnionMember() {}
    1574             : 
    1575             :     CompleteUnionMember(const CommonUnionMember& a_common,
    1576             :                         const CompleteMemberDetail& a_detail)
    1577             :       : common(a_common)
    1578             :       , detail(a_detail)
    1579             :     {}
    1580             : 
    1581             :     bool operator<(const CompleteUnionMember& other) const
    1582             :     {
    1583             :       return common.member_id < other.common.member_id;
    1584             :     }
    1585             : 
    1586           2 :     bool operator==(const CompleteUnionMember& other) const
    1587             :     {
    1588           2 :       return common == other.common && detail == other.detail;
    1589             :     }
    1590             : 
    1591           1 :     bool operator!=(const CompleteUnionMember& other) const
    1592             :     {
    1593           1 :       return !(*this == other);
    1594             :     }
    1595             :   };
    1596             :   // Ordered by member_index
    1597             :   typedef Sequence<CompleteUnionMember> CompleteUnionMemberSeq;
    1598             : 
    1599             :   // Member of a union type
    1600             :   struct MinimalUnionMember {
    1601             :     CommonUnionMember common;
    1602             :     MinimalMemberDetail detail;
    1603             : 
    1604          45 :     MinimalUnionMember() {}
    1605             : 
    1606          66 :     MinimalUnionMember(const CommonUnionMember& a_common,
    1607             :                        const MinimalMemberDetail& a_detail)
    1608          66 :       : common(a_common)
    1609          66 :       , detail(a_detail)
    1610          66 :     {}
    1611             : 
    1612             :     bool operator<(const MinimalUnionMember& other) const
    1613             :     {
    1614             :       return common.member_id < other.common.member_id;
    1615             :     }
    1616             : 
    1617           4 :     bool operator==(const MinimalUnionMember& other) const
    1618             :     {
    1619           4 :       return common == other.common && detail == other.detail;
    1620             :     }
    1621             : 
    1622           1 :     bool operator!=(const MinimalUnionMember& other) const
    1623             :     {
    1624           1 :       return !(*this == other);
    1625             :     }
    1626             :   };
    1627             :   // Ordered by MinimalUnionMember.common.member_id
    1628             :   typedef Sequence<MinimalUnionMember> MinimalUnionMemberSeq;
    1629             : 
    1630             :   struct CommonDiscriminatorMember {
    1631             :     UnionDiscriminatorFlag member_flags;
    1632             :     TypeIdentifier type_id;
    1633             : 
    1634        3559 :     CommonDiscriminatorMember()
    1635        3559 :       : member_flags(0)
    1636        3559 :     {}
    1637             : 
    1638             :     CommonDiscriminatorMember(const UnionDiscriminatorFlag& a_member_flags,
    1639             :                               const TypeIdentifier& a_type_id)
    1640             :       : member_flags(a_member_flags)
    1641             :       , type_id(a_type_id)
    1642             :     {}
    1643             : 
    1644          11 :     bool operator==(const CommonDiscriminatorMember& other) const
    1645             :     {
    1646          11 :       return member_flags == other.member_flags && type_id == other.type_id;
    1647             :     }
    1648             : 
    1649           1 :     bool operator!=(const CommonDiscriminatorMember& other) const
    1650             :     {
    1651           1 :       return !(*this == other);
    1652             :     }
    1653             :   };
    1654             : 
    1655             :   // Member of a union type
    1656             :   struct CompleteDiscriminatorMember {
    1657             :     CommonDiscriminatorMember common;
    1658             :     Optional<AppliedBuiltinTypeAnnotations> ann_builtin;
    1659             :     Optional<AppliedAnnotationSeq> ann_custom;
    1660             : 
    1661        1874 :     CompleteDiscriminatorMember() {}
    1662             : 
    1663             :     CompleteDiscriminatorMember(const CommonDiscriminatorMember& a_common,
    1664             :                                 const Optional<AppliedBuiltinTypeAnnotations>& an_ann_builtin,
    1665             :                                 const Optional<AppliedAnnotationSeq>& an_ann_custom)
    1666             :       : common(a_common)
    1667             :       , ann_builtin(an_ann_builtin)
    1668             :       , ann_custom(an_ann_custom)
    1669             :     {}
    1670             : 
    1671           4 :     bool operator==(const CompleteDiscriminatorMember& other) const
    1672             :     {
    1673           4 :       return common == other.common && ann_builtin == other.ann_builtin && ann_custom == other.ann_custom;
    1674             :     }
    1675             : 
    1676           1 :     bool operator!=(const CompleteDiscriminatorMember& other) const
    1677             :     {
    1678           1 :       return !(*this == other);
    1679             :     }
    1680             :   };
    1681             : 
    1682             :   // Member of a union type
    1683             :   struct MinimalDiscriminatorMember {
    1684             :     CommonDiscriminatorMember common;
    1685             : 
    1686        1682 :     MinimalDiscriminatorMember() {}
    1687             : 
    1688             :     explicit MinimalDiscriminatorMember(const CommonDiscriminatorMember& a_common)
    1689             :       : common(a_common)
    1690             :     {}
    1691             : 
    1692           5 :     bool operator==(const MinimalDiscriminatorMember& other) const
    1693             :     {
    1694           5 :       return common == other.common;
    1695             :     }
    1696             : 
    1697           1 :     bool operator!=(const MinimalDiscriminatorMember& other) const
    1698             :     {
    1699           1 :       return !(*this == other);
    1700             :     }
    1701             :   };
    1702             : 
    1703             :   struct CompleteUnionHeader {
    1704             :     CompleteTypeDetail detail;
    1705             : 
    1706        1874 :     CompleteUnionHeader() {}
    1707             : 
    1708             :     explicit CompleteUnionHeader(const CompleteTypeDetail& a_detail)
    1709             :       : detail(a_detail)
    1710             :     {}
    1711             : 
    1712           4 :     bool operator==(const CompleteUnionHeader& other) const
    1713             :     {
    1714           4 :       return detail == other.detail;
    1715             :     }
    1716             : 
    1717           1 :     bool operator!=(const CompleteUnionHeader& other) const
    1718             :     {
    1719           1 :       return !(*this == other);
    1720             :     }
    1721             :   };
    1722             : 
    1723             :   struct MinimalUnionHeader {
    1724             :     MinimalTypeDetail detail;
    1725             : 
    1726        1681 :     MinimalUnionHeader() {}
    1727             : 
    1728             :     explicit MinimalUnionHeader(const MinimalTypeDetail& a_detail)
    1729             :       : detail(a_detail)
    1730             :     {}
    1731             : 
    1732           4 :     bool operator==(const MinimalUnionHeader& other) const
    1733             :     {
    1734           4 :       return detail == other.detail;
    1735             :     }
    1736             : 
    1737             :     bool operator!=(const MinimalUnionHeader& other) const
    1738             :     {
    1739             :       return !(*this == other);
    1740             :     }
    1741             :   };
    1742             : 
    1743             :   struct CompleteUnionType {
    1744             :     UnionTypeFlag union_flags;
    1745             :     CompleteUnionHeader header;
    1746             :     CompleteDiscriminatorMember discriminator;
    1747             :     CompleteUnionMemberSeq member_seq;
    1748             : 
    1749        1871 :     CompleteUnionType()
    1750        1871 :       : union_flags(0)
    1751        1871 :     {}
    1752             : 
    1753             :     CompleteUnionType(const UnionTypeFlag& a_union_flags,
    1754             :                       const CompleteUnionHeader& a_header,
    1755             :                       const CompleteDiscriminatorMember& a_discriminator,
    1756             :                       const CompleteUnionMemberSeq& a_member_seq)
    1757             :       : union_flags(a_union_flags)
    1758             :       , header(a_header)
    1759             :       , discriminator(a_discriminator)
    1760             :       , member_seq(a_member_seq)
    1761             :     {}
    1762             : 
    1763           3 :     bool operator==(const CompleteUnionType& other) const
    1764             :     {
    1765           3 :       return union_flags == other.union_flags && header == other.header && discriminator == other.discriminator && member_seq == other.member_seq;
    1766             :     }
    1767             : 
    1768           1 :     bool operator!=(const CompleteUnionType& other) const
    1769             :     {
    1770           1 :       return !(*this == other);
    1771             :     }
    1772             :   };
    1773             : 
    1774             :   struct MinimalUnionType {
    1775             :     UnionTypeFlag union_flags;
    1776             :     MinimalUnionHeader header;
    1777             :     MinimalDiscriminatorMember discriminator;
    1778             :     MinimalUnionMemberSeq member_seq;
    1779             : 
    1780        1679 :     MinimalUnionType()
    1781        1679 :       : union_flags(0)
    1782        1679 :     {}
    1783             : 
    1784             :     MinimalUnionType(const UnionTypeFlag& a_union_flags,
    1785             :                      const MinimalUnionHeader& a_header,
    1786             :                      const MinimalDiscriminatorMember& a_discriminator,
    1787             :                      const MinimalUnionMemberSeq& a_member_seq)
    1788             :       : union_flags(a_union_flags)
    1789             :       , header(a_header)
    1790             :       , discriminator(a_discriminator)
    1791             :       , member_seq(a_member_seq)
    1792             :     {}
    1793             : 
    1794           4 :     bool operator==(const MinimalUnionType& other) const
    1795             :     {
    1796           4 :       return union_flags == other.union_flags && header == other.header && discriminator == other.discriminator && member_seq == other.member_seq;
    1797             :     }
    1798             : 
    1799           1 :     bool operator!=(const MinimalUnionType& other) const
    1800             :     {
    1801           1 :       return !(*this == other);
    1802             :     }
    1803             :   };
    1804             : 
    1805             :   // --- Annotation: ----------------------------------------------------
    1806             :   struct CommonAnnotationParameter {
    1807             :     AnnotationParameterFlag member_flags;
    1808             :     TypeIdentifier member_type_id;
    1809             : 
    1810           9 :     CommonAnnotationParameter()
    1811           9 :       : member_flags(0)
    1812           9 :     {}
    1813             : 
    1814           6 :     bool operator==(const CommonAnnotationParameter& other) const
    1815             :     {
    1816           6 :       return member_flags == other.member_flags && member_type_id == other.member_type_id;
    1817             :     }
    1818             : 
    1819           1 :     bool operator!=(const CommonAnnotationParameter& other) const
    1820             :     {
    1821           1 :       return !(*this == other);
    1822             :     }
    1823             :   };
    1824             : 
    1825             :   // Member of an annotation type
    1826             :   struct CompleteAnnotationParameter {
    1827             :     CommonAnnotationParameter common;
    1828             :     MemberName name;
    1829             :     AnnotationParameterValue default_value;
    1830             : 
    1831           2 :     bool operator==(const CompleteAnnotationParameter& other) const
    1832             :     {
    1833           2 :       return common == other.common && name == other.name && default_value == other.default_value;
    1834             :     }
    1835             : 
    1836           1 :     bool operator!=(const CompleteAnnotationParameter& other) const
    1837             :     {
    1838           1 :       return !(*this == other);
    1839             :     }
    1840             :   };
    1841             :   // Ordered by CompleteAnnotationParameter.name
    1842             :   typedef Sequence<CompleteAnnotationParameter> CompleteAnnotationParameterSeq;
    1843             : 
    1844             :   struct MinimalAnnotationParameter {
    1845             :     CommonAnnotationParameter common;
    1846             :     NameHash name_hash;
    1847             :     AnnotationParameterValue default_value;
    1848             : 
    1849           3 :     MinimalAnnotationParameter()
    1850           3 :     {
    1851           3 :       name_hash[0] = name_hash[1] = name_hash[2] = name_hash[3] = 0;
    1852           3 :     }
    1853             : 
    1854           2 :     bool operator==(const MinimalAnnotationParameter& other) const
    1855             :     {
    1856           2 :       return common == other.common && name_hash_equal(name_hash, other.name_hash) && default_value == other.default_value;
    1857             :     }
    1858             : 
    1859           1 :     bool operator!=(const MinimalAnnotationParameter& other) const
    1860             :     {
    1861           1 :       return !(*this == other);
    1862             :     }
    1863             :   };
    1864             :   // Ordered by MinimalAnnotationParameter.name_hash
    1865             :   typedef Sequence<MinimalAnnotationParameter> MinimalAnnotationParameterSeq;
    1866             : 
    1867             :   struct CompleteAnnotationHeader {
    1868             :     QualifiedTypeName annotation_name;
    1869             : 
    1870           4 :     bool operator==(const CompleteAnnotationHeader& other) const
    1871             :     {
    1872           4 :       return annotation_name == other.annotation_name;
    1873             :     }
    1874             : 
    1875           1 :     bool operator!=(const CompleteAnnotationHeader& other) const
    1876             :     {
    1877           1 :       return !(*this == other);
    1878             :     }
    1879             :   };
    1880             : 
    1881             :   struct MinimalAnnotationHeader {
    1882             :     // Empty. Available for future extension
    1883             : 
    1884           3 :     bool operator==(const MinimalAnnotationHeader&) const
    1885             :     {
    1886           3 :       return true;
    1887             :     }
    1888             : 
    1889             :     bool operator!=(const MinimalAnnotationHeader& other) const
    1890             :     {
    1891             :       return !(*this == other);
    1892             :     }
    1893             :   };
    1894             : 
    1895             :   struct CompleteAnnotationType {
    1896             :     AnnotationTypeFlag annotation_flag;
    1897             :     CompleteAnnotationHeader header;
    1898             :     CompleteAnnotationParameterSeq member_seq;
    1899             : 
    1900        1871 :     CompleteAnnotationType()
    1901        1871 :       : annotation_flag(0)
    1902        1871 :     {}
    1903             : 
    1904           3 :     bool operator==(const CompleteAnnotationType& other) const
    1905             :     {
    1906           3 :       return annotation_flag == other.annotation_flag && header == other.header && member_seq == other.member_seq;
    1907             :     }
    1908             : 
    1909           1 :     bool operator!=(const CompleteAnnotationType& other) const
    1910             :     {
    1911           1 :       return !(*this == other);
    1912             :     }
    1913             :   };
    1914             : 
    1915             :   struct MinimalAnnotationType {
    1916             :     AnnotationTypeFlag annotation_flag;
    1917             :     MinimalAnnotationHeader header;
    1918             :     MinimalAnnotationParameterSeq member_seq;
    1919             : 
    1920        1681 :     MinimalAnnotationType()
    1921        1681 :       : annotation_flag(0)
    1922        1681 :     {}
    1923             : 
    1924           3 :     bool operator==(const MinimalAnnotationType& other) const
    1925             :     {
    1926           3 :       return annotation_flag == other.annotation_flag && header == other.header && member_seq == other.member_seq;
    1927             :     }
    1928             : 
    1929           1 :     bool operator!=(const MinimalAnnotationType& other) const
    1930             :     {
    1931           1 :       return !(*this == other);
    1932             :     }
    1933             :   };
    1934             : 
    1935             :   // --- Alias: ----------------------------------------------------------
    1936             :   struct CommonAliasBody {
    1937             :     AliasMemberFlag related_flags;
    1938             :     TypeIdentifier related_type;
    1939             : 
    1940        3337 :     CommonAliasBody()
    1941        3337 :       : related_flags(0)
    1942        3337 :     {}
    1943             : 
    1944             :     CommonAliasBody(const AliasMemberFlag& a_related_flags,
    1945             :                     const TypeIdentifier& a_related_type)
    1946             :       : related_flags(a_related_flags)
    1947             :       , related_type(a_related_type)
    1948             :     {}
    1949             : 
    1950          12 :     bool operator==(const CommonAliasBody& other) const
    1951             :     {
    1952          12 :       return related_flags == other.related_flags && related_type == other.related_type;
    1953             :     }
    1954             : 
    1955           1 :     bool operator!=(const CommonAliasBody& other) const
    1956             :     {
    1957           1 :       return !(*this == other);
    1958             :     }
    1959             :   };
    1960             : 
    1961             :   struct CompleteAliasBody {
    1962             :     CommonAliasBody common;
    1963             :     Optional<AppliedBuiltinMemberAnnotations> ann_builtin;
    1964             :     Optional<AppliedAnnotationSeq> ann_custom;
    1965             : 
    1966        1874 :     CompleteAliasBody() {}
    1967             : 
    1968             :     CompleteAliasBody(const CommonAliasBody& a_common,
    1969             :                       const Optional<AppliedBuiltinMemberAnnotations>& an_ann_builtin,
    1970             :                       const Optional<AppliedAnnotationSeq>& an_ann_custom)
    1971             :       : common(a_common)
    1972             :       , ann_builtin(an_ann_builtin)
    1973             :       , ann_custom(an_ann_custom)
    1974             :     {}
    1975             : 
    1976           4 :     bool operator==(const CompleteAliasBody& other) const
    1977             :     {
    1978           4 :       return common == other.common && ann_builtin == other.ann_builtin && ann_custom == other.ann_custom;
    1979             :     }
    1980             : 
    1981           1 :     bool operator!=(const CompleteAliasBody& other) const
    1982             :     {
    1983           1 :       return !(*this == other);
    1984             :     }
    1985             :   };
    1986             : 
    1987             :   struct MinimalAliasBody {
    1988             :     CommonAliasBody common;
    1989             : 
    1990        1460 :     MinimalAliasBody() {}
    1991             : 
    1992             :     explicit MinimalAliasBody(const CommonAliasBody& a_common)
    1993             :       : common(a_common)
    1994             :     {}
    1995             : 
    1996           6 :     bool operator==(const MinimalAliasBody& other) const
    1997             :     {
    1998           6 :       return common == other.common;
    1999             :     }
    2000             : 
    2001           1 :     bool operator!=(const MinimalAliasBody& other) const
    2002             :     {
    2003           1 :       return !(*this == other);
    2004             :     }
    2005             :   };
    2006             : 
    2007             :   struct CompleteAliasHeader {
    2008             :     CompleteTypeDetail detail;
    2009             : 
    2010        1874 :     CompleteAliasHeader() {}
    2011             : 
    2012             :     explicit CompleteAliasHeader(const CompleteTypeDetail& a_detail)
    2013             :       : detail(a_detail)
    2014             :     {}
    2015             : 
    2016           4 :     bool operator==(const CompleteAliasHeader& other) const
    2017             :     {
    2018           4 :       return detail == other.detail;
    2019             :     }
    2020             : 
    2021           1 :     bool operator!=(const CompleteAliasHeader& other) const
    2022             :     {
    2023           1 :       return !(*this == other);
    2024             :     }
    2025             :   };
    2026             : 
    2027             :   struct MinimalAliasHeader {
    2028             :     // Empty. Available for future extension
    2029             : 
    2030           5 :     bool operator==(const MinimalAliasHeader&) const
    2031             :     {
    2032           5 :       return true;
    2033             :     }
    2034             : 
    2035             :     bool operator!=(const MinimalAliasHeader& other) const
    2036             :     {
    2037             :       return !(*this == other);
    2038             :     }
    2039             :   };
    2040             : 
    2041             :   struct CompleteAliasType {
    2042             :     AliasTypeFlag alias_flags;
    2043             :     CompleteAliasHeader header;
    2044             :     CompleteAliasBody body;
    2045             : 
    2046        1871 :     CompleteAliasType()
    2047        1871 :       : alias_flags(0)
    2048        1871 :     {}
    2049             : 
    2050             :     CompleteAliasType(const AliasTypeFlag& a_alias_flags,
    2051             :                       const CompleteAliasHeader& a_header,
    2052             :                       const CompleteAliasBody& a_body)
    2053             :       : alias_flags(a_alias_flags)
    2054             :       , header(a_header)
    2055             :       , body(a_body)
    2056             :     {}
    2057             : 
    2058           3 :     bool operator==(const CompleteAliasType& other) const
    2059             :     {
    2060           3 :       return alias_flags == other.alias_flags && header == other.header && body == other.body;
    2061             :     }
    2062             : 
    2063           1 :     bool operator!=(const CompleteAliasType& other) const
    2064             :     {
    2065           1 :       return !(*this == other);
    2066             :     }
    2067             :   };
    2068             : 
    2069             :   struct MinimalAliasType {
    2070             :     AliasTypeFlag alias_flags;
    2071             :     MinimalAliasHeader header;
    2072             :     MinimalAliasBody body;
    2073             : 
    2074        1457 :     MinimalAliasType()
    2075        1457 :       : alias_flags(0)
    2076        1457 :     {}
    2077             : 
    2078             :     MinimalAliasType(const AliasTypeFlag& a_alias_flags,
    2079             :                      const MinimalAliasHeader& a_header,
    2080             :                      const MinimalAliasBody& a_body)
    2081             :       : alias_flags(a_alias_flags)
    2082             :       , header(a_header)
    2083             :       , body(a_body)
    2084             :     {}
    2085             : 
    2086           5 :     bool operator==(const MinimalAliasType& other) const
    2087             :     {
    2088           5 :       return alias_flags == other.alias_flags && header == other.header && body == other.body;
    2089             :     }
    2090             : 
    2091           1 :     bool operator!=(const MinimalAliasType& other) const
    2092             :     {
    2093           1 :       return !(*this == other);
    2094             :     }
    2095             :   };
    2096             : 
    2097             :   // --- Collections: ----------------------------------------------------
    2098             :   struct CompleteElementDetail {
    2099             :     Optional<AppliedBuiltinMemberAnnotations> ann_builtin;
    2100             :     Optional<AppliedAnnotationSeq> ann_custom;
    2101             : 
    2102        7490 :     CompleteElementDetail() {}
    2103             : 
    2104             :     CompleteElementDetail(const Optional<AppliedBuiltinMemberAnnotations>& an_ann_builtin,
    2105             :                           const Optional<AppliedAnnotationSeq>& an_ann_custom)
    2106             :       : ann_builtin(an_ann_builtin)
    2107             :       , ann_custom(an_ann_custom)
    2108             :     {}
    2109             : 
    2110          11 :     bool operator==(const CompleteElementDetail& other) const
    2111             :     {
    2112          11 :       return ann_builtin == other.ann_builtin && ann_custom == other.ann_custom;
    2113             :     }
    2114             : 
    2115           1 :     bool operator!=(const CompleteElementDetail& other) const
    2116             :     {
    2117           1 :       return !(*this == other);
    2118             :     }
    2119             :   };
    2120             : 
    2121             :   struct CommonCollectionElement {
    2122             :     CollectionElementFlag element_flags;
    2123             :     TypeIdentifier type;
    2124             : 
    2125       13840 :     CommonCollectionElement()
    2126       13840 :       : element_flags(0)
    2127       13840 :     {}
    2128             : 
    2129             :     CommonCollectionElement(CollectionElementFlag a_element_flags,
    2130             :                             const TypeIdentifier& a_type)
    2131             :       : element_flags(a_element_flags)
    2132             :       , type(a_type)
    2133             :     {}
    2134             : 
    2135          22 :     bool operator==(const CommonCollectionElement& other) const
    2136             :     {
    2137          22 :       return element_flags == other.element_flags && type == other.type;
    2138             :     }
    2139             : 
    2140           1 :     bool operator!=(const CommonCollectionElement& other) const
    2141             :     {
    2142           1 :       return !(*this == other);
    2143             :     }
    2144             :   };
    2145             : 
    2146             :   struct CompleteCollectionElement {
    2147             :     CommonCollectionElement common;
    2148             :     CompleteElementDetail detail;
    2149             : 
    2150        7487 :     CompleteCollectionElement() {}
    2151             : 
    2152             :     CompleteCollectionElement(const CommonCollectionElement& a_common,
    2153             :                               const CompleteElementDetail& a_detail)
    2154             :       : common(a_common)
    2155             :       , detail(a_detail)
    2156             :     {}
    2157             : 
    2158          10 :     bool operator==(const CompleteCollectionElement& other) const
    2159             :     {
    2160          10 :       return common == other.common && detail == other.detail;
    2161             :     }
    2162             : 
    2163           1 :     bool operator!=(const CompleteCollectionElement& other) const
    2164             :     {
    2165           1 :       return !(*this == other);
    2166             :     }
    2167             :   };
    2168             : 
    2169             :   struct MinimalCollectionElement {
    2170             :     CommonCollectionElement common;
    2171             : 
    2172        6350 :     MinimalCollectionElement() {}
    2173             : 
    2174             :     explicit MinimalCollectionElement(const CommonCollectionElement& a_common)
    2175             :       : common(a_common) {}
    2176             : 
    2177          10 :     bool operator==(const MinimalCollectionElement& other) const
    2178             :     {
    2179          10 :       return common == other.common;
    2180             :     }
    2181             : 
    2182           1 :     bool operator!=(const MinimalCollectionElement& other) const
    2183             :     {
    2184           1 :       return !(*this == other);
    2185             :     }
    2186             :   };
    2187             : 
    2188             :   struct CommonCollectionHeader {
    2189             :     LBound bound;
    2190             : 
    2191        6923 :     CommonCollectionHeader()
    2192        6923 :       : bound(0)
    2193        6923 :     {}
    2194             : 
    2195             :     explicit CommonCollectionHeader(LBound a_bound) : bound(a_bound) {}
    2196             : 
    2197          14 :     bool operator==(const CommonCollectionHeader& other) const
    2198             :     {
    2199          14 :       return bound == other.bound;
    2200             :     }
    2201             : 
    2202           1 :     bool operator!=(const CommonCollectionHeader& other) const
    2203             :     {
    2204           1 :       return !(*this == other);
    2205             :     }
    2206             :   };
    2207             : 
    2208             :   struct CompleteCollectionHeader {
    2209             :     CommonCollectionHeader common;
    2210             :     Optional<CompleteTypeDetail> detail; // not present for anonymous
    2211             : 
    2212        3745 :     CompleteCollectionHeader() {}
    2213             : 
    2214             :     CompleteCollectionHeader(const CommonCollectionHeader& a_common,
    2215             :                              const Optional<CompleteTypeDetail>& a_detail)
    2216             :       : common(a_common)
    2217             :       , detail(a_detail)
    2218             :     {}
    2219             : 
    2220           6 :     bool operator==(const CompleteCollectionHeader& other) const
    2221             :     {
    2222           6 :       return common == other.common && detail == other.detail;
    2223             :     }
    2224             : 
    2225           1 :     bool operator!=(const CompleteCollectionHeader& other) const
    2226             :     {
    2227           1 :       return !(*this == other);
    2228             :     }
    2229             :   };
    2230             : 
    2231             :   struct MinimalCollectionHeader {
    2232             :     CommonCollectionHeader common;
    2233             : 
    2234        3175 :     MinimalCollectionHeader() {}
    2235             : 
    2236             :     explicit MinimalCollectionHeader(const CommonCollectionHeader& a_common)
    2237             :       : common(a_common) {}
    2238             : 
    2239           6 :     bool operator==(const MinimalCollectionHeader& other) const
    2240             :     {
    2241           6 :       return common == other.common;
    2242             :     }
    2243             : 
    2244           1 :     bool operator!=(const MinimalCollectionHeader& other) const
    2245             :     {
    2246           1 :       return !(*this == other);
    2247             :     }
    2248             :   };
    2249             : 
    2250             :   // --- Sequence: ------------------------------------------------------
    2251             :   struct CompleteSequenceType {
    2252             :     CollectionTypeFlag collection_flag;
    2253             :     CompleteCollectionHeader header;
    2254             :     CompleteCollectionElement element;
    2255             : 
    2256        1871 :     CompleteSequenceType()
    2257        1871 :       : collection_flag(0)
    2258        1871 :       , header()
    2259        1871 :       , element()
    2260        1871 :     {}
    2261             : 
    2262             :     CompleteSequenceType(CollectionTypeFlag a_collection_flag,
    2263             :                          const CompleteCollectionHeader& a_header,
    2264             :                          const CompleteCollectionElement& an_element)
    2265             :       : collection_flag(a_collection_flag)
    2266             :       , header(a_header)
    2267             :       , element(an_element)
    2268             :     {}
    2269             : 
    2270           3 :     bool operator==(const CompleteSequenceType& other) const
    2271             :     {
    2272           3 :       return collection_flag == other.collection_flag && header == other.header && element == other.element;
    2273             :     }
    2274             : 
    2275           1 :     bool operator!=(const CompleteSequenceType& other) const
    2276             :     {
    2277           1 :       return !(*this == other);
    2278             :     }
    2279             :   };
    2280             : 
    2281             :   struct MinimalSequenceType {
    2282             :     CollectionTypeFlag collection_flag;
    2283             :     MinimalCollectionHeader header;
    2284             :     MinimalCollectionElement element;
    2285             : 
    2286        1586 :     MinimalSequenceType()
    2287        1586 :       : collection_flag(0)
    2288        1586 :       , header()
    2289        1586 :       , element()
    2290        1586 :     {}
    2291             : 
    2292             :     MinimalSequenceType(CollectionTypeFlag a_collection_flag,
    2293             :                         const MinimalCollectionHeader& a_header,
    2294             :                         const MinimalCollectionElement& a_element)
    2295             :       : collection_flag(a_collection_flag)
    2296             :       , header(a_header)
    2297             :       , element(a_element)
    2298             :     {}
    2299             : 
    2300           3 :     bool operator==(const MinimalSequenceType& other) const
    2301             :     {
    2302           3 :       return collection_flag == other.collection_flag && header == other.header && element == other.element;
    2303             :     }
    2304             : 
    2305           1 :     bool operator!=(const MinimalSequenceType& other) const
    2306             :     {
    2307           1 :       return !(*this == other);
    2308             :     }
    2309             :   };
    2310             : 
    2311             :   // --- Array: ------------------------------------------------------
    2312             :   struct CommonArrayHeader {
    2313             :     LBoundSeq bound_seq;
    2314             : 
    2315        3469 :     CommonArrayHeader() {}
    2316             : 
    2317             :     explicit CommonArrayHeader(const LBoundSeq& a_bound_seq)
    2318             :       : bound_seq(a_bound_seq) {}
    2319             : 
    2320          10 :     bool operator==(const CommonArrayHeader& other) const
    2321             :     {
    2322          10 :       return bound_seq == other.bound_seq;
    2323             :     }
    2324             : 
    2325           1 :     bool operator!=(const CommonArrayHeader& other) const
    2326             :     {
    2327           1 :       return !(*this == other);
    2328             :     }
    2329             :   };
    2330             : 
    2331             :   struct CompleteArrayHeader {
    2332             :     CommonArrayHeader common;
    2333             :     CompleteTypeDetail detail;
    2334             : 
    2335        1874 :     CompleteArrayHeader() {}
    2336             : 
    2337             :     CompleteArrayHeader(const CommonArrayHeader& a_common,
    2338             :                         const CompleteTypeDetail& a_detail)
    2339             :       : common(a_common)
    2340             :       , detail(a_detail)
    2341             :     {}
    2342             : 
    2343           4 :     bool operator==(const CompleteArrayHeader& other) const
    2344             :     {
    2345           4 :       return common == other.common && detail == other.detail;
    2346             :     }
    2347             : 
    2348           1 :     bool operator!=(const CompleteArrayHeader& other) const
    2349             :     {
    2350           1 :       return !(*this == other);
    2351             :     }
    2352             :   };
    2353             : 
    2354             :   struct MinimalArrayHeader {
    2355             :     CommonArrayHeader common;
    2356             : 
    2357        1592 :     MinimalArrayHeader() {}
    2358             : 
    2359             :     explicit MinimalArrayHeader(const CommonArrayHeader& a_common)
    2360             :       : common(a_common)
    2361             :     {}
    2362             : 
    2363           4 :     bool operator==(const MinimalArrayHeader& other) const
    2364             :     {
    2365           4 :       return common == other.common;
    2366             :     }
    2367             : 
    2368           1 :     bool operator!=(const MinimalArrayHeader& other) const
    2369             :     {
    2370           1 :       return !(*this == other);
    2371             :     }
    2372             :   };
    2373             : 
    2374             :   struct CompleteArrayType  {
    2375             :     CollectionTypeFlag collection_flag;
    2376             :     CompleteArrayHeader header;
    2377             :     CompleteCollectionElement element;
    2378             : 
    2379        1871 :     CompleteArrayType()
    2380        1871 :       : collection_flag(0)
    2381        1871 :       , header()
    2382        1871 :       , element()
    2383        1871 :     {}
    2384             : 
    2385             :     CompleteArrayType(CollectionTypeFlag a_collection_flag,
    2386             :                       const CompleteArrayHeader& a_header,
    2387             :                       const CompleteCollectionElement& an_element)
    2388             :       : collection_flag(a_collection_flag)
    2389             :       , header(a_header)
    2390             :       , element(an_element)
    2391             :     {}
    2392             : 
    2393           3 :     bool operator==(const CompleteArrayType& other) const
    2394             :     {
    2395           3 :       return collection_flag == other.collection_flag && header == other.header && element == other.element;
    2396             :     }
    2397             : 
    2398           1 :     bool operator!=(const CompleteArrayType& other) const
    2399             :     {
    2400           1 :       return !(*this == other);
    2401             :     }
    2402             :   };
    2403             : 
    2404             :   struct MinimalArrayType  {
    2405             :     CollectionTypeFlag collection_flag;
    2406             :     MinimalArrayHeader header;
    2407             :     MinimalCollectionElement element;
    2408             : 
    2409        1589 :     MinimalArrayType()
    2410        1589 :       : collection_flag(0)
    2411        1589 :       , header()
    2412        1589 :       , element()
    2413        1589 :     {}
    2414             : 
    2415             :     MinimalArrayType(CollectionTypeFlag a_collection_flag,
    2416             :                      const MinimalArrayHeader& a_header,
    2417             :                      const MinimalCollectionElement& a_element)
    2418             :       : collection_flag(a_collection_flag)
    2419             :       , header(a_header)
    2420             :       , element(a_element)
    2421             :     {}
    2422             : 
    2423           3 :     bool operator==(const MinimalArrayType& other) const
    2424             :     {
    2425           3 :       return collection_flag == other.collection_flag && header == other.header && element == other.element;
    2426             :     }
    2427             : 
    2428           1 :     bool operator!=(const MinimalArrayType& other) const
    2429             :     {
    2430           1 :       return !(*this == other);
    2431             :     }
    2432             :   };
    2433             : 
    2434             :   // --- Map: ------------------------------------------------------
    2435             :   struct CompleteMapType {
    2436             :     CollectionTypeFlag collection_flag;
    2437             :     CompleteCollectionHeader header;
    2438             :     CompleteCollectionElement key;
    2439             :     CompleteCollectionElement element;
    2440             : 
    2441        1871 :     CompleteMapType()
    2442        1871 :       : collection_flag(0)
    2443        1871 :     {}
    2444             : 
    2445           3 :     bool operator==(const CompleteMapType& other) const
    2446             :     {
    2447           3 :       return collection_flag == other.collection_flag && header == other.header && key == other.key && element == other.element;
    2448             :     }
    2449             : 
    2450           1 :     bool operator!=(const CompleteMapType& other) const
    2451             :     {
    2452           1 :       return !(*this == other);
    2453             :     }
    2454             :   };
    2455             : 
    2456             :   struct MinimalMapType {
    2457             :     CollectionTypeFlag collection_flag;
    2458             :     MinimalCollectionHeader header;
    2459             :     MinimalCollectionElement key;
    2460             :     MinimalCollectionElement element;
    2461             : 
    2462        1586 :     MinimalMapType()
    2463        1586 :       : collection_flag(0)
    2464        1586 :     {}
    2465             : 
    2466           3 :     bool operator==(const MinimalMapType& other) const
    2467             :     {
    2468           3 :       return collection_flag == other.collection_flag && header == other.header && key == other.key && element == other.element;
    2469             :     }
    2470             : 
    2471           1 :     bool operator!=(const MinimalMapType& other) const
    2472             :     {
    2473           1 :       return !(*this == other);
    2474             :     }
    2475             :   };
    2476             : 
    2477             :   // --- Enumeration: ----------------------------------------------------
    2478             :   typedef ACE_CDR::UShort BitBound;
    2479             : 
    2480             :   // Constant in an enumerated type
    2481             :   struct CommonEnumeratedLiteral {
    2482             :     ACE_CDR::Long value;
    2483             :     EnumeratedLiteralFlag flags;
    2484             : 
    2485         109 :     CommonEnumeratedLiteral()
    2486         109 :       : value(0)
    2487         109 :       , flags(0)
    2488         109 :     {}
    2489             : 
    2490          41 :     CommonEnumeratedLiteral(ACE_CDR::Long a_value,
    2491             :                             EnumeratedLiteralFlag a_flags)
    2492          41 :       : value(a_value)
    2493          41 :       , flags(a_flags)
    2494          41 :     {}
    2495             : 
    2496           8 :     bool operator==(const CommonEnumeratedLiteral& other) const
    2497             :     {
    2498           8 :       return value == other.value && flags == other.flags;
    2499             :     }
    2500             : 
    2501           1 :     bool operator!=(const CommonEnumeratedLiteral& other) const
    2502             :     {
    2503           1 :       return !(*this == other);
    2504             :     }
    2505             :   };
    2506             : 
    2507             :   // Constant in an enumerated type
    2508             :   struct CompleteEnumeratedLiteral {
    2509             :     CommonEnumeratedLiteral common;
    2510             :     CompleteMemberDetail detail;
    2511             : 
    2512          64 :     CompleteEnumeratedLiteral() {}
    2513             : 
    2514             :     CompleteEnumeratedLiteral(const CommonEnumeratedLiteral& a_common,
    2515             :                               const CompleteMemberDetail& a_detail)
    2516             :       : common(a_common)
    2517             :       , detail(a_detail)
    2518             :     {}
    2519             : 
    2520             :     bool operator<(const CompleteEnumeratedLiteral& other) const
    2521             :     {
    2522             :       return common.value < other.common.value;
    2523             :     }
    2524             : 
    2525           2 :     bool operator==(const CompleteEnumeratedLiteral& other) const
    2526             :     {
    2527           2 :       return common == other.common && detail == other.detail;
    2528             :     }
    2529             : 
    2530           1 :     bool operator!=(const CompleteEnumeratedLiteral& other) const
    2531             :     {
    2532           1 :       return !(*this == other);
    2533             :     }
    2534             :   };
    2535             :   // Ordered by EnumeratedLiteral.common.value
    2536             :   typedef Sequence<CompleteEnumeratedLiteral> CompleteEnumeratedLiteralSeq;
    2537             : 
    2538             :   // Constant in an enumerated type
    2539             :   struct MinimalEnumeratedLiteral {
    2540             :     CommonEnumeratedLiteral common;
    2541             :     MinimalMemberDetail detail;
    2542             : 
    2543          42 :     MinimalEnumeratedLiteral() {}
    2544             : 
    2545          41 :     MinimalEnumeratedLiteral(const CommonEnumeratedLiteral& a_common,
    2546             :                              const MinimalMemberDetail& a_detail)
    2547          41 :       : common(a_common)
    2548          41 :       , detail(a_detail)
    2549          41 :     {}
    2550             : 
    2551             :     bool operator<(const MinimalEnumeratedLiteral& other) const
    2552             :     {
    2553             :       return common.value < other.common.value;
    2554             :     }
    2555             : 
    2556           4 :     bool operator==(const MinimalEnumeratedLiteral& other) const
    2557             :     {
    2558           4 :       return common == other.common && detail == other.detail;
    2559             :     }
    2560             : 
    2561           1 :     bool operator!=(const MinimalEnumeratedLiteral& other) const
    2562             :     {
    2563           1 :       return !(*this == other);
    2564             :     }
    2565             :   };
    2566             :   // Ordered by EnumeratedLiteral.common.value
    2567             :   typedef Sequence<MinimalEnumeratedLiteral> MinimalEnumeratedLiteralSeq;
    2568             : 
    2569             :   struct CommonEnumeratedHeader {
    2570             :     BitBound bit_bound;
    2571             : 
    2572        7007 :     CommonEnumeratedHeader()
    2573        7007 :       : bit_bound(0)
    2574        7007 :     {}
    2575             : 
    2576          16 :     explicit CommonEnumeratedHeader(BitBound a_bit_bound)
    2577          16 :       : bit_bound(a_bit_bound)
    2578          16 :     {}
    2579             : 
    2580          15 :     bool operator==(const CommonEnumeratedHeader& other) const
    2581             :     {
    2582          15 :       return bit_bound == other.bit_bound;
    2583             :     }
    2584             : 
    2585           1 :     bool operator!=(const CommonEnumeratedHeader& other) const
    2586             :     {
    2587           1 :       return !(*this == other);
    2588             :     }
    2589             :   };
    2590             : 
    2591             :   struct CompleteEnumeratedHeader {
    2592             :     CommonEnumeratedHeader common;
    2593             :     CompleteTypeDetail detail;
    2594             : 
    2595        3745 :     CompleteEnumeratedHeader() {}
    2596             : 
    2597             :     CompleteEnumeratedHeader(const CommonEnumeratedHeader& a_common,
    2598             :                              const CompleteTypeDetail& a_detail)
    2599             :       : common(a_common)
    2600             :       , detail(a_detail)
    2601             :     {}
    2602             : 
    2603           6 :     bool operator==(const CompleteEnumeratedHeader& other) const
    2604             :     {
    2605           6 :       return common == other.common && detail == other.detail;
    2606             :     }
    2607             : 
    2608           1 :     bool operator!=(const CompleteEnumeratedHeader& other) const
    2609             :     {
    2610           1 :       return !(*this == other);
    2611             :     }
    2612             :   };
    2613             : 
    2614             :   struct MinimalEnumeratedHeader {
    2615             :     CommonEnumeratedHeader common;
    2616             : 
    2617        3259 :     MinimalEnumeratedHeader() {}
    2618             : 
    2619          16 :     explicit MinimalEnumeratedHeader(const CommonEnumeratedHeader& a_common)
    2620          16 :       : common(a_common)
    2621          16 :     {}
    2622             : 
    2623           7 :     bool operator==(const MinimalEnumeratedHeader& other) const
    2624             :     {
    2625           7 :       return common == other.common;
    2626             :     }
    2627             : 
    2628           1 :     bool operator!=(const MinimalEnumeratedHeader& other) const
    2629             :     {
    2630           1 :       return !(*this == other);
    2631             :     }
    2632             :   };
    2633             : 
    2634             :   // Enumerated type
    2635             :   struct CompleteEnumeratedType  {
    2636             :     EnumTypeFlag enum_flags;
    2637             :     CompleteEnumeratedHeader header;
    2638             :     CompleteEnumeratedLiteralSeq literal_seq;
    2639             : 
    2640        1871 :     CompleteEnumeratedType()
    2641        1871 :       : enum_flags(0)
    2642        1871 :     {}
    2643             : 
    2644             :     CompleteEnumeratedType(const EnumTypeFlag& a_enum_flags,
    2645             :                            const CompleteEnumeratedHeader& a_header,
    2646             :                            const CompleteEnumeratedLiteralSeq& a_literal_seq)
    2647             :       : enum_flags(a_enum_flags)
    2648             :       , header(a_header)
    2649             :       , literal_seq(a_literal_seq)
    2650             :     {}
    2651             : 
    2652           3 :     bool operator==(const CompleteEnumeratedType& other) const
    2653             :     {
    2654           3 :       return enum_flags == other.enum_flags && header == other.header && literal_seq == other.literal_seq;
    2655             :     }
    2656             : 
    2657           1 :     bool operator!=(const CompleteEnumeratedType& other) const
    2658             :     {
    2659           1 :       return !(*this == other);
    2660             :     }
    2661             :   };
    2662             : 
    2663             :   // Enumerated type
    2664             :   struct MinimalEnumeratedType  {
    2665             :     EnumTypeFlag enum_flags;
    2666             :     MinimalEnumeratedHeader header;
    2667             :     MinimalEnumeratedLiteralSeq literal_seq;
    2668             : 
    2669        1618 :     MinimalEnumeratedType()
    2670        1618 :       : enum_flags(0)
    2671        1618 :     {}
    2672             : 
    2673          14 :     MinimalEnumeratedType(const EnumTypeFlag& a_enum_flags,
    2674             :                           const MinimalEnumeratedHeader& a_header,
    2675             :                           const MinimalEnumeratedLiteralSeq& a_literal_seq)
    2676          14 :       : enum_flags(a_enum_flags)
    2677          14 :       , header(a_header)
    2678          14 :       , literal_seq(a_literal_seq)
    2679          14 :     {}
    2680             : 
    2681           4 :     bool operator==(const MinimalEnumeratedType& other) const
    2682             :     {
    2683           4 :       return enum_flags == other.enum_flags && header == other.header && literal_seq == other.literal_seq;
    2684             :     }
    2685             : 
    2686           1 :     bool operator!=(const MinimalEnumeratedType& other) const
    2687             :     {
    2688           1 :       return !(*this == other);
    2689             :     }
    2690             :   };
    2691             : 
    2692             :   // --- Bitmask: --------------------------------------------------------
    2693             :   // Bit in a bit mask
    2694             :   struct CommonBitflag {
    2695             :     ACE_CDR::UShort position;
    2696             :     BitflagFlag flags;
    2697             : 
    2698          16 :     CommonBitflag()
    2699          16 :       : position(0)
    2700          16 :       , flags(0)
    2701          16 :     {}
    2702             : 
    2703           6 :     bool operator==(const CommonBitflag& other) const
    2704             :     {
    2705           6 :       return position == other.position && flags == other.flags;
    2706             :     }
    2707             : 
    2708           1 :     bool operator!=(const CommonBitflag& other) const
    2709             :     {
    2710           1 :       return !(*this == other);
    2711             :     }
    2712             :   };
    2713             : 
    2714             :   struct CompleteBitflag {
    2715             :     CommonBitflag common;
    2716             :     CompleteMemberDetail detail;
    2717             : 
    2718           2 :     bool operator==(const CompleteBitflag& other) const
    2719             :     {
    2720           2 :       return common == other.common && detail == other.detail;
    2721             :     }
    2722             : 
    2723           1 :     bool operator!=(const CompleteBitflag& other) const
    2724             :     {
    2725           1 :       return !(*this == other);
    2726             :     }
    2727             :   };
    2728             :   // Ordered by Bitflag.position
    2729             :   typedef Sequence<CompleteBitflag> CompleteBitflagSeq;
    2730             : 
    2731             :   struct MinimalBitflag {
    2732             :     CommonBitflag common;
    2733             :     MinimalMemberDetail detail;
    2734             : 
    2735           2 :     bool operator==(const MinimalBitflag& other) const
    2736             :     {
    2737           2 :       return common == other.common && detail == other.detail;
    2738             :     }
    2739             : 
    2740           1 :     bool operator!=(const MinimalBitflag& other) const
    2741             :     {
    2742           1 :       return !(*this == other);
    2743             :     }
    2744             :   };
    2745             :   // Ordered by Bitflag.position
    2746             :   typedef Sequence<MinimalBitflag> MinimalBitflagSeq;
    2747             : 
    2748             :   // This type is defined in the IDL but not used.
    2749             :   // struct CommonBitmaskHeader {
    2750             :   //   BitBound bit_bound;
    2751             :   // };
    2752             : 
    2753             :   typedef CompleteEnumeratedHeader CompleteBitmaskHeader;
    2754             : 
    2755             :   typedef MinimalEnumeratedHeader MinimalBitmaskHeader;
    2756             : 
    2757             :   struct CompleteBitmaskType {
    2758             :     BitmaskTypeFlag bitmask_flags; // unused
    2759             :     CompleteBitmaskHeader header;
    2760             :     CompleteBitflagSeq flag_seq;
    2761             : 
    2762        1871 :     CompleteBitmaskType()
    2763        1871 :       : bitmask_flags(0)
    2764        1871 :     {}
    2765             : 
    2766           3 :     bool operator==(const CompleteBitmaskType& other) const
    2767             :     {
    2768           3 :       return bitmask_flags == other.bitmask_flags && header == other.header && flag_seq == other.flag_seq;
    2769             :     }
    2770             : 
    2771           1 :     bool operator!=(const CompleteBitmaskType& other) const
    2772             :     {
    2773           1 :       return !(*this == other);
    2774             :     }
    2775             :   };
    2776             : 
    2777             :   struct MinimalBitmaskType {
    2778             :     BitmaskTypeFlag bitmask_flags; // unused
    2779             :     MinimalBitmaskHeader header;
    2780             :     MinimalBitflagSeq flag_seq;
    2781             : 
    2782        1638 :     MinimalBitmaskType()
    2783        1638 :       : bitmask_flags(0)
    2784        1638 :     {}
    2785             : 
    2786           3 :     bool operator==(const MinimalBitmaskType& other) const
    2787             :     {
    2788           3 :       return bitmask_flags == other.bitmask_flags && header == other.header && flag_seq == other.flag_seq;
    2789             :     }
    2790             : 
    2791           1 :     bool operator!=(const MinimalBitmaskType& other) const
    2792             :     {
    2793           1 :       return !(*this == other);
    2794             :     }
    2795             :   };
    2796             : 
    2797             :   // --- Bitset: ----------------------------------------------------------
    2798             :   struct CommonBitfield {
    2799             :     ACE_CDR::UShort position;
    2800             :     BitsetMemberFlag flags;
    2801             :     ACE_CDR::Octet bitcount;
    2802             :     TypeKind holder_type; // Must be primitive integer type
    2803             : 
    2804           9 :     CommonBitfield()
    2805           9 :       : position(0)
    2806           9 :       , flags(0)
    2807           9 :       , bitcount(0)
    2808           9 :       , holder_type(TK_NONE)
    2809           9 :     {}
    2810             : 
    2811           6 :     bool operator==(const CommonBitfield& other) const
    2812             :     {
    2813           6 :       return position == other.position && flags == other.flags && bitcount == other.bitcount && holder_type == other.holder_type;
    2814             :     }
    2815             : 
    2816           1 :     bool operator!=(const CommonBitfield& other) const
    2817             :     {
    2818           1 :       return !(*this == other);
    2819             :     }
    2820             :   };
    2821             : 
    2822             :   struct CompleteBitfield {
    2823             :     CommonBitfield common;
    2824             :     CompleteMemberDetail detail;
    2825             : 
    2826           2 :     bool operator==(const CompleteBitfield& other) const
    2827             :     {
    2828           2 :       return common == other.common && detail == other.detail;
    2829             :     }
    2830             : 
    2831           1 :     bool operator!=(const CompleteBitfield& other) const
    2832             :     {
    2833           1 :       return !(*this == other);
    2834             :     }
    2835             :   };
    2836             :   // Ordered by Bitfield.position
    2837             :   typedef Sequence<CompleteBitfield> CompleteBitfieldSeq;
    2838             : 
    2839             :   struct MinimalBitfield {
    2840             :     CommonBitfield common;
    2841             :     NameHash name_hash;
    2842             : 
    2843           3 :     MinimalBitfield()
    2844           3 :     {
    2845           3 :       name_hash[0] = name_hash[1] = name_hash[2] = name_hash[3] = 0;
    2846           3 :     }
    2847             : 
    2848           2 :     bool operator==(const MinimalBitfield& other) const
    2849             :     {
    2850           2 :       return common == other.common && name_hash_equal(name_hash, other.name_hash);
    2851             :     }
    2852             : 
    2853           1 :     bool operator!=(const MinimalBitfield& other) const
    2854             :     {
    2855           1 :       return !(*this == other);
    2856             :     }
    2857             :   };
    2858             :   // Ordered by Bitfield.position
    2859             :   typedef Sequence<MinimalBitfield> MinimalBitfieldSeq;
    2860             : 
    2861             :   struct CompleteBitsetHeader {
    2862             :     CompleteTypeDetail detail;
    2863             : 
    2864           4 :     bool operator==(const CompleteBitsetHeader& other) const
    2865             :     {
    2866           4 :       return detail == other.detail;
    2867             :     }
    2868             : 
    2869           1 :     bool operator!=(const CompleteBitsetHeader& other) const
    2870             :     {
    2871           1 :       return !(*this == other);
    2872             :     }
    2873             :   };
    2874             : 
    2875             :   struct MinimalBitsetHeader {
    2876             :     // Empty. Available for future extension
    2877             : 
    2878           3 :     bool operator==(const MinimalBitsetHeader&) const
    2879             :     {
    2880           3 :       return true;
    2881             :     }
    2882             : 
    2883             :     bool operator!=(const MinimalBitsetHeader& other) const
    2884             :     {
    2885             :       return !(*this == other);
    2886             :     }
    2887             :   };
    2888             : 
    2889             :   struct CompleteBitsetType  {
    2890             :     BitsetTypeFlag bitset_flags; // unused
    2891             :     CompleteBitsetHeader header;
    2892             :     CompleteBitfieldSeq field_seq;
    2893             : 
    2894        1871 :     CompleteBitsetType()
    2895        1871 :       : bitset_flags(0)
    2896        1871 :     {}
    2897             : 
    2898           3 :     bool operator==(const CompleteBitsetType& other) const
    2899             :     {
    2900           3 :       return bitset_flags == other.bitset_flags && header == other.header && field_seq == other.field_seq;
    2901             :     }
    2902             : 
    2903           1 :     bool operator!=(const CompleteBitsetType& other) const
    2904             :     {
    2905           1 :       return !(*this == other);
    2906             :     }
    2907             :   };
    2908             : 
    2909             :   struct MinimalBitsetType  {
    2910             :     BitsetTypeFlag bitset_flags; // unused
    2911             :     MinimalBitsetHeader header;
    2912             :     MinimalBitfieldSeq field_seq;
    2913             : 
    2914        1681 :     MinimalBitsetType()
    2915        1681 :       : bitset_flags(0)
    2916        1681 :     {}
    2917             : 
    2918           3 :     bool operator==(const MinimalBitsetType& other) const
    2919             :     {
    2920           3 :       return bitset_flags == other.bitset_flags && header == other.header && field_seq == other.field_seq;
    2921             :     }
    2922             : 
    2923           1 :     bool operator!=(const MinimalBitsetType& other) const
    2924             :     {
    2925           1 :       return !(*this == other);
    2926             :     }
    2927             :   };
    2928             : 
    2929             :   // --- Type Object: ---------------------------------------------------
    2930             :   // The types associated with each case selection must have extensibility
    2931             :   // kind APPENDABLE or MUTABLE so that they can be extended in the future
    2932             : 
    2933             :   struct CompleteExtendedType {
    2934             :     // Empty. Available for future extension
    2935             : 
    2936           1 :     bool operator==(const CompleteExtendedType&) const
    2937             :     {
    2938           1 :       return true;
    2939             :     }
    2940             : 
    2941             :     bool operator!=(const CompleteExtendedType& other) const
    2942             :     {
    2943             :       return !(*this == other);
    2944             :     }
    2945             :   };
    2946             : 
    2947             :   // @extensibility(FINAL)     @nested
    2948             :   // union CompleteTypeObject switch (octet) {
    2949             :   // case TK_ALIAS:
    2950             :   //   CompleteAliasType      alias_type;
    2951             :   // case TK_ANNOTATION:
    2952             :   //   CompleteAnnotationType annotation_type;
    2953             :   // case TK_STRUCTURE:
    2954             :   //   CompleteStructType     struct_type;
    2955             :   // case TK_UNION:
    2956             :   //   CompleteUnionType      union_type;
    2957             :   // case TK_BITSET:
    2958             :   //   CompleteBitsetType     bitset_type;
    2959             :   // case TK_SEQUENCE:
    2960             :   //   CompleteSequenceType   sequence_type;
    2961             :   // case TK_ARRAY:
    2962             :   //   CompleteArrayType      array_type;
    2963             :   // case TK_MAP:
    2964             :   //   CompleteMapType        map_type;
    2965             :   // case TK_ENUM:
    2966             :   //   CompleteEnumeratedType enumerated_type;
    2967             :   // case TK_BITMASK:
    2968             :   //   CompleteBitmaskType    bitmask_type;
    2969             : 
    2970             :   //   // ===================  Future extensibility  ============
    2971             :   // default:
    2972             :   //   CompleteExtendedType   extended_type;
    2973             :   // };
    2974             : 
    2975             :   struct CompleteTypeObject {
    2976             :     ACE_CDR::Octet kind;
    2977             :     CompleteAliasType alias_type;
    2978             :     CompleteAnnotationType annotation_type;
    2979             :     CompleteStructType struct_type;
    2980             :     CompleteUnionType union_type;
    2981             :     CompleteBitsetType bitset_type;
    2982             :     CompleteSequenceType sequence_type;
    2983             :     CompleteArrayType array_type;
    2984             :     CompleteMapType map_type;
    2985             :     CompleteEnumeratedType enumerated_type;
    2986             :     CompleteBitmaskType bitmask_type;
    2987             : 
    2988             :     // ===================  Future extensibility  ============
    2989             :     CompleteExtendedType extended_type;
    2990             : 
    2991        1868 :     CompleteTypeObject()
    2992        1868 :       : kind(TK_NONE)
    2993        1868 :     {}
    2994             : 
    2995             :     explicit CompleteTypeObject(const CompleteAliasType& alias)
    2996             :       : kind(TK_ALIAS)
    2997             :       , alias_type(alias)
    2998             :     {}
    2999             : 
    3000             :     explicit CompleteTypeObject(const CompleteAnnotationType& annotation)
    3001             :       : kind(TK_ANNOTATION)
    3002             :       , annotation_type(annotation)
    3003             :     {}
    3004             : 
    3005             :     explicit CompleteTypeObject(const CompleteStructType& struct_)
    3006             :       : kind(TK_STRUCTURE)
    3007             :       , struct_type(struct_)
    3008             :     {}
    3009             : 
    3010             :     explicit CompleteTypeObject(const CompleteUnionType& union_)
    3011             :       : kind(TK_UNION)
    3012             :       , union_type(union_)
    3013             :     {}
    3014             : 
    3015             :     explicit CompleteTypeObject(const CompleteBitsetType& bitset)
    3016             :       : kind(TK_BITSET)
    3017             :       , bitset_type(bitset)
    3018             :     {}
    3019             : 
    3020             :     explicit CompleteTypeObject(const CompleteSequenceType& sequence)
    3021             :       : kind(TK_SEQUENCE)
    3022             :       , sequence_type(sequence)
    3023             :     {}
    3024             : 
    3025             :     explicit CompleteTypeObject(const CompleteArrayType& array)
    3026             :       : kind(TK_ARRAY)
    3027             :       , array_type(array)
    3028             :     {}
    3029             : 
    3030             :     explicit CompleteTypeObject(const CompleteMapType& map)
    3031             :       : kind(TK_MAP)
    3032             :       , map_type(map)
    3033             :     {}
    3034             : 
    3035             :     explicit CompleteTypeObject(const CompleteEnumeratedType& enum_)
    3036             :       : kind(TK_ENUM)
    3037             :       , enumerated_type(enum_)
    3038             :     {}
    3039             : 
    3040             :     explicit CompleteTypeObject(const CompleteBitmaskType& bitmask)
    3041             :       : kind(TK_BITMASK)
    3042             :       , bitmask_type(bitmask)
    3043             :     {}
    3044             : 
    3045          22 :     bool operator==(const CompleteTypeObject& other) const
    3046             :     {
    3047          22 :       if (kind != other.kind) return false;
    3048             : 
    3049          11 :       switch (kind) {
    3050           1 :       case TK_NONE:
    3051           1 :         return true;
    3052           1 :       case TK_ALIAS:
    3053           1 :         return alias_type == other.alias_type;
    3054           1 :       case TK_ANNOTATION:
    3055           1 :         return annotation_type == other.annotation_type;
    3056           1 :       case TK_STRUCTURE:
    3057           1 :         return struct_type == other.struct_type;
    3058           1 :       case TK_UNION:
    3059           1 :         return union_type == other.union_type;
    3060           1 :       case TK_BITSET:
    3061           1 :         return bitset_type == other.bitset_type;
    3062           1 :       case TK_SEQUENCE:
    3063           1 :         return sequence_type == other.sequence_type;
    3064           1 :       case TK_ARRAY:
    3065           1 :         return array_type == other.array_type;
    3066           1 :       case TK_MAP:
    3067           1 :         return map_type == other.map_type;
    3068           1 :       case TK_ENUM:
    3069           1 :         return enumerated_type == other.enumerated_type;
    3070           1 :       case TK_BITMASK:
    3071           1 :         return bitmask_type == other.bitmask_type;
    3072           0 :       default:
    3073           0 :         return extended_type == other.extended_type;
    3074             :       }
    3075             :     }
    3076             : 
    3077          11 :     bool operator!=(const CompleteTypeObject& other) const
    3078             :     {
    3079          11 :       return !(*this == other);
    3080             :     }
    3081             :   };
    3082             : 
    3083             :   struct MinimalExtendedType {
    3084             :     // Empty. Available for future extension
    3085             : 
    3086           1 :     bool operator==(const MinimalExtendedType&) const
    3087             :     {
    3088           1 :       return true;
    3089             :     }
    3090             : 
    3091             :     bool operator!=(const MinimalExtendedType& other) const
    3092             :     {
    3093             :       return !(*this == other);
    3094             :     }
    3095             :   };
    3096             : 
    3097             :   // @extensibility(FINAL)     @nested
    3098             :   // union MinimalTypeObject switch (octet) {
    3099             :   // case TK_ALIAS:
    3100             :   //   MinimalAliasType       alias_type;
    3101             :   // case TK_ANNOTATION:
    3102             :   //   MinimalAnnotationType  annotation_type;
    3103             :   // case TK_STRUCTURE:
    3104             :   //   MinimalStructType      struct_type;
    3105             :   // case TK_UNION:
    3106             :   //   MinimalUnionType       union_type;
    3107             :   // case TK_BITSET:
    3108             :   //   MinimalBitsetType      bitset_type;
    3109             :   // case TK_SEQUENCE:
    3110             :   //   MinimalSequenceType    sequence_type;
    3111             :   // case TK_ARRAY:
    3112             :   //   MinimalArrayType       array_type;
    3113             :   // case TK_MAP:
    3114             :   //   MinimalMapType         map_type;
    3115             :   // case TK_ENUM:
    3116             :   //   MinimalEnumeratedType  enumerated_type;
    3117             :   // case TK_BITMASK:
    3118             :   //   MinimalBitmaskType     bitmask_type;
    3119             : 
    3120             :   //   // ===================  Future extensibility  ============
    3121             :   // default:
    3122             :   //   MinimalExtendedType    extended_type;
    3123             :   // };
    3124             : 
    3125             :   struct MinimalTypeObject {
    3126             :     ACE_CDR::Octet kind;
    3127             :     MinimalAliasType alias_type;
    3128             :     MinimalAnnotationType annotation_type;
    3129             :     MinimalStructType struct_type;
    3130             :     MinimalUnionType union_type;
    3131             :     MinimalBitsetType bitset_type;
    3132             :     MinimalSequenceType sequence_type;
    3133             :     MinimalArrayType array_type;
    3134             :     MinimalMapType map_type;
    3135             :     MinimalEnumeratedType enumerated_type;
    3136             :     MinimalBitmaskType bitmask_type;
    3137             : 
    3138             :     // ===================  Future extensibility  ============
    3139             :     MinimalExtendedType extended_type;
    3140             : 
    3141         846 :     MinimalTypeObject()
    3142         846 :       : kind(TK_NONE)
    3143         846 :     {}
    3144             : 
    3145         232 :     explicit MinimalTypeObject(const MinimalAliasType& alias)
    3146         232 :       : kind(TK_ALIAS)
    3147         232 :       , alias_type(alias)
    3148         232 :     {}
    3149             : 
    3150           2 :     explicit MinimalTypeObject(const MinimalAnnotationType& annotation)
    3151           2 :       : kind(TK_ANNOTATION)
    3152           2 :       , annotation_type(annotation)
    3153           2 :     {}
    3154             : 
    3155          93 :     explicit MinimalTypeObject(const MinimalStructType& struct_)
    3156          93 :       : kind(TK_STRUCTURE)
    3157          93 :       , struct_type(struct_)
    3158          93 :     {}
    3159             : 
    3160          40 :     explicit MinimalTypeObject(const MinimalUnionType& union_)
    3161          40 :       : kind(TK_UNION)
    3162          40 :       , union_type(union_)
    3163          40 :     {}
    3164             : 
    3165           2 :     explicit MinimalTypeObject(const MinimalBitsetType& bitset)
    3166           2 :       : kind(TK_BITSET)
    3167           2 :       , bitset_type(bitset)
    3168           2 :     {}
    3169             : 
    3170         113 :     explicit MinimalTypeObject(const MinimalSequenceType& sequence)
    3171         113 :       : kind(TK_SEQUENCE)
    3172         113 :       , sequence_type(sequence)
    3173         113 :     {}
    3174             : 
    3175         104 :     explicit MinimalTypeObject(const MinimalArrayType& array)
    3176         104 :       : kind(TK_ARRAY)
    3177         104 :       , array_type(array)
    3178         104 :     {}
    3179             : 
    3180         113 :     explicit MinimalTypeObject(const MinimalMapType& map)
    3181         113 :       : kind(TK_MAP)
    3182         113 :       , map_type(map)
    3183         113 :     {}
    3184             : 
    3185          68 :     explicit MinimalTypeObject(const MinimalEnumeratedType& enum_)
    3186          68 :       : kind(TK_ENUM)
    3187          68 :       , enumerated_type(enum_)
    3188          68 :     {}
    3189             : 
    3190          65 :     explicit MinimalTypeObject(const MinimalBitmaskType& bitmask)
    3191          65 :       : kind(TK_BITMASK)
    3192          65 :       , bitmask_type(bitmask)
    3193          65 :     {}
    3194             : 
    3195          28 :     bool operator==(const MinimalTypeObject& other) const
    3196             :     {
    3197          28 :       if (kind != other.kind) return false;
    3198             : 
    3199          17 :       switch (kind) {
    3200           2 :       case TK_NONE:
    3201           2 :         return true;
    3202           3 :       case TK_ALIAS:
    3203           3 :         return alias_type == other.alias_type;
    3204           1 :       case TK_ANNOTATION:
    3205           1 :         return annotation_type == other.annotation_type;
    3206           2 :       case TK_STRUCTURE:
    3207           2 :         return struct_type == other.struct_type;
    3208           2 :       case TK_UNION:
    3209           2 :         return union_type == other.union_type;
    3210           1 :       case TK_BITSET:
    3211           1 :         return bitset_type == other.bitset_type;
    3212           1 :       case TK_SEQUENCE:
    3213           1 :         return sequence_type == other.sequence_type;
    3214           1 :       case TK_ARRAY:
    3215           1 :         return array_type == other.array_type;
    3216           1 :       case TK_MAP:
    3217           1 :         return map_type == other.map_type;
    3218           2 :       case TK_ENUM:
    3219           2 :         return enumerated_type == other.enumerated_type;
    3220           1 :       case TK_BITMASK:
    3221           1 :         return bitmask_type == other.bitmask_type;
    3222           0 :       default:
    3223           0 :         return extended_type == other.extended_type;
    3224             :       }
    3225             :     }
    3226             : 
    3227          11 :     bool operator!=(const MinimalTypeObject& other) const
    3228             :     {
    3229          11 :       return !(*this == other);
    3230             :     }
    3231             :   };
    3232             : 
    3233             :   // @extensibility(APPENDABLE)  @nested
    3234             :   // union TypeObject switch (octet) { // EquivalenceKind
    3235             :   // case EK_COMPLETE:
    3236             :   //   CompleteTypeObject   complete;
    3237             :   // case EK_MINIMAL:
    3238             :   //   MinimalTypeObject    minimal;
    3239             :   // };
    3240             : 
    3241             :   struct TypeObject {
    3242             :     ACE_CDR::Octet kind;
    3243             :     CompleteTypeObject complete;
    3244             :     MinimalTypeObject minimal;
    3245             : 
    3246         802 :     TypeObject()
    3247         802 :       : kind(0)
    3248         802 :     {}
    3249             : 
    3250             :     explicit TypeObject(const CompleteTypeObject& a_complete)
    3251             :       : kind(EK_COMPLETE)
    3252             :       , complete(a_complete)
    3253             :     {}
    3254             : 
    3255        1034 :     explicit TypeObject(const MinimalTypeObject& a_minimal)
    3256        1034 :       : kind(EK_MINIMAL)
    3257        1034 :       , minimal(a_minimal)
    3258        1034 :     {}
    3259             : 
    3260           9 :     bool operator==(const TypeObject& other) const
    3261             :     {
    3262           9 :       if (kind != other.kind) return false;
    3263             : 
    3264           8 :       if (kind == EK_COMPLETE) {
    3265           1 :         return complete == other.complete;
    3266             :       }
    3267             : 
    3268           7 :       return minimal == other.minimal;
    3269             :     }
    3270             : 
    3271           1 :     bool operator!=(const TypeObject& other) const
    3272             :     {
    3273           1 :       return !(*this == other);
    3274             :     }
    3275             :   };
    3276             : 
    3277             :   typedef Sequence<TypeObject> TypeObjectSeq;
    3278             : 
    3279             :   // Set of TypeObjects representing a strong component: Equivalence class
    3280             :   // for the Strong Connectivity relationship (mutual reachability between
    3281             :   // types).
    3282             :   // Ordered by fully qualified typename lexicographic order
    3283             :   typedef TypeObjectSeq StronglyConnectedComponent;
    3284             : 
    3285             :   struct TypeIdentifierTypeObjectPair {
    3286             :     TypeIdentifier type_identifier;
    3287             :     TypeObject type_object;
    3288             : 
    3289           3 :     TypeIdentifierTypeObjectPair() {}
    3290             : 
    3291           0 :     TypeIdentifierTypeObjectPair(const TypeIdentifier& ti, const TypeObject& to)
    3292           0 :       : type_identifier(ti)
    3293           0 :       , type_object(to)
    3294           0 :     {}
    3295             : 
    3296           2 :     bool operator==(const TypeIdentifierTypeObjectPair& other) const
    3297             :     {
    3298           2 :       return type_identifier == other.type_identifier && type_object == other.type_object;
    3299             :     }
    3300             : 
    3301           1 :     bool operator!=(const TypeIdentifierTypeObjectPair& other) const
    3302             :     {
    3303           1 :       return !(*this == other);
    3304             :     }
    3305             :   };
    3306             :   typedef Sequence<TypeIdentifierTypeObjectPair> TypeIdentifierTypeObjectPairSeq;
    3307             : 
    3308             :   struct TypeIdentifierPair {
    3309             :     TypeIdentifier type_identifier1;
    3310             :     TypeIdentifier type_identifier2;
    3311             : 
    3312         180 :     TypeIdentifierPair() {}
    3313             : 
    3314             :     TypeIdentifierPair(const TypeIdentifier& t1, const TypeIdentifier& t2)
    3315             :       : type_identifier1(t1)
    3316             :       , type_identifier2(t2)
    3317             :     {}
    3318             : 
    3319           2 :     bool operator==(const TypeIdentifierPair& other) const
    3320             :     {
    3321           2 :       return type_identifier1 == other.type_identifier1 && type_identifier2 == other.type_identifier2;
    3322             :     }
    3323             : 
    3324           1 :     bool operator!=(const TypeIdentifierPair& other) const
    3325             :     {
    3326           1 :       return !(*this == other);
    3327             :     }
    3328             :   };
    3329             :   typedef Sequence<TypeIdentifierPair> TypeIdentifierPairSeq;
    3330             : 
    3331             :   struct TypeIdentifierWithSize {
    3332             :     TypeIdentifier type_id;
    3333             :     ACE_CDR::ULong typeobject_serialized_size;
    3334             : 
    3335        5029 :     TypeIdentifierWithSize()
    3336        5029 :       : typeobject_serialized_size()
    3337        5029 :     {}
    3338             : 
    3339         414 :     TypeIdentifierWithSize(const TypeIdentifier& ti, ACE_CDR::ULong to_size)
    3340         414 :       : type_id(ti)
    3341         414 :       , typeobject_serialized_size(to_size)
    3342         414 :     {}
    3343             : 
    3344           2 :     bool operator==(const TypeIdentifierWithSize& other) const
    3345             :     {
    3346           2 :       return type_id == other.type_id && typeobject_serialized_size == other.typeobject_serialized_size;
    3347             :     }
    3348             : 
    3349           1 :     bool operator!=(const TypeIdentifierWithSize& other) const
    3350             :     {
    3351           1 :       return !(*this == other);
    3352             :     }
    3353             :   };
    3354             :   typedef Sequence<TypeIdentifierWithSize> TypeIdentifierWithSizeSeq;
    3355             : 
    3356             :   struct TypeIdentifierWithDependencies {
    3357             :     TypeIdentifierWithSize typeid_with_size;
    3358             :     // The total additional types related to minimal_type
    3359             :     ACE_CDR::Long dependent_typeid_count;
    3360             :     TypeIdentifierWithSizeSeq dependent_typeids;
    3361             : 
    3362        5026 :     TypeIdentifierWithDependencies()
    3363        5026 :       : dependent_typeid_count(0)
    3364        5026 :     {}
    3365             :   };
    3366             : 
    3367             :   typedef Sequence<TypeIdentifierWithDependencies> TypeIdentifierWithDependenciesSeq;
    3368             : 
    3369             :   // This appears in the builtin DDS topics PublicationBuiltinTopicData
    3370             :   // and SubscriptionBuiltinTopicData
    3371             : 
    3372             :   struct TypeInformation {
    3373             :     TypeIdentifierWithDependencies minimal;
    3374             :     TypeIdentifierWithDependencies complete;
    3375             :   };
    3376             : 
    3377             :   OpenDDS_Dcps_Export
    3378             :   TypeIdentifier makeTypeIdentifier(const TypeObject& type_object,
    3379             :                                     const DCPS::Encoding* encoding_option = 0);
    3380             : 
    3381             :   template <typename T>
    3382          81 :   void serialize_type_info(const TypeInformation& type_info, T& seq,
    3383             :                            const DCPS::Encoding* encoding_option = 0)
    3384             :   {
    3385          81 :     const DCPS::Encoding& encoding = encoding_option ? *encoding_option : get_typeobject_encoding();
    3386          81 :     const size_t sz = DCPS::serialized_size(encoding, type_info);
    3387          81 :     seq.length(static_cast<unsigned>(sz));
    3388          81 :     DCPS::MessageBlockHelper<T> helper(seq);
    3389          81 :     DCPS::Serializer serializer(helper, encoding);
    3390          81 :     if (!(serializer << type_info)) {
    3391           0 :       ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: serialize_type_info ")
    3392             :                  ACE_TEXT("serialization of type information failed.\n")));
    3393             :     }
    3394          81 :   }
    3395             : 
    3396             :   template <typename T>
    3397          39 :   bool deserialize_type_info(TypeInformation& type_info, const T& seq)
    3398             :   {
    3399          39 :     DCPS::MessageBlockHelper<T> helper(seq);
    3400          39 :     DCPS::Serializer serializer(helper, XTypes::get_typeobject_encoding());
    3401          39 :     if (!(serializer >> type_info)) {
    3402           0 :       ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: deserialize_type_info ")
    3403             :                  ACE_TEXT("deserialization of type information failed.\n")));
    3404           0 :       return false;
    3405             :     }
    3406          39 :     return true;
    3407          39 :   }
    3408             : 
    3409             :   OpenDDS_Dcps_Export
    3410             :   ACE_CDR::ULong hash_member_name_to_id(const OPENDDS_STRING& name);
    3411             : 
    3412             :   OpenDDS_Dcps_Export
    3413             :   void hash_member_name(NameHash& name_hash, const OPENDDS_STRING& name);
    3414             : 
    3415             :   OpenDDS_Dcps_Export
    3416             :   bool is_fully_descriptive(const TypeIdentifier& ti);
    3417             : 
    3418             :   OpenDDS_Dcps_Export
    3419             :   bool is_plain_collection(const TypeIdentifier& ti);
    3420             : 
    3421             :   OpenDDS_Dcps_Export
    3422             :   bool has_type_object(const TypeIdentifier& ti);
    3423             : 
    3424             :   typedef OPENDDS_MAP(TypeIdentifier, TypeObject) TypeMap;
    3425             : 
    3426             :   struct TypeMapBuilder {
    3427             :     TypeMap type_map_;
    3428             : 
    3429             :     TypeMapBuilder& insert(const TypeIdentifier& ti, const TypeObject& to)
    3430             :     {
    3431             :       type_map_[ti] = to;
    3432             :       return *this;
    3433             :     }
    3434             : 
    3435             :     operator TypeMap&() { return type_map_; }
    3436             :   };
    3437             : 
    3438             :   void compute_dependencies(const TypeMap& type_map,
    3439             :                             const TypeIdentifier& type_identifier,
    3440             :                             OPENDDS_SET(TypeIdentifier)& dependencies);
    3441             : 
    3442             :   OpenDDS_Dcps_Export
    3443             :   const char* typekind_to_string(TypeKind tk);
    3444             : 
    3445             :   OpenDDS_Dcps_Export
    3446             :   bool is_primitive(TypeKind tk);
    3447             : 
    3448             :   OpenDDS_Dcps_Export
    3449             :   bool is_scalar(TypeKind tk);
    3450             : 
    3451             :   OpenDDS_Dcps_Export
    3452             :   bool is_basic(TypeKind tk);
    3453             : 
    3454             :   OpenDDS_Dcps_Export
    3455             :   bool is_complex(TypeKind tk);
    3456             : 
    3457             :   OpenDDS_Dcps_Export
    3458             :   bool is_sequence_like(TypeKind tk);
    3459             : } // namespace XTypes
    3460             : 
    3461             : namespace DCPS {
    3462             : 
    3463             : template<typename T>
    3464             : const XTypes::TypeIdentifier& getMinimalTypeIdentifier();
    3465             : 
    3466             : template<typename T>
    3467             : const XTypes::TypeMap& getMinimalTypeMap();
    3468             : 
    3469             : template<typename T>
    3470             : const XTypes::TypeIdentifier& getCompleteTypeIdentifier();
    3471             : 
    3472             : template<typename T>
    3473             : const XTypes::TypeMap& getCompleteTypeMap();
    3474             : 
    3475             : template<typename T>
    3476        1474 : void serialized_size(const Encoding& encoding, size_t& size,
    3477             :                      const XTypes::Optional<T>& opt)
    3478             : {
    3479        1474 :   size += DCPS::boolean_cdr_size;
    3480        1474 :   if (opt) {
    3481           0 :     serialized_size(encoding, size, opt.value());
    3482             :   }
    3483        1474 : }
    3484             : 
    3485             : template<typename T>
    3486           0 : bool operator<<(Serializer& strm, const XTypes::Optional<T>& opt)
    3487             : {
    3488           0 :   if (!(strm << ACE_OutputCDR::from_boolean(opt.has_value()))) {
    3489           0 :     return false;
    3490             :   }
    3491           0 :   return !opt.has_value() || strm << opt.value();
    3492             : }
    3493             : 
    3494             : template<typename T>
    3495        2312 : bool operator>>(Serializer& strm, XTypes::Optional<T>& opt)
    3496             : {
    3497             :   bool present;
    3498        2312 :   if (!(strm >> ACE_InputCDR::to_boolean(present))) {
    3499           0 :     return false;
    3500             :   }
    3501        2312 :   if (present) {
    3502           0 :     T value;
    3503           0 :     const bool status = strm >> value;
    3504           0 :     opt = XTypes::Optional<T>(value);
    3505           0 :     return status;
    3506           0 :   }
    3507             : 
    3508        2312 :   return true;
    3509             : }
    3510             : 
    3511             : 
    3512             : // XCDR2 encoding rule 12 - Sequences not "of primitive element type"
    3513             : 
    3514             : template<typename T>
    3515        1135 : void serialized_size(const Encoding& encoding, size_t& size,
    3516             :                      const XTypes::Sequence<T>& seq)
    3517             : {
    3518        1135 :   if (!encoding.skip_sequence_dheader()) {
    3519        1133 :     serialized_size_delimiter(encoding, size);
    3520             :   }
    3521        1135 :   primitive_serialized_size_ulong(encoding, size);
    3522        2034 :   for (ACE_CDR::ULong i = 0; i < seq.length(); ++i) {
    3523         899 :     serialized_size(encoding, size, seq[i]);
    3524             :   }
    3525        1135 : }
    3526             : 
    3527             : template<typename T>
    3528             : void serialized_size(const Encoding& encoding, size_t& size,
    3529             :                      const NestedKeyOnly<const XTypes::Sequence<T> >& seq)
    3530             : {
    3531             :   if (!encoding.skip_sequence_dheader()) {
    3532             :     serialized_size_delimiter(encoding, size);
    3533             :   }
    3534             :   primitive_serialized_size_ulong(encoding, size);
    3535             :   for (ACE_CDR::ULong i = 0; i < seq.value.length(); ++i) {
    3536             :     serialized_size(encoding, size, NestedKeyOnly<const T>(seq.value[i]));
    3537             :   }
    3538             : }
    3539             : 
    3540             : template<typename T>
    3541         166 : bool operator<<(Serializer& strm, const XTypes::Sequence<T>& seq)
    3542             : {
    3543         166 :   if (!strm.encoding().skip_sequence_dheader()) {
    3544         165 :     size_t total_size = 0;
    3545         165 :     serialized_size(strm.encoding(), total_size, seq);
    3546         165 :     if (!strm.write_delimiter(total_size)) {
    3547           0 :       return false;
    3548             :     }
    3549             :   }
    3550         166 :   const ACE_CDR::ULong length = seq.length();
    3551         166 :   if (!(strm << length)) {
    3552           0 :     return false;
    3553             :   }
    3554         168 :   for (ACE_CDR::ULong i = 0; i < length; ++i) {
    3555           2 :     if (!(strm << seq[i])) {
    3556           0 :       return false;
    3557             :     }
    3558             :   }
    3559         166 :   return true;
    3560             : }
    3561             : 
    3562             : template<typename T>
    3563             : bool operator<<(Serializer& strm, const NestedKeyOnly<const XTypes::Sequence<T> >& seq)
    3564             : {
    3565             :   if (!strm.encoding().skip_sequence_dheader()) {
    3566             :     size_t total_size = 0;
    3567             :     serialized_size(strm.encoding(), total_size, seq);
    3568             :     if (!strm.write_delimiter(total_size)) {
    3569             :       return false;
    3570             :     }
    3571             :   }
    3572             :   const ACE_CDR::ULong length = seq.value.length();
    3573             :   if (!(strm << length)) {
    3574             :     return false;
    3575             :   }
    3576             :   for (ACE_CDR::ULong i = 0; i < length; ++i) {
    3577             :     if (!(strm << NestedKeyOnly<const T>(seq.value[i]))) {
    3578             :       return false;
    3579             :     }
    3580             :   }
    3581             :   return true;
    3582             : }
    3583             : 
    3584             : template<typename T>
    3585         249 : bool operator>>(Serializer& strm, XTypes::Sequence<T>& seq)
    3586             : {
    3587         249 :   size_t total_size = 0;
    3588         249 :   if (!strm.read_delimiter(total_size)) {
    3589           0 :     return false;
    3590             :   }
    3591             : 
    3592             :   // special cases for compatibility with older versions that encoded this
    3593             :   // sequence incorrectly - if the DHeader was read as a 0, it's an empty
    3594             :   // sequence although it should have been encoded as DHeader (4) + Length (0)
    3595         249 :   if (total_size == 0) {
    3596           1 :     seq.length(0);
    3597           1 :     return true;
    3598             :   }
    3599             : 
    3600         248 :   if (total_size < 4) {
    3601           0 :     return false;
    3602             :   }
    3603             : 
    3604         248 :   const size_t end_of_seq = strm.rpos() + total_size;
    3605             :   ACE_CDR::ULong length;
    3606         248 :   if (!(strm >> length)) {
    3607           0 :     return false;
    3608             :   }
    3609             : 
    3610         248 :   if (length > strm.length()) {
    3611             :     // if encoded incorrectly, the first 4 bytes of the elements were read
    3612             :     // as if they were the length - this may end up being larger than the
    3613             :     // number of bytes remaining in the Serializer
    3614           0 :     return false;
    3615             :   }
    3616             : 
    3617         248 :   seq.length(length);
    3618        1318 :   for (ACE_CDR::ULong i = 0; i < length; ++i) {
    3619        1070 :     if (!(strm >> seq[i])) {
    3620           0 :       return false;
    3621             :     }
    3622             :   }
    3623         248 :   return strm.skip(end_of_seq - strm.rpos());
    3624             : }
    3625             : 
    3626             : template<typename T>
    3627             : bool operator>>(Serializer& strm, NestedKeyOnly<XTypes::Sequence<T> >& seq)
    3628             : {
    3629             :   size_t total_size = 0;
    3630             :   if (!strm.read_delimiter(total_size)) {
    3631             :     return false;
    3632             :   }
    3633             : 
    3634             :   // special cases for compatibility with older versions that encoded this
    3635             :   // sequence incorrectly - if the DHeader was read as a 0, it's an empty
    3636             :   // sequence although it should have been encoded as DHeader (4) + Length (0)
    3637             :   if (total_size == 0) {
    3638             :     seq.value.length(0);
    3639             :     return true;
    3640             :   }
    3641             : 
    3642             :   if (total_size < 4) {
    3643             :     return false;
    3644             :   }
    3645             : 
    3646             :   const size_t end_of_seq = strm.rpos() + total_size;
    3647             :   ACE_CDR::ULong length;
    3648             :   if (!(strm >> length)) {
    3649             :     return false;
    3650             :   }
    3651             : 
    3652             :   if (length > strm.length()) {
    3653             :     // if encoded incorrectly, the first 4 bytes of the elements were read
    3654             :     // as if they were the length - this may end up being larger than the
    3655             :     // number of bytes remaining in the Serializer
    3656             :     return false;
    3657             :   }
    3658             : 
    3659             :   seq.value.length(length);
    3660             :   for (ACE_CDR::ULong i = 0; i < length; ++i) {
    3661             :     NestedKeyOnly<T> tmp(seq.value[i]);
    3662             :     if (!(strm >> tmp)) {
    3663             :       return false;
    3664             :     }
    3665             :   }
    3666             :   return strm.skip(end_of_seq - strm.rpos());
    3667             : }
    3668             : 
    3669             : template <typename T>
    3670             : bool gen_skip_over(Serializer&, XTypes::Sequence<T>*)
    3671             : {
    3672             :   // No-op;
    3673             :   return true;
    3674             : }
    3675             : 
    3676             : // non-template overloads for sequences of basic types:
    3677             : // XCDR2 encoding rule 11 - Sequences of primitive element type
    3678             : 
    3679             : OpenDDS_Dcps_Export
    3680             : void serialized_size(const Encoding& encoding, size_t& size,
    3681             :   const XTypes::LBoundSeq& seq);
    3682             : OpenDDS_Dcps_Export
    3683             : bool operator<<(Serializer& strm, const XTypes::LBoundSeq& seq);
    3684             : OpenDDS_Dcps_Export
    3685             : bool operator>>(Serializer& strm, XTypes::LBoundSeq& seq);
    3686             : 
    3687             : OpenDDS_Dcps_Export
    3688             : void serialized_size(const Encoding& encoding, size_t& size,
    3689             :   const XTypes::SBoundSeq& seq);
    3690             : OpenDDS_Dcps_Export
    3691             : bool operator<<(Serializer& strm, const XTypes::SBoundSeq& seq);
    3692             : OpenDDS_Dcps_Export
    3693             : bool operator>>(Serializer& strm, XTypes::SBoundSeq& seq);
    3694             : 
    3695             : OpenDDS_Dcps_Export
    3696             : void serialized_size(const Encoding& encoding, size_t& size,
    3697             :   const XTypes::UnionCaseLabelSeq& seq);
    3698             : OpenDDS_Dcps_Export
    3699             : bool operator<<(Serializer& strm, const XTypes::UnionCaseLabelSeq& seq);
    3700             : OpenDDS_Dcps_Export
    3701             : bool operator>>(Serializer& strm, XTypes::UnionCaseLabelSeq& seq);
    3702             : 
    3703             : 
    3704         150 : inline void serialized_size(const Encoding&, size_t&, const XTypes::MinimalTypeDetail&)
    3705         150 : {}
    3706           2 : inline bool operator<<(Serializer&, const XTypes::MinimalTypeDetail&) { return true; }
    3707          49 : inline bool operator>>(Serializer&, XTypes::MinimalTypeDetail&) { return true; }
    3708             : 
    3709             : void serialized_size(const Encoding& encoding, size_t& size,
    3710             :   const XTypes::ExtendedAnnotationParameterValue& stru);
    3711             : bool operator<<(Serializer& strm,
    3712             :   const XTypes::ExtendedAnnotationParameterValue& stru);
    3713             : bool operator>>(Serializer& strm,
    3714             :   XTypes::ExtendedAnnotationParameterValue& stru);
    3715             : 
    3716             : void serialized_size(const Encoding& encoding, size_t& size,
    3717             :   const XTypes::NameHash_forany& arr);
    3718             : bool operator<<(Serializer& ser, const XTypes::NameHash_forany& arr);
    3719             : bool operator>>(Serializer& ser, XTypes::NameHash_forany& arr);
    3720             : 
    3721             : void serialized_size(const Encoding& encoding, size_t& size,
    3722             :   const XTypes::EquivalenceHash_forany& arr);
    3723             : bool operator<<(Serializer& ser, const XTypes::EquivalenceHash_forany& arr);
    3724             : bool operator>>(Serializer& ser, XTypes::EquivalenceHash_forany& arr);
    3725             : 
    3726             : void serialized_size(const Encoding& encoding, size_t& size,
    3727             :   const XTypes::CompleteTypeDetail& stru);
    3728             : bool operator<<(Serializer& ser, const XTypes::CompleteTypeDetail& stru);
    3729             : bool operator>>(Serializer& ser, XTypes::CompleteTypeDetail& stru);
    3730             : 
    3731             : void serialized_size(const Encoding& encoding, size_t& size,
    3732             :   const XTypes::CompleteStructHeader& stru);
    3733             : bool operator<<(Serializer& ser, const XTypes::CompleteStructHeader& stru);
    3734             : bool operator>>(Serializer& ser, XTypes::CompleteStructHeader& stru);
    3735             : 
    3736             : void serialized_size(const Encoding& encoding, size_t& size,
    3737             :   const XTypes::MinimalStructHeader& stru);
    3738             : bool operator<<(Serializer& ser, const XTypes::MinimalStructHeader& stru);
    3739             : bool operator>>(Serializer& ser, XTypes::MinimalStructHeader& stru);
    3740             : 
    3741             : void serialized_size(const Encoding& encoding, size_t& size,
    3742             :   const XTypes::CompleteStructType& stru);
    3743             : bool operator<<(Serializer& ser, const XTypes::CompleteStructType& stru);
    3744             : bool operator>>(Serializer& ser, XTypes::CompleteStructType& stru);
    3745             : 
    3746             : void serialized_size(const Encoding& encoding, size_t& size,
    3747             :   const XTypes::MinimalStructType& stru);
    3748             : bool operator<<(Serializer& ser, const XTypes::MinimalStructType& stru);
    3749             : bool operator>>(Serializer& ser, XTypes::MinimalStructType& stru);
    3750             : 
    3751             : void serialized_size(const Encoding& encoding, size_t& size,
    3752             :   const XTypes::CompleteUnionType& stru);
    3753             : bool operator<<(Serializer& ser, const XTypes::CompleteUnionType& stru);
    3754             : bool operator>>(Serializer& ser, XTypes::CompleteUnionType& stru);
    3755             : 
    3756             : void serialized_size(const Encoding& encoding, size_t& size,
    3757             :   const XTypes::MinimalUnionType& stru);
    3758             : bool operator<<(Serializer& ser, const XTypes::MinimalUnionType& stru);
    3759             : bool operator>>(Serializer& ser, XTypes::MinimalUnionType& stru);
    3760             : 
    3761             : void serialized_size(const Encoding& encoding, size_t& size,
    3762             :   const XTypes::CompleteAnnotationType& stru);
    3763             : bool operator<<(Serializer& ser, const XTypes::CompleteAnnotationType& stru);
    3764             : bool operator>>(Serializer& ser, XTypes::CompleteAnnotationType& stru);
    3765             : 
    3766             : void serialized_size(const Encoding& encoding, size_t& size,
    3767             :   const XTypes::MinimalAnnotationType& stru);
    3768             : bool operator>>(Serializer& ser, const XTypes::MinimalAnnotationType& stru);
    3769             : bool operator<<(Serializer& ser, XTypes::MinimalAnnotationType& stru);
    3770             : 
    3771             : void serialized_size(const Encoding& encoding, size_t& size,
    3772             :   const XTypes::CompleteAliasType& stru);
    3773             : bool operator>>(Serializer& ser, const XTypes::CompleteAliasType& stru);
    3774             : bool operator<<(Serializer& ser, XTypes::CompleteAliasType& stru);
    3775             : 
    3776             : void serialized_size(const Encoding& encoding, size_t& size,
    3777             :   const XTypes::MinimalAliasType& stru);
    3778             : bool operator>>(Serializer& ser, const XTypes::MinimalAliasType& stru);
    3779             : bool operator<<(Serializer& ser, XTypes::MinimalAliasType& stru);
    3780             : 
    3781             : void serialized_size(const Encoding& encoding, size_t& size,
    3782             :   const XTypes::CompleteSequenceType& stru);
    3783             : bool operator<<(Serializer& ser, const XTypes::CompleteSequenceType& stru);
    3784             : bool operator>>(Serializer& ser, XTypes::CompleteSequenceType& stru);
    3785             : 
    3786             : void serialized_size(const Encoding& encoding, size_t& size,
    3787             :   const XTypes::MinimalSequenceType& stru);
    3788             : bool operator<<(Serializer& ser, const XTypes::MinimalSequenceType& stru);
    3789             : bool operator>>(Serializer& ser, XTypes::MinimalSequenceType& stru);
    3790             : 
    3791             : void serialized_size(const Encoding& encoding, size_t& size,
    3792             :   const XTypes::CompleteArrayType& stru);
    3793             : bool operator<<(Serializer& ser, const XTypes::CompleteArrayType& stru);
    3794             : bool operator>>(Serializer& ser, XTypes::CompleteArrayType& stru);
    3795             : 
    3796             : void serialized_size(const Encoding& encoding, size_t& size,
    3797             :   const XTypes::MinimalArrayType& stru);
    3798             : bool operator<<(Serializer& ser, const XTypes::MinimalArrayType& stru);
    3799             : bool operator>>(Serializer& ser, XTypes::MinimalArrayType& stru);
    3800             : 
    3801             : void serialized_size(const Encoding& encoding, size_t& size,
    3802             :   const XTypes::CompleteMapType& stru);
    3803             : bool operator<<(Serializer& ser, const XTypes::CompleteMapType& stru);
    3804             : bool operator>>(Serializer& ser, XTypes::CompleteMapType& stru);
    3805             : 
    3806             : void serialized_size(const Encoding& encoding, size_t& size,
    3807             :   const XTypes::MinimalMapType& stru);
    3808             : bool operator<<(Serializer& ser, const XTypes::MinimalMapType& stru);
    3809             : bool operator>>(Serializer& ser, XTypes::MinimalMapType& stru);
    3810             : 
    3811             : void serialized_size(const Encoding& encoding, size_t& size,
    3812             :   const XTypes::CompleteEnumeratedHeader& stru);
    3813             : bool operator<<(Serializer& ser, const XTypes::CompleteEnumeratedHeader& stru);
    3814             : bool operator>>(Serializer& ser, XTypes::CompleteEnumeratedHeader& stru);
    3815             : 
    3816             : void serialized_size(const Encoding& encoding, size_t& size,
    3817             :   const XTypes::MinimalEnumeratedHeader& stru);
    3818             : bool operator<<(Serializer& ser, const XTypes::MinimalEnumeratedHeader& stru);
    3819             : bool operator>>(Serializer& ser, XTypes::MinimalEnumeratedHeader& stru);
    3820             : 
    3821             : void serialized_size(const Encoding& encoding, size_t& size,
    3822             :   const XTypes::CompleteEnumeratedType& stru);
    3823             : bool operator<<(Serializer& ser, const XTypes::CompleteEnumeratedType& stru);
    3824             : bool operator>>(Serializer& ser, XTypes::CompleteEnumeratedType& stru);
    3825             : 
    3826             : void serialized_size(const Encoding& encoding, size_t& size,
    3827             :   const XTypes::MinimalEnumeratedType& stru);
    3828             : bool operator<<(Serializer& ser, const XTypes::MinimalEnumeratedType& stru);
    3829             : bool operator>>(Serializer& ser, XTypes::MinimalEnumeratedType& stru);
    3830             : 
    3831             : void serialized_size(const Encoding& encoding, size_t& size,
    3832             :   const XTypes::MinimalBitmaskType& stru);
    3833             : bool operator<<(Serializer& ser, const XTypes::MinimalBitmaskType& stru);
    3834             : bool operator>>(Serializer& ser, XTypes::MinimalBitmaskType& stru);
    3835             : 
    3836             : void serialized_size(const Encoding& encoding, size_t& size,
    3837             :   const XTypes::CompleteBitmaskType& stru);
    3838             : bool operator<<(Serializer& ser, const XTypes::CompleteBitmaskType& stru);
    3839             : bool operator>>(Serializer& ser, XTypes::CompleteBitmaskType& stru);
    3840             : 
    3841             : void serialized_size(const Encoding& encoding, size_t& size,
    3842             :   const XTypes::CompleteBitsetType& stru);
    3843             : bool operator<<(Serializer& ser, const XTypes::CompleteBitsetType& stru);
    3844             : bool operator>>(Serializer& ser, XTypes::CompleteBitsetType& stru);
    3845             : 
    3846             : void serialized_size(const Encoding& encoding, size_t& size,
    3847             :   const XTypes::MinimalBitsetType& stru);
    3848             : bool operator<<(Serializer& ser, const XTypes::MinimalBitsetType& stru);
    3849             : bool operator>>(Serializer& ser, XTypes::MinimalBitsetType& stru);
    3850             : 
    3851             : void serialized_size(const Encoding& encoding, size_t& size,
    3852             :   const XTypes::CompleteExtendedType& stru);
    3853             : bool operator<<(Serializer& strm, const XTypes::CompleteExtendedType& stru);
    3854             : bool operator>>(Serializer& strm, XTypes::CompleteExtendedType& stru);
    3855             : 
    3856             : void serialized_size(const Encoding& encoding, size_t& size,
    3857             :   const XTypes::CompleteTypeObject& type_object);
    3858             : bool operator<<(Serializer& ser, const XTypes::CompleteTypeObject& type_object);
    3859             : bool operator>>(Serializer& ser, XTypes::CompleteTypeObject& type_object);
    3860             : 
    3861             : void serialized_size(const Encoding& encoding, size_t& size,
    3862             :   const XTypes::MinimalExtendedType& stru);
    3863             : bool operator<<(Serializer& strm, const XTypes::MinimalExtendedType& stru);
    3864             : bool operator>>(Serializer& strm, XTypes::MinimalExtendedType& stru);
    3865             : 
    3866             : void serialized_size(const Encoding& encoding, size_t& size,
    3867             :   const XTypes::MinimalTypeObject& type_object);
    3868             : bool operator<<(Serializer& ser, const XTypes::MinimalTypeObject& type_object);
    3869             : bool operator>>(Serializer& ser, XTypes::MinimalTypeObject& type_object);
    3870             : 
    3871             : OpenDDS_Dcps_Export
    3872             : void serialized_size(const Encoding& encoding, size_t& size,
    3873             :   const XTypes::TypeObject& type_object);
    3874             : 
    3875             : OpenDDS_Dcps_Export
    3876             : bool operator<<(Serializer& ser, const XTypes::TypeObject& type_object);
    3877             : 
    3878             : OpenDDS_Dcps_Export
    3879             : bool operator>>(Serializer& ser, XTypes::TypeObject& type_object);
    3880             : 
    3881             : OpenDDS_Dcps_Export
    3882             : void serialized_size(const Encoding& encoding, size_t& size,
    3883             :   const XTypes::TypeInformation& type_info);
    3884             : 
    3885             : OpenDDS_Dcps_Export
    3886             : void serialized_size(const Encoding& encoding, size_t& size,
    3887             :   const XTypes::TypeIdentifier& stru);
    3888             : OpenDDS_Dcps_Export
    3889             : void serialized_size(const Encoding& encoding, size_t& size,
    3890             :   const NestedKeyOnly<const XTypes::TypeIdentifier>& stru);
    3891             : OpenDDS_Dcps_Export
    3892             : bool operator<<(Serializer& ser, const XTypes::TypeIdentifier& stru);
    3893             : OpenDDS_Dcps_Export
    3894             : bool operator<<(Serializer& ser, const NestedKeyOnly<const XTypes::TypeIdentifier>& stru);
    3895             : OpenDDS_Dcps_Export
    3896             : bool operator>>(Serializer& ser, XTypes::TypeIdentifier& stru);
    3897             : OpenDDS_Dcps_Export
    3898             : bool operator>>(Serializer& ser, NestedKeyOnly<XTypes::TypeIdentifier>& stru);
    3899             : 
    3900             : OpenDDS_Dcps_Export
    3901             : void serialized_size(const Encoding& encoding, size_t& size,
    3902             :   const XTypes::TypeIdentifierWithSize& stru);
    3903             : OpenDDS_Dcps_Export
    3904             : void serialized_size(const Encoding& encoding, size_t& size,
    3905             :   const NestedKeyOnly<const XTypes::TypeIdentifierWithSize>& stru);
    3906             : OpenDDS_Dcps_Export
    3907             : bool operator<<(Serializer& ser, const XTypes::TypeIdentifierWithSize& stru);
    3908             : OpenDDS_Dcps_Export
    3909             : bool operator<<(Serializer& ser, const NestedKeyOnly<const XTypes::TypeIdentifierWithSize>& stru);
    3910             : OpenDDS_Dcps_Export
    3911             : bool operator>>(Serializer& ser, XTypes::TypeIdentifierWithSize& stru);
    3912             : OpenDDS_Dcps_Export
    3913             : bool operator>>(Serializer& ser, NestedKeyOnly<XTypes::TypeIdentifierWithSize>& stru);
    3914             : 
    3915             : void serialized_size(const Encoding& encoding, size_t& size,
    3916             :   const XTypes::TypeIdentifierWithDependencies& stru);
    3917             : bool operator<<(Serializer& ser, const XTypes::TypeIdentifierWithDependencies& stru);
    3918             : bool operator>>(Serializer& ser, XTypes::TypeIdentifierWithDependencies& stru);
    3919             : 
    3920             : void serialized_size(const Encoding& encoding, size_t& size,
    3921             :   const XTypes::AppliedAnnotation& stru);
    3922             : bool operator<<(Serializer& ser, const XTypes::AppliedAnnotation& stru);
    3923             : bool operator>>(Serializer& ser, XTypes::AppliedAnnotation& stru);
    3924             : 
    3925             : void serialized_size(const Encoding& encoding, size_t& size,
    3926             :   const XTypes::AppliedBuiltinTypeAnnotations& stru);
    3927             : bool operator<<(Serializer& ser, const XTypes::AppliedBuiltinTypeAnnotations& stru);
    3928             : bool operator>>(Serializer& ser, XTypes::AppliedBuiltinTypeAnnotations& stru);
    3929             : 
    3930             : void serialized_size(const Encoding& encoding, size_t& size,
    3931             :   const XTypes::CompleteAliasBody& stru);
    3932             : bool operator<<(Serializer& ser, const XTypes::CompleteAliasBody& stru);
    3933             : bool operator>>(Serializer& ser, XTypes::CompleteAliasBody& stru);
    3934             : 
    3935             : void serialized_size(const Encoding& encoding, size_t& size,
    3936             :   const XTypes::CompleteAliasHeader& stru);
    3937             : bool operator<<(Serializer& ser, const XTypes::CompleteAliasHeader& stru);
    3938             : bool operator>>(Serializer& ser, XTypes::CompleteAliasHeader& stru);
    3939             : 
    3940             : void serialized_size(const Encoding& encoding, size_t& size,
    3941             :   const XTypes::CompleteAnnotationHeader& stru);
    3942             : bool operator<<(Serializer& ser, const XTypes::CompleteAnnotationHeader& stru);
    3943             : bool operator>>(Serializer& ser, XTypes::CompleteAnnotationHeader& stru);
    3944             : 
    3945             : void serialized_size(const Encoding& encoding, size_t& size,
    3946             :   const XTypes::CompleteAnnotationParameter& stru);
    3947             : bool operator<<(Serializer& ser, const XTypes::CompleteAnnotationParameter& stru);
    3948             : bool operator>>(Serializer& ser, XTypes::CompleteAnnotationParameter& stru);
    3949             : 
    3950             : void serialized_size(const Encoding& encoding, size_t& size,
    3951             :   const XTypes::CompleteArrayHeader& stru);
    3952             : bool operator<<(Serializer& ser, const XTypes::CompleteArrayHeader& stru);
    3953             : bool operator>>(Serializer& ser, XTypes::CompleteArrayHeader& stru);
    3954             : 
    3955             : void serialized_size(const Encoding& encoding, size_t& size,
    3956             :   const XTypes::CompleteBitfield& stru);
    3957             : bool operator<<(Serializer& ser, const XTypes::CompleteBitfield& stru);
    3958             : bool operator>>(Serializer& ser, XTypes::CompleteBitfield& stru);
    3959             : 
    3960             : void serialized_size(const Encoding& encoding, size_t& size,
    3961             :   const XTypes::CompleteBitflag& stru);
    3962             : bool operator<<(Serializer& ser, const XTypes::CompleteBitflag& stru);
    3963             : bool operator>>(Serializer& ser, XTypes::CompleteBitflag& stru);
    3964             : 
    3965             : void serialized_size(const Encoding& encoding, size_t& size,
    3966             :   const XTypes::CompleteBitsetHeader& stru);
    3967             : bool operator<<(Serializer& ser, const XTypes::CompleteBitsetHeader& stru);
    3968             : bool operator>>(Serializer& ser, XTypes::CompleteBitsetHeader& stru);
    3969             : 
    3970             : void serialized_size(const Encoding& encoding, size_t& size,
    3971             :   const XTypes::CompleteCollectionElement& stru);
    3972             : bool operator<<(Serializer& ser, const XTypes::CompleteCollectionElement& stru);
    3973             : bool operator>>(Serializer& ser, XTypes::CompleteCollectionElement& stru);
    3974             : 
    3975             : void serialized_size(const Encoding& encoding, size_t& size,
    3976             :   const XTypes::CompleteCollectionHeader& stru);
    3977             : bool operator<<(Serializer& ser, const XTypes::CompleteCollectionHeader& stru);
    3978             : bool operator>>(Serializer& ser, XTypes::CompleteCollectionHeader& stru);
    3979             : 
    3980             : void serialized_size(const Encoding& encoding, size_t& size,
    3981             :   const XTypes::CompleteDiscriminatorMember& stru);
    3982             : bool operator<<(Serializer& ser, const XTypes::CompleteDiscriminatorMember& stru);
    3983             : bool operator>>(Serializer& ser, XTypes::CompleteDiscriminatorMember& stru);
    3984             : 
    3985             : void serialized_size(const Encoding& encoding, size_t& size,
    3986             :   const XTypes::CompleteEnumeratedLiteral& stru);
    3987             : bool operator<<(Serializer& ser, const XTypes::CompleteEnumeratedLiteral& stru);
    3988             : bool operator>>(Serializer& ser, XTypes::CompleteEnumeratedLiteral& stru);
    3989             : 
    3990             : void serialized_size(const Encoding& encoding, size_t& size,
    3991             :   const XTypes::CompleteStructMember& stru);
    3992             : bool operator<<(Serializer& ser, const XTypes::CompleteStructMember& stru);
    3993             : bool operator>>(Serializer& ser, XTypes::CompleteStructMember& stru);
    3994             : 
    3995             : void serialized_size(const Encoding& encoding, size_t& size,
    3996             :   const XTypes::CompleteUnionHeader& stru);
    3997             : bool operator<<(Serializer& ser, const XTypes::CompleteUnionHeader& stru);
    3998             : bool operator>>(Serializer& ser, XTypes::CompleteUnionHeader& stru);
    3999             : 
    4000             : void serialized_size(const Encoding& encoding, size_t& size,
    4001             :   const XTypes::CompleteUnionMember& stru);
    4002             : bool operator<<(Serializer& ser, const XTypes::CompleteUnionMember& stru);
    4003             : bool operator>>(Serializer& ser, XTypes::CompleteUnionMember& stru);
    4004             : 
    4005             : void serialized_size(const Encoding& encoding, size_t& size,
    4006             :   const XTypes::MinimalAliasBody& stru);
    4007             : bool operator<<(Serializer& ser, const XTypes::MinimalAliasBody& stru);
    4008             : bool operator>>(Serializer& ser, XTypes::MinimalAliasBody& stru);
    4009             : 
    4010             : void serialized_size(const Encoding& encoding, size_t& size,
    4011             :   const XTypes::MinimalAliasHeader& stru);
    4012             : bool operator<<(Serializer& ser, const XTypes::MinimalAliasHeader& stru);
    4013             : bool operator>>(Serializer& ser, XTypes::MinimalAliasHeader& stru);
    4014             : 
    4015             : void serialized_size(const Encoding& encoding, size_t& size,
    4016             :   const XTypes::MinimalAnnotationHeader& stru);
    4017             : bool operator<<(Serializer& ser, const XTypes::MinimalAnnotationHeader& stru);
    4018             : bool operator>>(Serializer& ser, XTypes::MinimalAnnotationHeader& stru);
    4019             : 
    4020             : void serialized_size(const Encoding& encoding, size_t& size,
    4021             :   const XTypes::MinimalAnnotationParameter& stru);
    4022             : bool operator<<(Serializer& ser, const XTypes::MinimalAnnotationParameter& stru);
    4023             : bool operator>>(Serializer& ser, XTypes::MinimalAnnotationParameter& stru);
    4024             : 
    4025             : void serialized_size(const Encoding& encoding, size_t& size,
    4026             :   const XTypes::MinimalArrayHeader& stru);
    4027             : bool operator<<(Serializer& ser, const XTypes::MinimalArrayHeader& stru);
    4028             : bool operator>>(Serializer& ser, XTypes::MinimalArrayHeader& stru);
    4029             : 
    4030             : void serialized_size(const Encoding& encoding, size_t& size,
    4031             :   const XTypes::MinimalBitfield& stru);
    4032             : bool operator<<(Serializer& ser, const XTypes::MinimalBitfield& stru);
    4033             : bool operator>>(Serializer& ser, XTypes::MinimalBitfield& stru);
    4034             : 
    4035             : void serialized_size(const Encoding& encoding, size_t& size,
    4036             :   const XTypes::MinimalBitflag& stru);
    4037             : bool operator<<(Serializer& ser, const XTypes::MinimalBitflag& stru);
    4038             : bool operator>>(Serializer& ser, XTypes::MinimalBitflag& stru);
    4039             : 
    4040             : void serialized_size(const Encoding& encoding, size_t& size,
    4041             :   const XTypes::MinimalBitsetHeader& stru);
    4042             : bool operator<<(Serializer& ser, const XTypes::MinimalBitsetHeader& stru);
    4043             : bool operator>>(Serializer& ser, XTypes::MinimalBitsetHeader& stru);
    4044             : 
    4045             : void serialized_size(const Encoding& encoding, size_t& size,
    4046             :   const XTypes::MinimalCollectionElement& stru);
    4047             : bool operator<<(Serializer& ser, const XTypes::MinimalCollectionElement& stru);
    4048             : bool operator>>(Serializer& ser, XTypes::MinimalCollectionElement& stru);
    4049             : 
    4050             : void serialized_size(const Encoding& encoding, size_t& size,
    4051             :   const XTypes::MinimalCollectionHeader& stru);
    4052             : bool operator<<(Serializer& ser, const XTypes::MinimalCollectionHeader& stru);
    4053             : bool operator>>(Serializer& ser, XTypes::MinimalCollectionHeader& stru);
    4054             : 
    4055             : void serialized_size(const Encoding& encoding, size_t& size,
    4056             :   const XTypes::MinimalDiscriminatorMember& stru);
    4057             : bool operator<<(Serializer& ser, const XTypes::MinimalDiscriminatorMember& stru);
    4058             : bool operator>>(Serializer& ser, XTypes::MinimalDiscriminatorMember& stru);
    4059             : 
    4060             : void serialized_size(const Encoding& encoding, size_t& size,
    4061             :   const XTypes::MinimalEnumeratedLiteral& stru);
    4062             : bool operator<<(Serializer& ser, const XTypes::MinimalEnumeratedLiteral& stru);
    4063             : bool operator>>(Serializer& ser, XTypes::MinimalEnumeratedLiteral& stru);
    4064             : 
    4065             : void serialized_size(const Encoding& encoding, size_t& size,
    4066             :   const XTypes::MinimalStructMember& stru);
    4067             : bool operator<<(Serializer& ser, const XTypes::MinimalStructMember& stru);
    4068             : bool operator>>(Serializer& ser, XTypes::MinimalStructMember& stru);
    4069             : 
    4070             : void serialized_size(const Encoding& encoding, size_t& size,
    4071             :   const XTypes::MinimalUnionHeader& stru);
    4072             : bool operator<<(Serializer& ser, const XTypes::MinimalUnionHeader& stru);
    4073             : bool operator>>(Serializer& ser, XTypes::MinimalUnionHeader& stru);
    4074             : 
    4075             : void serialized_size(const Encoding& encoding, size_t& size,
    4076             :   const XTypes::MinimalUnionMember& stru);
    4077             : bool operator<<(Serializer& ser, const XTypes::MinimalUnionMember& stru);
    4078             : bool operator>>(Serializer& ser, XTypes::MinimalUnionMember& stru);
    4079             : 
    4080             : void serialized_size(const Encoding& encoding, size_t& size,
    4081             :   const XTypes::AnnotationParameterValue& stru);
    4082             : bool operator<<(Serializer& strm, const XTypes::AnnotationParameterValue& stru);
    4083             : bool operator>>(Serializer& strm, XTypes::AnnotationParameterValue& stru);
    4084             : 
    4085             : void serialized_size(const Encoding& encoding, size_t& size,
    4086             :   const XTypes::AppliedAnnotationParameter& stru);
    4087             : bool operator<<(Serializer& strm, const XTypes::AppliedAnnotationParameter& stru);
    4088             : bool operator>>(Serializer& strm, XTypes::AppliedAnnotationParameter& stru);
    4089             : 
    4090             : void serialized_size(const Encoding& encoding, size_t& size,
    4091             :   const XTypes::AppliedBuiltinMemberAnnotations& stru);
    4092             : bool operator<<(Serializer& strm, const XTypes::AppliedBuiltinMemberAnnotations& stru);
    4093             : bool operator>>(Serializer& strm, XTypes::AppliedBuiltinMemberAnnotations& stru);
    4094             : 
    4095             : void serialized_size(const Encoding& encoding, size_t& size,
    4096             :   const XTypes::AppliedVerbatimAnnotation& stru);
    4097             : bool operator<<(Serializer& strm, const XTypes::AppliedVerbatimAnnotation& stru);
    4098             : bool operator>>(Serializer& strm, XTypes::AppliedVerbatimAnnotation& stru);
    4099             : 
    4100             : void serialized_size(const Encoding& encoding, size_t& size,
    4101             :   const XTypes::CommonAliasBody& stru);
    4102             : bool operator<<(Serializer& strm, const XTypes::CommonAliasBody& stru);
    4103             : bool operator>>(Serializer& strm, XTypes::CommonAliasBody& stru);
    4104             : 
    4105             : void serialized_size(const Encoding& encoding, size_t& size,
    4106             :   const XTypes::CommonAnnotationParameter& stru);
    4107             : bool operator<<(Serializer& strm, const XTypes::CommonAnnotationParameter& stru);
    4108             : bool operator>>(Serializer& strm, XTypes::CommonAnnotationParameter& stru);
    4109             : 
    4110             : void serialized_size(const Encoding& encoding, size_t& size,
    4111             :   const XTypes::CommonArrayHeader& stru);
    4112             : bool operator<<(Serializer& strm, const XTypes::CommonArrayHeader& stru);
    4113             : bool operator>>(Serializer& strm, XTypes::CommonArrayHeader& stru);
    4114             : 
    4115             : void serialized_size(const Encoding& encoding, size_t& size,
    4116             :   const XTypes::CommonBitfield& stru);
    4117             : bool operator<<(Serializer& strm, const XTypes::CommonBitfield& stru);
    4118             : bool operator>>(Serializer& strm, XTypes::CommonBitfield& stru);
    4119             : 
    4120             : void serialized_size(const Encoding& encoding, size_t& size,
    4121             :   const XTypes::CommonBitflag& stru);
    4122             : bool operator<<(Serializer& strm, const XTypes::CommonBitflag& stru);
    4123             : bool operator>>(Serializer& strm, XTypes::CommonBitflag& stru);
    4124             : 
    4125             : void serialized_size(const Encoding& encoding, size_t& size,
    4126             :   const XTypes::CommonCollectionElement& stru);
    4127             : bool operator<<(Serializer& strm, const XTypes::CommonCollectionElement& stru);
    4128             : bool operator>>(Serializer& strm, XTypes::CommonCollectionElement& stru);
    4129             : 
    4130             : void serialized_size(const Encoding& encoding, size_t& size,
    4131             :   const XTypes::CommonCollectionHeader& stru);
    4132             : bool operator<<(Serializer& strm, const XTypes::CommonCollectionHeader& stru);
    4133             : bool operator>>(Serializer& strm, XTypes::CommonCollectionHeader& stru);
    4134             : 
    4135             : void serialized_size(const Encoding& encoding, size_t& size,
    4136             :   const XTypes::CommonDiscriminatorMember& stru);
    4137             : bool operator<<(Serializer& strm, const XTypes::CommonDiscriminatorMember& stru);
    4138             : bool operator>>(Serializer& strm, XTypes::CommonDiscriminatorMember& stru);
    4139             : 
    4140             : void serialized_size(const Encoding& encoding, size_t& size,
    4141             :   const XTypes::CommonEnumeratedHeader& stru);
    4142             : bool operator<<(Serializer& strm, const XTypes::CommonEnumeratedHeader& stru);
    4143             : bool operator>>(Serializer& strm, XTypes::CommonEnumeratedHeader& stru);
    4144             : 
    4145             : void serialized_size(const Encoding& encoding, size_t& size,
    4146             :   const XTypes::CommonEnumeratedLiteral& stru);
    4147             : bool operator<<(Serializer& strm, const XTypes::CommonEnumeratedLiteral& stru);
    4148             : bool operator>>(Serializer& strm, XTypes::CommonEnumeratedLiteral& stru);
    4149             : 
    4150             : void serialized_size(const Encoding& encoding, size_t& size,
    4151             :   const XTypes::CommonStructMember& stru);
    4152             : bool operator<<(Serializer& strm, const XTypes::CommonStructMember& stru);
    4153             : bool operator>>(Serializer& strm, XTypes::CommonStructMember& stru);
    4154             : 
    4155             : void serialized_size(const Encoding& encoding, size_t& size,
    4156             :   const XTypes::CommonUnionMember& stru);
    4157             : bool operator<<(Serializer& strm, const XTypes::CommonUnionMember& stru);
    4158             : bool operator>>(Serializer& strm, XTypes::CommonUnionMember& stru);
    4159             : 
    4160             : void serialized_size(const Encoding& encoding, size_t& size,
    4161             :   const XTypes::CompleteElementDetail& stru);
    4162             : bool operator<<(Serializer& strm, const XTypes::CompleteElementDetail& stru);
    4163             : bool operator>>(Serializer& strm, XTypes::CompleteElementDetail& stru);
    4164             : 
    4165             : void serialized_size(const Encoding& encoding, size_t& size,
    4166             :   const XTypes::CompleteMemberDetail& stru);
    4167             : bool operator<<(Serializer& strm, const XTypes::CompleteMemberDetail& stru);
    4168             : bool operator>>(Serializer& strm, XTypes::CompleteMemberDetail& stru);
    4169             : 
    4170             : void serialized_size(const Encoding& encoding, size_t& size,
    4171             :   const XTypes::MinimalMemberDetail& stru);
    4172             : bool operator<<(Serializer& strm, const XTypes::MinimalMemberDetail& stru);
    4173             : bool operator>>(Serializer& strm, XTypes::MinimalMemberDetail& stru);
    4174             : 
    4175             : void serialized_size(const Encoding& encoding, size_t& size,
    4176             :   const XTypes::ExtendedTypeDefn& stru);
    4177             : bool operator<<(Serializer& strm, const XTypes::ExtendedTypeDefn& stru);
    4178             : bool operator>>(Serializer& strm, XTypes::ExtendedTypeDefn& stru);
    4179             : 
    4180             : void serialized_size(const Encoding& encoding, size_t& size,
    4181             :   const XTypes::PlainArrayLElemDefn& stru);
    4182             : bool operator<<(Serializer& strm, const XTypes::PlainArrayLElemDefn& stru);
    4183             : bool operator>>(Serializer& strm, XTypes::PlainArrayLElemDefn& stru);
    4184             : 
    4185             : void serialized_size(const Encoding& encoding, size_t& size,
    4186             :   const XTypes::PlainArraySElemDefn& stru);
    4187             : bool operator<<(Serializer& strm, const XTypes::PlainArraySElemDefn& stru);
    4188             : bool operator>>(Serializer& strm, XTypes::PlainArraySElemDefn& stru);
    4189             : 
    4190             : void serialized_size(const Encoding& encoding, size_t& size,
    4191             :   const XTypes::PlainMapLTypeDefn& stru);
    4192             : bool operator<<(Serializer& strm, const XTypes::PlainMapLTypeDefn& stru);
    4193             : bool operator>>(Serializer& strm, XTypes::PlainMapLTypeDefn& stru);
    4194             : 
    4195             : void serialized_size(const Encoding& encoding, size_t& size,
    4196             :   const XTypes::PlainMapSTypeDefn& stru);
    4197             : bool operator<<(Serializer& strm, const XTypes::PlainMapSTypeDefn& stru);
    4198             : bool operator>>(Serializer& strm, XTypes::PlainMapSTypeDefn& stru);
    4199             : 
    4200             : void serialized_size(const Encoding& encoding, size_t& size,
    4201             :   const XTypes::PlainSequenceLElemDefn& stru);
    4202             : bool operator<<(Serializer& strm, const XTypes::PlainSequenceLElemDefn& stru);
    4203             : bool operator>>(Serializer& strm, XTypes::PlainSequenceLElemDefn& stru);
    4204             : 
    4205             : void serialized_size(const Encoding& encoding, size_t& size,
    4206             :   const XTypes::PlainSequenceSElemDefn& stru);
    4207             : bool operator<<(Serializer& strm, const XTypes::PlainSequenceSElemDefn& stru);
    4208             : bool operator>>(Serializer& strm, XTypes::PlainSequenceSElemDefn& stru);
    4209             : 
    4210             : void serialized_size(const Encoding& encoding, size_t& size,
    4211             :   const XTypes::StringLTypeDefn& stru);
    4212             : bool operator<<(Serializer& strm, const XTypes::StringLTypeDefn& stru);
    4213             : bool operator>>(Serializer& strm, XTypes::StringLTypeDefn& stru);
    4214             : 
    4215             : void serialized_size(const Encoding& encoding, size_t& size,
    4216             :   const XTypes::StringSTypeDefn& stru);
    4217             : bool operator<<(Serializer& strm, const XTypes::StringSTypeDefn& stru);
    4218             : bool operator>>(Serializer& strm, XTypes::StringSTypeDefn& stru);
    4219             : 
    4220             : void serialized_size(const Encoding& encoding, size_t& size,
    4221             :   const XTypes::StronglyConnectedComponentId& stru);
    4222             : bool operator<<(Serializer& strm, const XTypes::StronglyConnectedComponentId& stru);
    4223             : bool operator>>(Serializer& strm, XTypes::StronglyConnectedComponentId& stru);
    4224             : 
    4225             : void serialized_size(const Encoding& encoding, size_t& size,
    4226             :   const XTypes::PlainCollectionHeader& stru);
    4227             : bool operator<<(Serializer& strm, const XTypes::PlainCollectionHeader& stru);
    4228             : bool operator>>(Serializer& strm, XTypes::PlainCollectionHeader& stru);
    4229             : 
    4230             : void serialized_size(const Encoding& encoding, size_t& size,
    4231             :   const XTypes::TypeObjectHashId& stru);
    4232             : bool operator<<(Serializer& strm, const XTypes::TypeObjectHashId& stru);
    4233             : bool operator>>(Serializer& strm, XTypes::TypeObjectHashId& stru);
    4234             : 
    4235             : OpenDDS_Dcps_Export
    4236             : void serialized_size(const Encoding& encoding, size_t& size,
    4237             :   const XTypes::TypeIdentifierTypeObjectPair& stru);
    4238             : OpenDDS_Dcps_Export
    4239             : void serialized_size(const Encoding& encoding, size_t& size,
    4240             :   const NestedKeyOnly<const XTypes::TypeIdentifierTypeObjectPair>& stru);
    4241             : OpenDDS_Dcps_Export
    4242             : bool operator<<(Serializer& strm, const XTypes::TypeIdentifierTypeObjectPair& stru);
    4243             : OpenDDS_Dcps_Export
    4244             : bool operator<<(Serializer& ser, const NestedKeyOnly<const XTypes::TypeIdentifierTypeObjectPair>& stru);
    4245             : OpenDDS_Dcps_Export
    4246             : bool operator>>(Serializer& strm, XTypes::TypeIdentifierTypeObjectPair& stru);
    4247             : OpenDDS_Dcps_Export
    4248             : bool operator>>(Serializer& ser, NestedKeyOnly<XTypes::TypeIdentifierTypeObjectPair>& stru);
    4249             : 
    4250             : OpenDDS_Dcps_Export
    4251             : void serialized_size(const Encoding& encoding, size_t& size,
    4252             :   const XTypes::TypeIdentifierPair& stru);
    4253             : OpenDDS_Dcps_Export
    4254             : void serialized_size(const Encoding& encoding, size_t& size,
    4255             :   const NestedKeyOnly<const XTypes::TypeIdentifierPair>& stru);
    4256             : OpenDDS_Dcps_Export
    4257             : bool operator<<(Serializer& strm, const XTypes::TypeIdentifierPair& stru);
    4258             : OpenDDS_Dcps_Export
    4259             : bool operator<<(Serializer& ser, const NestedKeyOnly<const XTypes::TypeIdentifierPair>& stru);
    4260             : OpenDDS_Dcps_Export
    4261             : bool operator>>(Serializer& strm, XTypes::TypeIdentifierPair& stru);
    4262             : OpenDDS_Dcps_Export
    4263             : bool operator>>(Serializer& ser, NestedKeyOnly<XTypes::TypeIdentifierPair>& stru);
    4264             : 
    4265             : OpenDDS_Dcps_Export
    4266             : bool to_type_object(const unsigned char* buffer, size_t size, XTypes::TypeObject& to);
    4267             : 
    4268             : } // namespace DCPS
    4269             : } // namespace OpenDDS
    4270             : 
    4271             : OPENDDS_END_VERSIONED_NAMESPACE_DECL
    4272             : 
    4273             : #endif  /* OPENDDS_DCPS_XTYPES_TYPE_OBJECT_H */

Generated by: LCOV version 1.16