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
17 * Szabo, Janos Zoltan – initial implementation
19 ******************************************************************************/
20 #ifndef ASN_CharacterString_HH
21 #define ASN_CharacterString_HH
24 #include "Basetype.hh"
25 #include "Template.hh"
27 #include "ASN_Null.hh"
30 #include "Charstring.hh"
31 #include "Universal_charstring.hh"
32 #include "Octetstring.hh"
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;
45 class CHARACTER_STRING_identification : public Base_Type {
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 };
49 union_selection_type union_selection;
51 CHARACTER_STRING_identification_syntaxes *field_syntaxes;
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;
58 void copy_value(const CHARACTER_STRING_identification& other_value);
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;
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;
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;
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_; }
91 inline boolean is_present() const { return is_bound(); }
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*);
106 boolean BER_decode_set_selection(const ASN_BER_TLV_t& p_tlv);
108 boolean BER_decode_isMyMsg(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv);
111 class CHARACTER_STRING_identification_template : public Base_Template {
114 CHARACTER_STRING_identification::union_selection_type union_selection;
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;
125 unsigned int n_values;
126 CHARACTER_STRING_identification_template *list_value;
130 void copy_value(const CHARACTER_STRING_identification& other_value);
132 void copy_template(const CHARACTER_STRING_identification_template& other_value);
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();
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;
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);
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); }
181 void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
185 class CHARACTER_STRING_identification_syntaxes : public Base_Type {
186 OBJID field_abstract;
187 OBJID field_transfer;
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); }
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;}
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_; }
212 inline boolean is_present() const { return is_bound(); }
214 boolean is_bound() const;
215 boolean is_value() const;
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*);
231 class CHARACTER_STRING_identification_syntaxes_template : public Base_Template {
235 struct single_value_struct;
240 single_value_struct *single_value;
242 unsigned int n_values;
243 CHARACTER_STRING_identification_syntaxes_template *list_value;
248 void copy_value(const CHARACTER_STRING_identification_syntaxes& other_value);
249 void copy_template(const CHARACTER_STRING_identification_syntaxes_template& other_value);
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();
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;
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);
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); }
290 void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
294 class CHARACTER_STRING_identification_context__negotiation : public Base_Type {
295 INTEGER field_presentation__context__id;
296 OBJID field_transfer__syntax;
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); }
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;}
315 boolean is_bound() const;
316 boolean is_value() const;
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_; }
324 inline boolean is_present() const { return is_bound(); }
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*);
340 class CHARACTER_STRING_identification_context__negotiation_template : public Base_Template {
344 struct single_value_struct;
349 single_value_struct *single_value;
351 unsigned int n_values;
352 CHARACTER_STRING_identification_context__negotiation_template *list_value;
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);
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();
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;
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);
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); }
399 void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
403 /** Runtime class for ASN.1 unrestricted <tt>CHARACTER STRING</tt> type
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;
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); }
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;
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_; }
442 inline boolean is_present() const { return is_bound(); }
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*);
456 class CHARACTER_STRING_template : public Base_Template {
460 struct single_value_struct;
465 single_value_struct *single_value;
467 unsigned int n_values;
468 CHARACTER_STRING_template *list_value;
473 void copy_value(const CHARACTER_STRING& other_value);
474 void copy_template(const CHARACTER_STRING_template& other_value);
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();
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;
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);
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); }
517 void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
521 #endif // ASN_CharacterString_HH