Last sync 2016.04.01
[deliverable/titan.core.git] / core / ASN_EmbeddedPDV.hh
CommitLineData
d44e3c4f 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 ******************************************************************************/
970ed795
EL
20#ifndef ASN_EmbeddedPDV_HH
21#define ASN_EmbeddedPDV_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
34class EMBEDDED_PDV_identification;
35class EMBEDDED_PDV_identification_template;
36class EMBEDDED_PDV_identification_syntaxes;
37class EMBEDDED_PDV_identification_syntaxes_template;
38class EMBEDDED_PDV_identification_context__negotiation;
39class EMBEDDED_PDV_identification_context__negotiation_template;
40class EMBEDDED_PDV;
41class EMBEDDED_PDV_template;
42
43class Module_Param;
44
45class EMBEDDED_PDV_identification : public Base_Type {
46public:
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 };
48private:
49 union_selection_type union_selection;
50 union {
51 EMBEDDED_PDV_identification_syntaxes *field_syntaxes;
52 OBJID *field_syntax;
53 INTEGER *field_presentation__context__id;
54 EMBEDDED_PDV_identification_context__negotiation *field_context__negotiation;
55 OBJID *field_transfer__syntax;
56 ASN_NULL *field_fixed;
57 };
58 void copy_value(const EMBEDDED_PDV_identification& other_value);
59
60public:
61 EMBEDDED_PDV_identification();
62 EMBEDDED_PDV_identification(const EMBEDDED_PDV_identification& other_value);
63 ~EMBEDDED_PDV_identification();
64 EMBEDDED_PDV_identification& operator=(const EMBEDDED_PDV_identification& other_value);
65 boolean operator==(const EMBEDDED_PDV_identification& other_value) const;
66 inline boolean operator!=(const EMBEDDED_PDV_identification& other_value) const { return !(*this == other_value); }
67 EMBEDDED_PDV_identification_syntaxes& syntaxes();
68 const EMBEDDED_PDV_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 EMBEDDED_PDV_identification_context__negotiation& context__negotiation();
74 const EMBEDDED_PDV_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 EMBEDDED_PDV_identification*>(other_value)); }
87 void set_value(const Base_Type* other_value) { *this = *(static_cast<const EMBEDDED_PDV_identification*>(other_value)); }
88 Base_Type* clone() const { return new EMBEDDED_PDV_identification(*this); }
89 const TTCN_Typedescriptor_t* get_descriptor() const { return &EMBEDDED_PDV_descr_; }
90#else
91 inline boolean is_present() const { return is_bound(); }
92#endif
93 void set_param(Module_Param& param);
3abe9331 94 Module_Param* get_param(Module_Param_Name& param_name) const;
970ed795
EL
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,
af710487 102 TTCN_Buffer& p_buf, unsigned int flavor, int indent, embed_values_enc_struct_t*) const;
970ed795 103 int XER_decode(const XERdescriptor_t& p_td, XmlReaderWrap& reader,
feade998 104 unsigned int flavor, unsigned int flavor2, embed_values_dec_struct_t*);
970ed795
EL
105private:
106 boolean BER_decode_set_selection(const ASN_BER_TLV_t& p_tlv);
107public:
108 boolean BER_decode_isMyMsg(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv);
109};
110
111class EMBEDDED_PDV_identification_template : public Base_Template {
112 union {
113 struct {
114 EMBEDDED_PDV_identification::union_selection_type union_selection;
115 union {
116 EMBEDDED_PDV_identification_syntaxes_template *field_syntaxes;
117 OBJID_template *field_syntax;
118 INTEGER_template *field_presentation__context__id;
119 EMBEDDED_PDV_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 EMBEDDED_PDV_identification_template *list_value;
127 } value_list;
128 };
129
130 void copy_value(const EMBEDDED_PDV_identification& other_value);
131
132 void copy_template(const EMBEDDED_PDV_identification_template& other_value);
133
134public:
135 EMBEDDED_PDV_identification_template();
136 EMBEDDED_PDV_identification_template(template_sel other_value);
137 EMBEDDED_PDV_identification_template(const EMBEDDED_PDV_identification& other_value);
138 EMBEDDED_PDV_identification_template(const OPTIONAL<EMBEDDED_PDV_identification>& other_value);
139 EMBEDDED_PDV_identification_template(const EMBEDDED_PDV_identification_template& other_value);
140 ~EMBEDDED_PDV_identification_template();
141 void clean_up();
142 EMBEDDED_PDV_identification_template& operator=(template_sel other_value);
143 EMBEDDED_PDV_identification_template& operator=(const EMBEDDED_PDV_identification& other_value);
144 EMBEDDED_PDV_identification_template& operator=(const OPTIONAL<EMBEDDED_PDV_identification>& other_value);
145 EMBEDDED_PDV_identification_template& operator=(const EMBEDDED_PDV_identification_template& other_value);
3abe9331 146 boolean match(const EMBEDDED_PDV_identification& other_value, boolean legacy = FALSE) const;
970ed795
EL
147 EMBEDDED_PDV_identification valueof() const;
148 EMBEDDED_PDV_identification_template& list_item(unsigned int list_index) const;
149 void set_type(template_sel template_type, unsigned int list_length);
150 EMBEDDED_PDV_identification_syntaxes_template& syntaxes();
151 const EMBEDDED_PDV_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 EMBEDDED_PDV_identification_context__negotiation_template& context__negotiation();
157 const EMBEDDED_PDV_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(EMBEDDED_PDV_identification::union_selection_type checked_selection) const;
163 void log() const;
3abe9331 164 void log_match(const EMBEDDED_PDV_identification& match_value, boolean legacy = FALSE) const;
970ed795
EL
165 void encode_text(Text_Buf& text_buf) const;
166 void decode_text(Text_Buf& text_buf);
167
3abe9331 168 boolean is_present(boolean legacy = FALSE) const;
169 boolean match_omit(boolean legacy = FALSE) const;
970ed795 170 void set_param(Module_Param& param);
3abe9331 171 Module_Param* get_param(Module_Param_Name& param_name) const;
970ed795
EL
172#ifdef TITAN_RUNTIME_2
173 void valueofv(Base_Type* value) const { *(static_cast<EMBEDDED_PDV_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 EMBEDDED_PDV_identification*>(other_value)); }
176 Base_Template* clone() const { return new EMBEDDED_PDV_identification_template(*this); }
177 const TTCN_Typedescriptor_t* get_descriptor() const { return &EMBEDDED_PDV_descr_; }
3abe9331 178 boolean matchv(const Base_Type* other_value, boolean legacy) const { return match(*(static_cast<const EMBEDDED_PDV_identification*>(other_value)), legacy); }
179 void log_matchv(const Base_Type* match_value, boolean legacy) const { log_match(*(static_cast<const EMBEDDED_PDV_identification*>(match_value)), legacy); }
970ed795 180#else
3abe9331 181 void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
970ed795
EL
182#endif
183};
184
185class EMBEDDED_PDV_identification_syntaxes : public Base_Type {
186 OBJID field_abstract;
187 OBJID field_transfer;
188public:
189 EMBEDDED_PDV_identification_syntaxes();
190 EMBEDDED_PDV_identification_syntaxes(const OBJID& par_abstract,
191 const OBJID& par_transfer);
192 boolean operator==(const EMBEDDED_PDV_identification_syntaxes& other_value) const;
193 inline boolean operator!=(const EMBEDDED_PDV_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 boolean is_bound() const;
207 boolean is_value() const;
208 void clean_up();
209#ifdef TITAN_RUNTIME_2
210 boolean is_equal(const Base_Type* other_value) const { return *this == *(static_cast<const EMBEDDED_PDV_identification_syntaxes*>(other_value)); }
211 void set_value(const Base_Type* other_value) { *this = *(static_cast<const EMBEDDED_PDV_identification_syntaxes*>(other_value)); }
212 Base_Type* clone() const { return new EMBEDDED_PDV_identification_syntaxes(*this); }
213 const TTCN_Typedescriptor_t* get_descriptor() const { return &EMBEDDED_PDV_descr_; }
214#else
215 inline boolean is_present() const { return is_bound(); }
216#endif
217 void set_param(Module_Param& param);
3abe9331 218 Module_Param* get_param(Module_Param_Name& param_name) const;
970ed795
EL
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);
af710487 225 int XER_encode(const XERdescriptor_t&, TTCN_Buffer&, unsigned int, int, embed_values_enc_struct_t*) const;
feade998 226 int XER_decode(const XERdescriptor_t&, XmlReaderWrap& reader, unsigned int, unsigned int, embed_values_dec_struct_t*);
970ed795
EL
227};
228
229class EMBEDDED_PDV_identification_syntaxes_template : public Base_Template {
230#ifdef __SUNPRO_CC
231 public:
232#endif
233 struct single_value_struct;
234#ifdef __SUNPRO_CC
235 private:
236#endif
237 union {
238 single_value_struct *single_value;
239 struct {
240 unsigned int n_values;
241 EMBEDDED_PDV_identification_syntaxes_template *list_value;
242 } value_list;
243 };
244
245 void set_specific();
246 void copy_value(const EMBEDDED_PDV_identification_syntaxes& other_value);
247 void copy_template(const EMBEDDED_PDV_identification_syntaxes_template& other_value);
248
249public:
250 EMBEDDED_PDV_identification_syntaxes_template();
251 EMBEDDED_PDV_identification_syntaxes_template(template_sel other_value);
252 EMBEDDED_PDV_identification_syntaxes_template(const EMBEDDED_PDV_identification_syntaxes& other_value);
253 EMBEDDED_PDV_identification_syntaxes_template(const OPTIONAL<EMBEDDED_PDV_identification_syntaxes>& other_value);
254 EMBEDDED_PDV_identification_syntaxes_template(const EMBEDDED_PDV_identification_syntaxes_template& other_value);
255 ~EMBEDDED_PDV_identification_syntaxes_template();
256 void clean_up();
257 EMBEDDED_PDV_identification_syntaxes_template& operator=(template_sel other_value);
258 EMBEDDED_PDV_identification_syntaxes_template& operator=(const EMBEDDED_PDV_identification_syntaxes& other_value);
259 EMBEDDED_PDV_identification_syntaxes_template& operator=(const OPTIONAL<EMBEDDED_PDV_identification_syntaxes>& other_value);
260 EMBEDDED_PDV_identification_syntaxes_template& operator=(const EMBEDDED_PDV_identification_syntaxes_template& other_value);
3abe9331 261 boolean match(const EMBEDDED_PDV_identification_syntaxes& other_value, boolean legacy = FALSE) const;
970ed795
EL
262 EMBEDDED_PDV_identification_syntaxes valueof() const;
263 void set_type(template_sel template_type, unsigned int list_length);
264 EMBEDDED_PDV_identification_syntaxes_template& list_item(unsigned int list_index) const;
265 OBJID_template& abstract();
266 const OBJID_template& abstract() const;
267 OBJID_template& transfer();
268 const OBJID_template& transfer() const;
269 int size_of() const;
270 void log() const;
3abe9331 271 void log_match(const EMBEDDED_PDV_identification_syntaxes& match_value, boolean legacy = FALSE) const;
970ed795
EL
272 void encode_text(Text_Buf& text_buf) const;
273 void decode_text(Text_Buf& text_buf);
274
3abe9331 275 boolean is_present(boolean legacy = FALSE) const;
276 boolean match_omit(boolean legacy = FALSE) const;
970ed795 277 void set_param(Module_Param& param);
3abe9331 278 Module_Param* get_param(Module_Param_Name& param_name) const;
970ed795
EL
279#ifdef TITAN_RUNTIME_2
280 void valueofv(Base_Type* value) const { *(static_cast<EMBEDDED_PDV_identification_syntaxes*>(value)) = valueof(); }
281 void set_value(template_sel other_value) { *this = other_value; }
282 void copy_value(const Base_Type* other_value) { *this = *(static_cast<const EMBEDDED_PDV_identification_syntaxes*>(other_value)); }
283 Base_Template* clone() const { return new EMBEDDED_PDV_identification_syntaxes_template(*this); }
284 const TTCN_Typedescriptor_t* get_descriptor() const { return &EMBEDDED_PDV_descr_; }
3abe9331 285 boolean matchv(const Base_Type* other_value, boolean legacy) const { return match(*(static_cast<const EMBEDDED_PDV_identification_syntaxes*>(other_value)), legacy); }
286 void log_matchv(const Base_Type* match_value, boolean legacy) const { log_match(*(static_cast<const EMBEDDED_PDV_identification_syntaxes*>(match_value)), legacy); }
970ed795 287#else
3abe9331 288 void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
970ed795
EL
289#endif
290};
291
292class EMBEDDED_PDV_identification_context__negotiation : public Base_Type {
293 INTEGER field_presentation__context__id;
294 OBJID field_transfer__syntax;
295public:
296 EMBEDDED_PDV_identification_context__negotiation();
297 EMBEDDED_PDV_identification_context__negotiation(const INTEGER& par_presentation__context__id,
298 const OBJID& par_transfer__syntax);
299 boolean operator==(const EMBEDDED_PDV_identification_context__negotiation& other_value) const;
300 inline boolean operator!=(const EMBEDDED_PDV_identification_context__negotiation& other_value) const
301 { return !(*this == other_value); }
302
303 inline INTEGER& presentation__context__id()
304 {return field_presentation__context__id;}
305 inline const INTEGER& presentation__context__id() const
306 {return field_presentation__context__id;}
307 inline OBJID& transfer__syntax()
308 {return field_transfer__syntax;}
309 inline const OBJID& transfer__syntax() const
310 {return field_transfer__syntax;}
311 int size_of() const;
312 void log() const;
313 boolean is_bound() const;
314 boolean is_value() const;
315 void clean_up();
316#ifdef TITAN_RUNTIME_2
317 boolean is_equal(const Base_Type* other_value) const { return *this == *(static_cast<const EMBEDDED_PDV_identification_context__negotiation*>(other_value)); }
318 void set_value(const Base_Type* other_value) { *this = *(static_cast<const EMBEDDED_PDV_identification_context__negotiation*>(other_value)); }
319 Base_Type* clone() const { return new EMBEDDED_PDV_identification_context__negotiation(*this); }
320 const TTCN_Typedescriptor_t* get_descriptor() const { return &EMBEDDED_PDV_descr_; }
321#else
322 inline boolean is_present() const { return is_bound(); }
323#endif
324 void set_param(Module_Param& param);
3abe9331 325 Module_Param* get_param(Module_Param_Name& param_name) const;
970ed795
EL
326 void encode_text(Text_Buf& text_buf) const;
327 void decode_text(Text_Buf& text_buf);
328 //void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
329 //void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
330 ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
331 boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
af710487 332 int XER_encode(const XERdescriptor_t&, TTCN_Buffer&, unsigned int, int, embed_values_enc_struct_t*) const;
feade998 333 int XER_decode(const XERdescriptor_t&, XmlReaderWrap& reader, unsigned int, unsigned int, embed_values_dec_struct_t*);
970ed795
EL
334};
335
336class EMBEDDED_PDV_identification_context__negotiation_template : public Base_Template {
337#ifdef __SUNPRO_CC
338 public:
339#endif
340 struct single_value_struct;
341#ifdef __SUNPRO_CC
342 private:
343#endif
344 union {
345 single_value_struct *single_value;
346 struct {
347 unsigned int n_values;
348 EMBEDDED_PDV_identification_context__negotiation_template *list_value;
349 } value_list;
350 };
351
352 void set_specific();
353 void copy_value(const EMBEDDED_PDV_identification_context__negotiation& other_value);
354 void copy_template(const EMBEDDED_PDV_identification_context__negotiation_template& other_value);
355
356public:
357 EMBEDDED_PDV_identification_context__negotiation_template();
358 EMBEDDED_PDV_identification_context__negotiation_template(template_sel other_value);
359 EMBEDDED_PDV_identification_context__negotiation_template(const EMBEDDED_PDV_identification_context__negotiation& other_value);
360 EMBEDDED_PDV_identification_context__negotiation_template(const OPTIONAL<EMBEDDED_PDV_identification_context__negotiation>& other_value);
361 EMBEDDED_PDV_identification_context__negotiation_template(const EMBEDDED_PDV_identification_context__negotiation_template& other_value);
362 ~EMBEDDED_PDV_identification_context__negotiation_template();
363 void clean_up();
364 EMBEDDED_PDV_identification_context__negotiation_template& operator=(template_sel other_value);
365 EMBEDDED_PDV_identification_context__negotiation_template& operator=(const EMBEDDED_PDV_identification_context__negotiation& other_value);
366 EMBEDDED_PDV_identification_context__negotiation_template& operator=(const OPTIONAL<EMBEDDED_PDV_identification_context__negotiation>& other_value);
367 EMBEDDED_PDV_identification_context__negotiation_template& operator=(const EMBEDDED_PDV_identification_context__negotiation_template& other_value);
3abe9331 368 boolean match(const EMBEDDED_PDV_identification_context__negotiation& other_value, boolean legacy = FALSE) const;
970ed795
EL
369 EMBEDDED_PDV_identification_context__negotiation valueof() const;
370 void set_type(template_sel template_type, unsigned int list_length);
371 EMBEDDED_PDV_identification_context__negotiation_template& list_item(unsigned int list_index) const;
372 INTEGER_template& presentation__context__id();
373 const INTEGER_template& presentation__context__id() const;
374 OBJID_template& transfer__syntax();
375 const OBJID_template& transfer__syntax() const;
376 int size_of() const;
377 void log() const;
3abe9331 378 void log_match(const EMBEDDED_PDV_identification_context__negotiation& match_value, boolean legacy = FALSE) const;
970ed795
EL
379 void encode_text(Text_Buf& text_buf) const;
380 void decode_text(Text_Buf& text_buf);
381
3abe9331 382 boolean is_present(boolean legacy = FALSE) const;
383 boolean match_omit(boolean legacy = FALSE) const;
970ed795 384 void set_param(Module_Param& param);
3abe9331 385 Module_Param* get_param(Module_Param_Name& param_name) const;
970ed795
EL
386#ifdef TITAN_RUNTIME_2
387 void valueofv(Base_Type* value) const { *(static_cast<EMBEDDED_PDV_identification_context__negotiation*>(value)) = valueof(); }
388 void set_value(template_sel other_value) { *this = other_value; }
389 void copy_value(const Base_Type* other_value) { *this = *(static_cast<const EMBEDDED_PDV_identification_context__negotiation*>(other_value)); }
390 Base_Template* clone() const { return new EMBEDDED_PDV_identification_context__negotiation_template(*this); }
391 const TTCN_Typedescriptor_t* get_descriptor() const { return &EMBEDDED_PDV_descr_; }
3abe9331 392 boolean matchv(const Base_Type* other_value, boolean legacy) const { return match(*(static_cast<const EMBEDDED_PDV_identification_context__negotiation*>(other_value)), legacy); }
393 void log_matchv(const Base_Type* match_value, boolean legacy) const { log_match(*(static_cast<const EMBEDDED_PDV_identification_context__negotiation*>(match_value)), legacy); }
970ed795 394#else
3abe9331 395 void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
970ed795
EL
396#endif
397};
398
399class EMBEDDED_PDV : public Base_Type {
400 EMBEDDED_PDV_identification field_identification;
401 OPTIONAL<UNIVERSAL_CHARSTRING> field_data__value__descriptor;
402 OCTETSTRING field_data__value;
403public:
404 EMBEDDED_PDV();
405 EMBEDDED_PDV(const EMBEDDED_PDV_identification& par_identification,
406 const OPTIONAL<UNIVERSAL_CHARSTRING>& par_data__value__descriptor,
407 const OCTETSTRING& par_data__value);
408 boolean operator==(const EMBEDDED_PDV& other_value) const;
409 inline boolean operator!=(const EMBEDDED_PDV& other_value) const
410 { return !(*this == other_value); }
411
412 inline EMBEDDED_PDV_identification& identification()
413 {return field_identification;}
414 inline const EMBEDDED_PDV_identification& identification() const
415 {return field_identification;}
416 inline OPTIONAL<UNIVERSAL_CHARSTRING>& data__value__descriptor()
417 {return field_data__value__descriptor;}
418 inline const OPTIONAL<UNIVERSAL_CHARSTRING>& data__value__descriptor() const
419 {return field_data__value__descriptor;}
420 inline OCTETSTRING& data__value()
421 {return field_data__value;}
422 inline const OCTETSTRING& data__value() const
423 {return field_data__value;}
424 int size_of() const;
425 boolean is_bound() const;
426 boolean is_value() const;
427 void clean_up();
428#ifdef TITAN_RUNTIME_2
429 boolean is_equal(const Base_Type* other_value) const { return *this == *(static_cast<const EMBEDDED_PDV*>(other_value)); }
430 void set_value(const Base_Type* other_value) { *this = *(static_cast<const EMBEDDED_PDV*>(other_value)); }
431 Base_Type* clone() const { return new EMBEDDED_PDV(*this); }
432 const TTCN_Typedescriptor_t* get_descriptor() const { return &EMBEDDED_PDV_descr_; }
433#else
434 inline boolean is_present() const { return is_bound(); }
435#endif
436 void log() const;
437 void set_param(Module_Param& param);
3abe9331 438 Module_Param* get_param(Module_Param_Name& param_name) const;
970ed795
EL
439 void encode_text(Text_Buf& text_buf) const;
440 void decode_text(Text_Buf& text_buf);
441 void encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const;
442 void decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...);
443 ASN_BER_TLV_t* BER_encode_TLV(const TTCN_Typedescriptor_t& p_td, unsigned p_coding) const;
444 boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td, const ASN_BER_TLV_t& p_tlv, unsigned L_form);
af710487 445 int XER_encode(const XERdescriptor_t&, TTCN_Buffer&, unsigned int, int, embed_values_enc_struct_t*) const;
feade998 446 int XER_decode(const XERdescriptor_t&, XmlReaderWrap&, unsigned int, unsigned int, embed_values_dec_struct_t*);
970ed795
EL
447};
448
449class EMBEDDED_PDV_template : public Base_Template {
450#ifdef __SUNPRO_CC
451 public:
452#endif
453 struct single_value_struct;
454#ifdef __SUNPRO_CC
455 private:
456#endif
457 union {
458 single_value_struct *single_value;
459 struct {
460 unsigned int n_values;
461 EMBEDDED_PDV_template *list_value;
462 } value_list;
463 };
464
465 void set_specific();
466 void copy_value(const EMBEDDED_PDV& other_value);
467 void copy_template(const EMBEDDED_PDV_template& other_value);
468
469public:
470 EMBEDDED_PDV_template();
471 EMBEDDED_PDV_template(template_sel other_value);
472 EMBEDDED_PDV_template(const EMBEDDED_PDV& other_value);
473 EMBEDDED_PDV_template(const OPTIONAL<EMBEDDED_PDV>& other_value);
474 EMBEDDED_PDV_template(const EMBEDDED_PDV_template& other_value);
475 ~EMBEDDED_PDV_template();
476 void clean_up();
477 EMBEDDED_PDV_template& operator=(template_sel other_value);
478 EMBEDDED_PDV_template& operator=(const EMBEDDED_PDV& other_value);
479 EMBEDDED_PDV_template& operator=(const OPTIONAL<EMBEDDED_PDV>& other_value);
480 EMBEDDED_PDV_template& operator=(const EMBEDDED_PDV_template& other_value);
3abe9331 481 boolean match(const EMBEDDED_PDV& other_value, boolean legacy = FALSE) const;
970ed795
EL
482 EMBEDDED_PDV valueof() const;
483 void set_type(template_sel template_type, unsigned int list_length);
484 EMBEDDED_PDV_template& list_item(unsigned int list_index) const;
485 EMBEDDED_PDV_identification_template& identification();
486 const EMBEDDED_PDV_identification_template& identification() const;
487 UNIVERSAL_CHARSTRING_template& data__value__descriptor();
488 const UNIVERSAL_CHARSTRING_template& data__value__descriptor() const;
489 OCTETSTRING_template& data__value();
490 const OCTETSTRING_template& data__value() const;
491 int size_of() const;
492 void log() const;
3abe9331 493 void log_match(const EMBEDDED_PDV& match_value, boolean legacy = FALSE) const;
970ed795
EL
494 void encode_text(Text_Buf& text_buf) const;
495 void decode_text(Text_Buf& text_buf);
496
3abe9331 497 boolean is_present(boolean legacy = FALSE) const;
498 boolean match_omit(boolean legacy = FALSE) const;
970ed795 499 void set_param(Module_Param& param);
3abe9331 500 Module_Param* get_param(Module_Param_Name& param_name) const;
970ed795
EL
501#ifdef TITAN_RUNTIME_2
502 void valueofv(Base_Type* value) const { *(static_cast<EMBEDDED_PDV*>(value)) = valueof(); }
503 void set_value(template_sel other_value) { *this = other_value; }
504 void copy_value(const Base_Type* other_value) { *this = *(static_cast<const EMBEDDED_PDV*>(other_value)); }
505 Base_Template* clone() const { return new EMBEDDED_PDV_template(*this); }
506 const TTCN_Typedescriptor_t* get_descriptor() const { return &EMBEDDED_PDV_descr_; }
3abe9331 507 boolean matchv(const Base_Type* other_value, boolean legacy) const { return match(*(static_cast<const EMBEDDED_PDV*>(other_value)), legacy); }
508 void log_matchv(const Base_Type* match_value, boolean legacy) const { log_match(*(static_cast<const EMBEDDED_PDV*>(match_value)), legacy); }
970ed795 509#else
3abe9331 510 void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
970ed795
EL
511#endif
512};
513
514#endif // ASN_EmbeddedPDV_HH
This page took 0.074743 seconds and 5 git commands to generate.