| 1 | /****************************************************************************** |
| 2 | * Copyright (c) 2000-2016 Ericsson Telecom AB |
| 3 | * All rights reserved. This program and the accompanying materials |
| 4 | * are made available under the terms of the Eclipse Public License v1.0 |
| 5 | * which accompanies this distribution, and is available at |
| 6 | * http://www.eclipse.org/legal/epl-v10.html |
| 7 | * |
| 8 | * Contributors: |
| 9 | * Balasko, Jeno |
| 10 | * Baranyi, Botond |
| 11 | * Beres, Szabolcs |
| 12 | * Delic, Adam |
| 13 | * Forstner, Matyas |
| 14 | * Raduly, Csaba |
| 15 | * Szabados, Kristof |
| 16 | * Szabo, Bence Janos |
| 17 | * Szabo, Janos Zoltan – initial implementation |
| 18 | * |
| 19 | ******************************************************************************/ |
| 20 | #ifndef ASN_CharacterString_HH |
| 21 | #define ASN_CharacterString_HH |
| 22 | |
| 23 | #include "Types.h" |
| 24 | #include "Basetype.hh" |
| 25 | #include "Template.hh" |
| 26 | |
| 27 | #include "ASN_Null.hh" |
| 28 | #include "Integer.hh" |
| 29 | #include "Objid.hh" |
| 30 | #include "Charstring.hh" |
| 31 | #include "Universal_charstring.hh" |
| 32 | #include "Octetstring.hh" |
| 33 | |
| 34 | class CHARACTER_STRING_identification; |
| 35 | class CHARACTER_STRING_identification_template; |
| 36 | class CHARACTER_STRING_identification_syntaxes; |
| 37 | class CHARACTER_STRING_identification_syntaxes_template; |
| 38 | class CHARACTER_STRING_identification_context__negotiation; |
| 39 | class CHARACTER_STRING_identification_context__negotiation_template; |
| 40 | class CHARACTER_STRING; |
| 41 | class CHARACTER_STRING_template; |
| 42 | |
| 43 | class Module_Param; |
| 44 | |
| 45 | class CHARACTER_STRING_identification : public Base_Type { |
| 46 | public: |
| 47 | enum union_selection_type { UNBOUND_VALUE = 0, ALT_syntaxes = 1, ALT_syntax = 2, ALT_presentation__context__id = 3, ALT_context__negotiation = 4, ALT_transfer__syntax = 5, ALT_fixed = 6 }; |
| 48 | private: |
| 49 | union_selection_type union_selection; |
| 50 | union { |
| 51 | CHARACTER_STRING_identification_syntaxes *field_syntaxes; |
| 52 | OBJID *field_syntax; |
| 53 | INTEGER *field_presentation__context__id; |
| 54 | CHARACTER_STRING_identification_context__negotiation *field_context__negotiation; |
| 55 | OBJID *field_transfer__syntax; |
| 56 | ASN_NULL *field_fixed; |
| 57 | }; |
| 58 | void copy_value(const CHARACTER_STRING_identification& other_value); |
| 59 | |
| 60 | public: |
| 61 | CHARACTER_STRING_identification(); |
| 62 | CHARACTER_STRING_identification(const CHARACTER_STRING_identification& other_value); |
| 63 | ~CHARACTER_STRING_identification(); |
| 64 | CHARACTER_STRING_identification& operator=(const CHARACTER_STRING_identification& other_value); |
| 65 | boolean operator==(const CHARACTER_STRING_identification& other_value) const; |
| 66 | inline boolean operator!=(const CHARACTER_STRING_identification& other_value) const { return !(*this == other_value); } |
| 67 | CHARACTER_STRING_identification_syntaxes& syntaxes(); |
| 68 | const CHARACTER_STRING_identification_syntaxes& syntaxes() const; |
| 69 | OBJID& syntax(); |
| 70 | const OBJID& syntax() const; |
| 71 | INTEGER& presentation__context__id(); |
| 72 | const INTEGER& presentation__context__id() const; |
| 73 | CHARACTER_STRING_identification_context__negotiation& context__negotiation(); |
| 74 | const CHARACTER_STRING_identification_context__negotiation& context__negotiation() const; |
| 75 | OBJID& transfer__syntax(); |
| 76 | const OBJID& transfer__syntax() const; |
| 77 | ASN_NULL& fixed(); |
| 78 | const ASN_NULL& fixed() const; |
| 79 | inline union_selection_type get_selection() const { return union_selection; } |
| 80 | boolean ischosen(union_selection_type checked_selection) const; |
| 81 | boolean is_bound() const; |
| 82 | boolean is_value() const; |
| 83 | void clean_up(); |
| 84 | void log() const; |
| 85 | #ifdef TITAN_RUNTIME_2 |
| 86 | boolean is_equal(const Base_Type* other_value) const { return *this == *(static_cast<const CHARACTER_STRING_identification*>(other_value)); } |
| 87 | void set_value(const Base_Type* other_value) { *this = *(static_cast<const CHARACTER_STRING_identification*>(other_value)); } |
| 88 | Base_Type* clone() const { return new CHARACTER_STRING_identification(*this); } |
| 89 | const TTCN_Typedescriptor_t* get_descriptor() const { return &CHARACTER_STRING_descr_; } |
| 90 | #else |
| 91 | inline boolean is_present() const { return is_bound(); } |
| 92 | #endif |
| 93 | void set_param(Module_Param& param); |
| 94 | Module_Param* get_param(Module_Param_Name& param_name) const; |
| 95 | void encode_text(Text_Buf& text_buf) const; |
| 96 | void decode_text(Text_Buf& text_buf); |
| 97 | //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const; |
| 98 | //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...); |
| 99 | ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const; |
| 100 | boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form); |
| 101 | int XER_encode(const XERdescriptor_t& p_td, |
| 102 | TTCN_Buffer& p_buf, unsigned int flavor, int indent, embed_values_enc_struct_t*) const; |
| 103 | int XER_decode(const XERdescriptor_t& p_td, |
| 104 | XmlReaderWrap& reader, unsigned int flavor, unsigned int flavor2, embed_values_dec_struct_t*); |
| 105 | private: |
| 106 | boolean BER_decode_set_selection(const ASN_BER_TLV_t& p_tlv); |
| 107 | public: |
| 108 | boolean BER_decode_isMyMsg(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv); |
| 109 | }; |
| 110 | |
| 111 | class CHARACTER_STRING_identification_template : public Base_Template { |
| 112 | union { |
| 113 | struct { |
| 114 | CHARACTER_STRING_identification::union_selection_type union_selection; |
| 115 | union { |
| 116 | CHARACTER_STRING_identification_syntaxes_template *field_syntaxes; |
| 117 | OBJID_template *field_syntax; |
| 118 | INTEGER_template *field_presentation__context__id; |
| 119 | CHARACTER_STRING_identification_context__negotiation_template *field_context__negotiation; |
| 120 | OBJID_template *field_transfer__syntax; |
| 121 | ASN_NULL_template *field_fixed; |
| 122 | }; |
| 123 | } single_value; |
| 124 | struct { |
| 125 | unsigned int n_values; |
| 126 | CHARACTER_STRING_identification_template *list_value; |
| 127 | } value_list; |
| 128 | }; |
| 129 | |
| 130 | void copy_value(const CHARACTER_STRING_identification& other_value); |
| 131 | |
| 132 | void copy_template(const CHARACTER_STRING_identification_template& other_value); |
| 133 | |
| 134 | public: |
| 135 | CHARACTER_STRING_identification_template(); |
| 136 | CHARACTER_STRING_identification_template(template_sel other_value); |
| 137 | CHARACTER_STRING_identification_template(const CHARACTER_STRING_identification& other_value); |
| 138 | CHARACTER_STRING_identification_template(const OPTIONAL<CHARACTER_STRING_identification>& other_value); |
| 139 | CHARACTER_STRING_identification_template(const CHARACTER_STRING_identification_template& other_value); |
| 140 | ~CHARACTER_STRING_identification_template(); |
| 141 | void clean_up(); |
| 142 | CHARACTER_STRING_identification_template& operator=(template_sel other_value); |
| 143 | CHARACTER_STRING_identification_template& operator=(const CHARACTER_STRING_identification& other_value); |
| 144 | CHARACTER_STRING_identification_template& operator=(const OPTIONAL<CHARACTER_STRING_identification>& other_value); |
| 145 | CHARACTER_STRING_identification_template& operator=(const CHARACTER_STRING_identification_template& other_value); |
| 146 | boolean match(const CHARACTER_STRING_identification& other_value, boolean legacy = FALSE) const; |
| 147 | CHARACTER_STRING_identification valueof() const; |
| 148 | CHARACTER_STRING_identification_template& list_item(unsigned int list_index) const; |
| 149 | void set_type(template_sel template_type, unsigned int list_length); |
| 150 | CHARACTER_STRING_identification_syntaxes_template& syntaxes(); |
| 151 | const CHARACTER_STRING_identification_syntaxes_template& syntaxes() const; |
| 152 | OBJID_template& syntax(); |
| 153 | const OBJID_template& syntax() const; |
| 154 | INTEGER_template& presentation__context__id(); |
| 155 | const INTEGER_template& presentation__context__id() const; |
| 156 | CHARACTER_STRING_identification_context__negotiation_template& context__negotiation(); |
| 157 | const CHARACTER_STRING_identification_context__negotiation_template& context__negotiation() const; |
| 158 | OBJID_template& transfer__syntax(); |
| 159 | const OBJID_template& transfer__syntax() const; |
| 160 | ASN_NULL_template& fixed(); |
| 161 | const ASN_NULL_template& fixed() const; |
| 162 | boolean ischosen(CHARACTER_STRING_identification::union_selection_type checked_selection) const; |
| 163 | void log() const; |
| 164 | void log_match(const CHARACTER_STRING_identification& match_value, boolean legacy = FALSE) const; |
| 165 | void encode_text(Text_Buf& text_buf) const; |
| 166 | void decode_text(Text_Buf& text_buf); |
| 167 | |
| 168 | boolean is_present(boolean legacy = FALSE) const; |
| 169 | boolean match_omit(boolean legacy = FALSE) const; |
| 170 | void set_param(Module_Param& param); |
| 171 | Module_Param* get_param(Module_Param_Name& param_name) const; |
| 172 | #ifdef TITAN_RUNTIME_2 |
| 173 | void valueofv(Base_Type* value) const { *(static_cast<CHARACTER_STRING_identification*>(value)) = valueof(); } |
| 174 | void set_value(template_sel other_value) { *this = other_value; } |
| 175 | void copy_value(const Base_Type* other_value) { *this = *(static_cast<const CHARACTER_STRING_identification*>(other_value)); } |
| 176 | Base_Template* clone() const { return new CHARACTER_STRING_identification_template(*this); } |
| 177 | const TTCN_Typedescriptor_t* get_descriptor() const { return &CHARACTER_STRING_descr_; } |
| 178 | boolean matchv(const Base_Type* other_value, boolean legacy) const { return match(*(static_cast<const CHARACTER_STRING_identification*>(other_value)), legacy); } |
| 179 | void log_matchv(const Base_Type* match_value, boolean legacy) const { log_match(*(static_cast<const CHARACTER_STRING_identification*>(match_value)), legacy); } |
| 180 | #else |
| 181 | void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const; |
| 182 | #endif |
| 183 | }; |
| 184 | |
| 185 | class CHARACTER_STRING_identification_syntaxes : public Base_Type { |
| 186 | OBJID field_abstract; |
| 187 | OBJID field_transfer; |
| 188 | public: |
| 189 | CHARACTER_STRING_identification_syntaxes(); |
| 190 | CHARACTER_STRING_identification_syntaxes(const OBJID& par_abstract, |
| 191 | const OBJID& par_transfer); |
| 192 | boolean operator==(const CHARACTER_STRING_identification_syntaxes& other_value) const; |
| 193 | inline boolean operator!=(const CHARACTER_STRING_identification_syntaxes& other_value) const |
| 194 | { return !(*this == other_value); } |
| 195 | |
| 196 | inline OBJID& abstract() |
| 197 | {return field_abstract;} |
| 198 | inline const OBJID& abstract() const |
| 199 | {return field_abstract;} |
| 200 | inline OBJID& transfer() |
| 201 | {return field_transfer;} |
| 202 | inline const OBJID& transfer() const |
| 203 | {return field_transfer;} |
| 204 | int size_of() const; |
| 205 | void log() const; |
| 206 | #ifdef TITAN_RUNTIME_2 |
| 207 | boolean is_equal(const Base_Type* other_value) const { return *this == *(static_cast<const CHARACTER_STRING_identification_syntaxes*>(other_value)); } |
| 208 | void set_value(const Base_Type* other_value) { *this = *(static_cast<const CHARACTER_STRING_identification_syntaxes*>(other_value)); } |
| 209 | Base_Type* clone() const { return new CHARACTER_STRING_identification_syntaxes(*this); } |
| 210 | const TTCN_Typedescriptor_t* get_descriptor() const { return &CHARACTER_STRING_descr_; } |
| 211 | #else |
| 212 | inline boolean is_present() const { return is_bound(); } |
| 213 | #endif |
| 214 | boolean is_bound() const; |
| 215 | boolean is_value() const; |
| 216 | void clean_up(); |
| 217 | void set_param(Module_Param& param); |
| 218 | Module_Param* get_param(Module_Param_Name& param_name) const; |
| 219 | void encode_text(Text_Buf& text_buf) const; |
| 220 | void decode_text(Text_Buf& text_buf); |
| 221 | //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const; |
| 222 | //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...); |
| 223 | ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const; |
| 224 | boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form); |
| 225 | int XER_encode(const XERdescriptor_t& p_td, |
| 226 | TTCN_Buffer& p_buf, unsigned int flavor, int indent, embed_values_enc_struct_t*) const; |
| 227 | int XER_decode(const XERdescriptor_t& p_td, |
| 228 | XmlReaderWrap& reader, unsigned int flavor, unsigned int flavor2, embed_values_dec_struct_t*); |
| 229 | }; |
| 230 | |
| 231 | class CHARACTER_STRING_identification_syntaxes_template : public Base_Template { |
| 232 | #ifdef __SUNPRO_CC |
| 233 | public: |
| 234 | #endif |
| 235 | struct single_value_struct; |
| 236 | #ifdef __SUNPRO_CC |
| 237 | private: |
| 238 | #endif |
| 239 | union { |
| 240 | single_value_struct *single_value; |
| 241 | struct { |
| 242 | unsigned int n_values; |
| 243 | CHARACTER_STRING_identification_syntaxes_template *list_value; |
| 244 | } value_list; |
| 245 | }; |
| 246 | |
| 247 | void set_specific(); |
| 248 | void copy_value(const CHARACTER_STRING_identification_syntaxes& other_value); |
| 249 | void copy_template(const CHARACTER_STRING_identification_syntaxes_template& other_value); |
| 250 | |
| 251 | public: |
| 252 | CHARACTER_STRING_identification_syntaxes_template(); |
| 253 | CHARACTER_STRING_identification_syntaxes_template(template_sel other_value); |
| 254 | CHARACTER_STRING_identification_syntaxes_template(const CHARACTER_STRING_identification_syntaxes& other_value); |
| 255 | CHARACTER_STRING_identification_syntaxes_template(const OPTIONAL<CHARACTER_STRING_identification_syntaxes>& other_value); |
| 256 | CHARACTER_STRING_identification_syntaxes_template(const CHARACTER_STRING_identification_syntaxes_template& other_value); |
| 257 | ~CHARACTER_STRING_identification_syntaxes_template(); |
| 258 | void clean_up(); |
| 259 | CHARACTER_STRING_identification_syntaxes_template& operator=(template_sel other_value); |
| 260 | CHARACTER_STRING_identification_syntaxes_template& operator=(const CHARACTER_STRING_identification_syntaxes& other_value); |
| 261 | CHARACTER_STRING_identification_syntaxes_template& operator=(const OPTIONAL<CHARACTER_STRING_identification_syntaxes>& other_value); |
| 262 | CHARACTER_STRING_identification_syntaxes_template& operator=(const CHARACTER_STRING_identification_syntaxes_template& other_value); |
| 263 | boolean match(const CHARACTER_STRING_identification_syntaxes& other_value, boolean legacy = FALSE) const; |
| 264 | CHARACTER_STRING_identification_syntaxes valueof() const; |
| 265 | void set_type(template_sel template_type, unsigned int list_length); |
| 266 | CHARACTER_STRING_identification_syntaxes_template& list_item(unsigned int list_index) const; |
| 267 | OBJID_template& abstract(); |
| 268 | const OBJID_template& abstract() const; |
| 269 | OBJID_template& transfer(); |
| 270 | const OBJID_template& transfer() const; |
| 271 | int size_of() const; |
| 272 | void log() const; |
| 273 | void log_match(const CHARACTER_STRING_identification_syntaxes& match_value, boolean legacy = FALSE) const; |
| 274 | void encode_text(Text_Buf& text_buf) const; |
| 275 | void decode_text(Text_Buf& text_buf); |
| 276 | |
| 277 | boolean is_present(boolean legacy = FALSE) const; |
| 278 | boolean match_omit(boolean legacy = FALSE) const; |
| 279 | void set_param(Module_Param& param); |
| 280 | Module_Param* get_param(Module_Param_Name& param_name) const; |
| 281 | #ifdef TITAN_RUNTIME_2 |
| 282 | void valueofv(Base_Type* value) const { *(static_cast<CHARACTER_STRING_identification_syntaxes*>(value)) = valueof(); } |
| 283 | void set_value(template_sel other_value) { *this = other_value; } |
| 284 | void copy_value(const Base_Type* other_value) { *this = *(static_cast<const CHARACTER_STRING_identification_syntaxes*>(other_value)); } |
| 285 | Base_Template* clone() const { return new CHARACTER_STRING_identification_syntaxes_template(*this); } |
| 286 | const TTCN_Typedescriptor_t* get_descriptor() const { return &CHARACTER_STRING_descr_; } |
| 287 | boolean matchv(const Base_Type* other_value, boolean legacy) const { return match(*(static_cast<const CHARACTER_STRING_identification_syntaxes*>(other_value)), legacy); } |
| 288 | void log_matchv(const Base_Type* match_value, boolean legacy) const { log_match(*(static_cast<const CHARACTER_STRING_identification_syntaxes*>(match_value)), legacy); } |
| 289 | #else |
| 290 | void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const; |
| 291 | #endif |
| 292 | }; |
| 293 | |
| 294 | class CHARACTER_STRING_identification_context__negotiation : public Base_Type { |
| 295 | INTEGER field_presentation__context__id; |
| 296 | OBJID field_transfer__syntax; |
| 297 | public: |
| 298 | CHARACTER_STRING_identification_context__negotiation(); |
| 299 | CHARACTER_STRING_identification_context__negotiation(const INTEGER& par_presentation__context__id, |
| 300 | const OBJID& par_transfer__syntax); |
| 301 | boolean operator==(const CHARACTER_STRING_identification_context__negotiation& other_value) const; |
| 302 | inline boolean operator!=(const CHARACTER_STRING_identification_context__negotiation& other_value) const |
| 303 | { return !(*this == other_value); } |
| 304 | |
| 305 | inline INTEGER& presentation__context__id() |
| 306 | {return field_presentation__context__id;} |
| 307 | inline const INTEGER& presentation__context__id() const |
| 308 | {return field_presentation__context__id;} |
| 309 | inline OBJID& transfer__syntax() |
| 310 | {return field_transfer__syntax;} |
| 311 | inline const OBJID& transfer__syntax() const |
| 312 | {return field_transfer__syntax;} |
| 313 | int size_of() const; |
| 314 | void log() const; |
| 315 | boolean is_bound() const; |
| 316 | boolean is_value() const; |
| 317 | void clean_up(); |
| 318 | #ifdef TITAN_RUNTIME_2 |
| 319 | boolean is_equal(const Base_Type* other_value) const { return *this == *(static_cast<const CHARACTER_STRING_identification_context__negotiation*>(other_value)); } |
| 320 | void set_value(const Base_Type* other_value) { *this = *(static_cast<const CHARACTER_STRING_identification_context__negotiation*>(other_value)); } |
| 321 | Base_Type* clone() const { return new CHARACTER_STRING_identification_context__negotiation(*this); } |
| 322 | const TTCN_Typedescriptor_t* get_descriptor() const { return &CHARACTER_STRING_descr_; } |
| 323 | #else |
| 324 | inline boolean is_present() const { return is_bound(); } |
| 325 | #endif |
| 326 | void set_param(Module_Param& param); |
| 327 | Module_Param* get_param(Module_Param_Name& param_name) const; |
| 328 | void encode_text(Text_Buf& text_buf) const; |
| 329 | void decode_text(Text_Buf& text_buf); |
| 330 | //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const; |
| 331 | //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...); |
| 332 | ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const; |
| 333 | boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form); |
| 334 | int XER_encode(const XERdescriptor_t& p_td, |
| 335 | TTCN_Buffer& p_buf, unsigned int flavor, int indent, embed_values_enc_struct_t*) const; |
| 336 | int XER_decode(const XERdescriptor_t& p_td, |
| 337 | XmlReaderWrap& reader, unsigned int flavor, unsigned int flavor2, embed_values_dec_struct_t*); |
| 338 | }; |
| 339 | |
| 340 | class CHARACTER_STRING_identification_context__negotiation_template : public Base_Template { |
| 341 | #ifdef __SUNPRO_CC |
| 342 | public: |
| 343 | #endif |
| 344 | struct single_value_struct; |
| 345 | #ifdef __SUNPRO_CC |
| 346 | private: |
| 347 | #endif |
| 348 | union { |
| 349 | single_value_struct *single_value; |
| 350 | struct { |
| 351 | unsigned int n_values; |
| 352 | CHARACTER_STRING_identification_context__negotiation_template *list_value; |
| 353 | } value_list; |
| 354 | }; |
| 355 | |
| 356 | void set_specific(); |
| 357 | void copy_value(const CHARACTER_STRING_identification_context__negotiation& other_value); |
| 358 | void copy_template(const CHARACTER_STRING_identification_context__negotiation_template& other_value); |
| 359 | |
| 360 | public: |
| 361 | CHARACTER_STRING_identification_context__negotiation_template(); |
| 362 | CHARACTER_STRING_identification_context__negotiation_template(template_sel other_value); |
| 363 | CHARACTER_STRING_identification_context__negotiation_template(const CHARACTER_STRING_identification_context__negotiation& other_value); |
| 364 | CHARACTER_STRING_identification_context__negotiation_template(const OPTIONAL<CHARACTER_STRING_identification_context__negotiation>& other_value); |
| 365 | CHARACTER_STRING_identification_context__negotiation_template(const CHARACTER_STRING_identification_context__negotiation_template& other_value); |
| 366 | ~CHARACTER_STRING_identification_context__negotiation_template(); |
| 367 | void clean_up(); |
| 368 | CHARACTER_STRING_identification_context__negotiation_template& operator=(template_sel other_value); |
| 369 | CHARACTER_STRING_identification_context__negotiation_template& operator=(const CHARACTER_STRING_identification_context__negotiation& other_value); |
| 370 | CHARACTER_STRING_identification_context__negotiation_template& operator=(const OPTIONAL<CHARACTER_STRING_identification_context__negotiation>& other_value); |
| 371 | CHARACTER_STRING_identification_context__negotiation_template& operator=(const CHARACTER_STRING_identification_context__negotiation_template& other_value); |
| 372 | boolean match(const CHARACTER_STRING_identification_context__negotiation& other_value, boolean legacy = FALSE) const; |
| 373 | CHARACTER_STRING_identification_context__negotiation valueof() const; |
| 374 | void set_type(template_sel template_type, unsigned int list_length); |
| 375 | CHARACTER_STRING_identification_context__negotiation_template& list_item(unsigned int list_index) const; |
| 376 | INTEGER_template& presentation__context__id(); |
| 377 | const INTEGER_template& presentation__context__id() const; |
| 378 | OBJID_template& transfer__syntax(); |
| 379 | const OBJID_template& transfer__syntax() const; |
| 380 | int size_of() const; |
| 381 | void log() const; |
| 382 | void log_match(const CHARACTER_STRING_identification_context__negotiation& match_value, boolean legacy = FALSE) const; |
| 383 | void encode_text(Text_Buf& text_buf) const; |
| 384 | void decode_text(Text_Buf& text_buf); |
| 385 | |
| 386 | boolean is_present(boolean legacy = FALSE) const; |
| 387 | boolean match_omit(boolean legacy = FALSE) const; |
| 388 | void set_param(Module_Param& param); |
| 389 | Module_Param* get_param(Module_Param_Name& param_name) const; |
| 390 | #ifdef TITAN_RUNTIME_2 |
| 391 | void valueofv(Base_Type* value) const { *(static_cast<CHARACTER_STRING_identification_context__negotiation*>(value)) = valueof(); } |
| 392 | void set_value(template_sel other_value) { *this = other_value; } |
| 393 | void copy_value(const Base_Type* other_value) { *this = *(static_cast<const CHARACTER_STRING_identification_context__negotiation*>(other_value)); } |
| 394 | Base_Template* clone() const { return new CHARACTER_STRING_identification_context__negotiation_template(*this); } |
| 395 | const TTCN_Typedescriptor_t* get_descriptor() const { return &CHARACTER_STRING_descr_; } |
| 396 | boolean matchv(const Base_Type* other_value, boolean legacy) const { return match(*(static_cast<const CHARACTER_STRING_identification_context__negotiation*>(other_value)), legacy); } |
| 397 | void log_matchv(const Base_Type* match_value, boolean legacy) const { log_match(*(static_cast<const CHARACTER_STRING_identification_context__negotiation*>(match_value)), legacy); } |
| 398 | #else |
| 399 | void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const; |
| 400 | #endif |
| 401 | }; |
| 402 | |
| 403 | /** Runtime class for ASN.1 unrestricted <tt>CHARACTER STRING</tt> type |
| 404 | * |
| 405 | */ |
| 406 | class CHARACTER_STRING : public Base_Type { |
| 407 | CHARACTER_STRING_identification field_identification; |
| 408 | OPTIONAL<UNIVERSAL_CHARSTRING> field_data__value__descriptor; |
| 409 | OCTETSTRING field_string__value; |
| 410 | public: |
| 411 | CHARACTER_STRING(); |
| 412 | CHARACTER_STRING(const CHARACTER_STRING_identification& par_identification, |
| 413 | const OPTIONAL<UNIVERSAL_CHARSTRING>& par_data__value__descriptor, |
| 414 | const OCTETSTRING& par_string__value); |
| 415 | boolean operator==(const CHARACTER_STRING& other_value) const; |
| 416 | inline boolean operator!=(const CHARACTER_STRING& other_value) const |
| 417 | { return !(*this == other_value); } |
| 418 | |
| 419 | inline CHARACTER_STRING_identification& identification() |
| 420 | {return field_identification;} |
| 421 | inline const CHARACTER_STRING_identification& identification() const |
| 422 | {return field_identification;} |
| 423 | inline OPTIONAL<UNIVERSAL_CHARSTRING>& data__value__descriptor() |
| 424 | {return field_data__value__descriptor;} |
| 425 | inline const OPTIONAL<UNIVERSAL_CHARSTRING>& data__value__descriptor() const |
| 426 | {return field_data__value__descriptor;} |
| 427 | inline OCTETSTRING& string__value() |
| 428 | {return field_string__value;} |
| 429 | inline const OCTETSTRING& string__value() const |
| 430 | {return field_string__value;} |
| 431 | boolean is_bound() const; |
| 432 | boolean is_value() const; |
| 433 | void clean_up(); |
| 434 | int size_of() const; |
| 435 | void log() const; |
| 436 | #ifdef TITAN_RUNTIME_2 |
| 437 | boolean is_equal(const Base_Type* other_value) const { return *this == *(static_cast<const CHARACTER_STRING*>(other_value)); } |
| 438 | void set_value(const Base_Type* other_value) { *this = *(static_cast<const CHARACTER_STRING*>(other_value)); } |
| 439 | Base_Type* clone() const { return new CHARACTER_STRING(*this); } |
| 440 | const TTCN_Typedescriptor_t* get_descriptor() const { return &CHARACTER_STRING_descr_; } |
| 441 | #else |
| 442 | inline boolean is_present() const { return is_bound(); } |
| 443 | #endif |
| 444 | void set_param(Module_Param& param); |
| 445 | Module_Param* get_param(Module_Param_Name& param_name) const; |
| 446 | void encode_text(Text_Buf& text_buf) const; |
| 447 | void decode_text(Text_Buf& text_buf); |
| 448 | void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const; |
| 449 | void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...); |
| 450 | ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const; |
| 451 | boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form); |
| 452 | int XER_encode(const XERdescriptor_t&, TTCN_Buffer&, unsigned int, int, embed_values_enc_struct_t*) const; |
| 453 | int XER_decode(const XERdescriptor_t&, XmlReaderWrap& reader, unsigned int, unsigned int, embed_values_dec_struct_t*); |
| 454 | }; |
| 455 | |
| 456 | class CHARACTER_STRING_template : public Base_Template { |
| 457 | #ifdef __SUNPRO_CC |
| 458 | public: |
| 459 | #endif |
| 460 | struct single_value_struct; |
| 461 | #ifdef __SUNPRO_CC |
| 462 | private: |
| 463 | #endif |
| 464 | union { |
| 465 | single_value_struct *single_value; |
| 466 | struct { |
| 467 | unsigned int n_values; |
| 468 | CHARACTER_STRING_template *list_value; |
| 469 | } value_list; |
| 470 | }; |
| 471 | |
| 472 | void set_specific(); |
| 473 | void copy_value(const CHARACTER_STRING& other_value); |
| 474 | void copy_template(const CHARACTER_STRING_template& other_value); |
| 475 | |
| 476 | public: |
| 477 | CHARACTER_STRING_template(); |
| 478 | CHARACTER_STRING_template(template_sel other_value); |
| 479 | CHARACTER_STRING_template(const CHARACTER_STRING& other_value); |
| 480 | CHARACTER_STRING_template(const OPTIONAL<CHARACTER_STRING>& other_value); |
| 481 | CHARACTER_STRING_template(const CHARACTER_STRING_template& other_value); |
| 482 | ~CHARACTER_STRING_template(); |
| 483 | void clean_up(); |
| 484 | CHARACTER_STRING_template& operator=(template_sel other_value); |
| 485 | CHARACTER_STRING_template& operator=(const CHARACTER_STRING& other_value); |
| 486 | CHARACTER_STRING_template& operator=(const OPTIONAL<CHARACTER_STRING>& other_value); |
| 487 | CHARACTER_STRING_template& operator=(const CHARACTER_STRING_template& other_value); |
| 488 | boolean match(const CHARACTER_STRING& other_value, boolean legacy = FALSE) const; |
| 489 | CHARACTER_STRING valueof() const; |
| 490 | void set_type(template_sel template_type, unsigned int list_length); |
| 491 | CHARACTER_STRING_template& list_item(unsigned int list_index) const; |
| 492 | CHARACTER_STRING_identification_template& identification(); |
| 493 | const CHARACTER_STRING_identification_template& identification() const; |
| 494 | UNIVERSAL_CHARSTRING_template& data__value__descriptor(); |
| 495 | const UNIVERSAL_CHARSTRING_template& data__value__descriptor() const; |
| 496 | OCTETSTRING_template& string__value(); |
| 497 | const OCTETSTRING_template& string__value() const; |
| 498 | int size_of() const; |
| 499 | void log() const; |
| 500 | void log_match(const CHARACTER_STRING& match_value, boolean legacy = FALSE) const; |
| 501 | void encode_text(Text_Buf& text_buf) const; |
| 502 | void decode_text(Text_Buf& text_buf); |
| 503 | |
| 504 | boolean is_present(boolean legacy = FALSE) const; |
| 505 | boolean match_omit(boolean legacy = FALSE) const; |
| 506 | void set_param(Module_Param& param); |
| 507 | Module_Param* get_param(Module_Param_Name& param_name) const; |
| 508 | #ifdef TITAN_RUNTIME_2 |
| 509 | void valueofv(Base_Type* value) const { *(static_cast<CHARACTER_STRING*>(value)) = valueof(); } |
| 510 | void set_value(template_sel other_value) { *this = other_value; } |
| 511 | void copy_value(const Base_Type* other_value) { *this = *(static_cast<const CHARACTER_STRING*>(other_value)); } |
| 512 | Base_Template* clone() const { return new CHARACTER_STRING_template(*this); } |
| 513 | const TTCN_Typedescriptor_t* get_descriptor() const { return &CHARACTER_STRING_descr_; } |
| 514 | boolean matchv(const Base_Type* other_value, boolean legacy) const { return match(*(static_cast<const CHARACTER_STRING*>(other_value)), legacy); } |
| 515 | void log_matchv(const Base_Type* match_value, boolean legacy) const { log_match(*(static_cast<const CHARACTER_STRING*>(match_value)), legacy); } |
| 516 | #else |
| 517 | void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const; |
| 518 | #endif |
| 519 | }; |
| 520 | |
| 521 | #endif // ASN_CharacterString_HH |