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