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