| 151 | const TypeIdentifier TypeIdentifier::None; |
| 152 | |
| 153 | void TypeIdentifier::activate(const TypeIdentifier* other) |
| 154 | { |
| 155 | #define OPENDDS_BRANCH_ACTIVATE(T, N) \ |
| 156 | active_ = new(N ## _) T(); \ |
| 157 | if (other) N() = other->N(); \ |
| 158 | break |
| 159 | |
| 160 | switch (kind_) { |
| 161 | case TI_STRING8_SMALL: |
| 162 | case TI_STRING16_SMALL: |
| 163 | OPENDDS_BRANCH_ACTIVATE(StringSTypeDefn, string_sdefn); |
| 164 | case TI_STRING8_LARGE: |
| 165 | case TI_STRING16_LARGE: |
| 166 | OPENDDS_BRANCH_ACTIVATE(StringLTypeDefn, string_ldefn); |
| 167 | case TI_PLAIN_SEQUENCE_SMALL: |
| 168 | OPENDDS_BRANCH_ACTIVATE(PlainSequenceSElemDefn, seq_sdefn); |
| 169 | case TI_PLAIN_SEQUENCE_LARGE: |
| 170 | OPENDDS_BRANCH_ACTIVATE(PlainSequenceLElemDefn, seq_ldefn); |
| 171 | case TI_PLAIN_ARRAY_SMALL: |
| 172 | OPENDDS_BRANCH_ACTIVATE(PlainArraySElemDefn, array_sdefn); |
| 173 | case TI_PLAIN_ARRAY_LARGE: |
| 174 | OPENDDS_BRANCH_ACTIVATE(PlainArrayLElemDefn, array_ldefn); |
| 175 | case TI_PLAIN_MAP_SMALL: |
| 176 | OPENDDS_BRANCH_ACTIVATE(PlainMapSTypeDefn, map_sdefn); |
| 177 | case TI_PLAIN_MAP_LARGE: |
| 178 | OPENDDS_BRANCH_ACTIVATE(PlainMapLTypeDefn, map_ldefn); |
| 179 | case TI_STRONGLY_CONNECTED_COMPONENT: |
| 180 | OPENDDS_BRANCH_ACTIVATE(StronglyConnectedComponentId, sc_component_id); |
| 181 | case EK_COMPLETE: |
| 182 | case EK_MINIMAL: |
| 183 | active_ = equivalence_hash_; |
| 184 | if (other) { |
| 185 | std::memcpy(equivalence_hash(), other->equivalence_hash(), sizeof(EquivalenceHash)); |
| 186 | } |
| 187 | break; |
| 188 | case TK_NONE: |
| 189 | case TK_BOOLEAN: |
| 190 | case TK_BYTE: |
| 191 | case TK_INT16: |
| 192 | case TK_INT32: |
| 193 | case TK_INT64: |
| 194 | case TK_UINT16: |
| 195 | case TK_UINT32: |
| 196 | case TK_UINT64: |
| 197 | case TK_FLOAT32: |
| 198 | case TK_FLOAT64: |
| 199 | case TK_FLOAT128: |
| 200 | case TK_INT8: |
| 201 | case TK_UINT8: |
| 202 | case TK_CHAR8: |
| 203 | case TK_CHAR16: |
| 204 | break; // no-op, no member selected |
| 205 | default: |
| 206 | OPENDDS_BRANCH_ACTIVATE(ExtendedTypeDefn, extended_defn); |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | TypeIdentifier::TypeIdentifier(const TypeIdentifier& other) |
no outgoing calls