Sync with 5.4.3
[deliverable/titan.core.git] / core / XER.hh
CommitLineData
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 XER_HH_
9#define XER_HH_
10
11#include "Types.h"
12#include "Encdec.hh"
13#include <stddef.h> // for size_t
14#include <string.h> // strncmp for the inline function
15
16class XmlReaderWrap;
17
18class Base_Type;
af710487 19#ifdef TITAN_RUNTIME_2
20class Record_Of_Type;
21class Erroneous_descriptor_t;
a38c6d4c 22#else
23namespace PreGenRecordOf {
24 class PREGEN__RECORD__OF__UNIVERSAL__CHARSTRING;
25 class PREGEN__RECORD__OF__UNIVERSAL__CHARSTRING__OPTIMIZED;
26}
af710487 27#endif
970ed795
EL
28class TTCN_Module;
29
30/** @defgroup XER XER codec
31 * @{
32 *
33 * @brief ASN.1 XML Encoding Rules, ITU-T Rec X.693 and amd1
34 */
35
36/** XER flags for various uses.
37 *
38 * Low values specify the XML encoding variant (Basic, Canonical, Extended)
39 * Other bits have dual uses:
40 * - set in XERdescriptor_t::xer_bits, according to XML encoding attributes
41 * - passed in as additional flags in the \c flavor parameter, usually
42 * to XER_encode. These are used when encoding attributes in a parent type
43 * influence the encoding of its components (e.g. EMBED-VALUES on a record
44 * change the encoding of all components).
45 */
46enum XER_flavor {
3f84031e 47 XER_NONE = 0,
970ed795
EL
48 XER_BASIC = 1U << 0, /**< Basic XER with indentation */
49 XER_CANONICAL = 1U << 1, /**< Canonical XER, no indentation */
50 XER_EXTENDED = 1U << 2, /**< Extended XER */
51 DEF_NS_PRESENT = 1U << 3, // 0x08
52 DEF_NS_SQUASHED = 1U << 4, // 0x10
53 XER_MASK = 0x1FU, /**< All the "real" XER flavors plus DEF_NS */
54
55 /* Additional flags, for the parent to pass information to its children
56 * (when the parent affects the child, e.g. LIST) */
57 XER_ESCAPE_ENTITIES = 1U << 5, /**< Escape according to X.680/2002, 11.15.8,
58 used internally by UNIVERSAL_CHARSTRING. */
59 XER_RECOF = 1U << 6, /**< Generating code for the contained type
60 of a record-of/set-of. Only affects BOOLEAN, CHOICE, ENUMERATED and NULL
61 (see Table 5 in X.680 (11/2008) clause 26.5) */
62
63 /* More flags for XERdescriptor_t::xer_bits */
64 ANY_ATTRIBUTES = 1U << 7, // 0xooo80
65 ANY_ELEMENT = 1U << 8, // 0xoo100
66 XER_ATTRIBUTE = 1U << 9, // 0xoo200
67 BASE_64 = 1U << 10, // 0xoo400
68 XER_DECIMAL = 1U << 11, // 0xoo800
69 // DEFAULT-FOR-EMPTY has its own field
70 EMBED_VALUES = 1U << 12, // 0xo1000
71 /** LIST encoding instruction for record-of/set-of. */
72 XER_LIST = 1U << 13, // 0xo2000
73 // NAME is stored in the descriptor
74 // NAMESPACE is folded into the name
75 XER_TEXT = 1U << 14, // 0xo4000
76 UNTAGGED = 1U << 15, // 0xo8000
77 USE_NIL = 1U << 16, // 0x10000
78 USE_NUMBER = 1U << 17, // 0x20000
79 USE_ORDER = 1U << 18, // 0x40000
80 USE_QNAME = 1U << 19, // 0x80000
81 USE_TYPE_ATTR = 1U << 20, // 0x100000, either USE-TYPE or USE-UNION
82 HAS_1UNTAGGED = 1U << 21, // 0x200000 member, and it's character-encodable
83 // another hint to pass down to the children:
84 PARENT_CLOSED = 1U << 22, // 0x400000
85 FORM_UNQUALIFIED=1U << 23, // 0X800000 (qualified is more frequent)
86 XER_TOPLEVEL = 1U << 24, //0X1000000 (toplevel, for decoding)
87 SIMPLE_TYPE = 1U << 25, /*0X2000000 always encode on one line:
88 <foo>content</foo>, never <foo>\ncontent\n</foo> */
89 BXER_EMPTY_ELEM= 1U << 26, /*0X4000000 boolean and enum encode themselves
90 as empty elements in BXER only. This also influences them in record-of */
91 ANY_FROM = 1U << 27, // 0x8000000 anyElement from ... or anyAttributes from ...
92 ANY_EXCEPT = 1U << 28, // 0x10000000 anyElement except ... or anyAttributes except ...
51fa56b9 93 EXIT_ON_ERROR = 1U << 29, /* 0x20000000 clean up and exit instead of throwing
970ed795 94 a decoding error, used on alternatives of a union with USE-UNION */
51fa56b9 95 XER_OPTIONAL = 1U << 30, // 0x40000000 is an optional field of a record or set
96 BLOCKED = 1U << 31 // 0x80000000 either ABSTRACT or BLOCK
970ed795
EL
97};
98
feade998 99enum XER_flavor2 {
100 USE_NIL_PARENT_TAG = 1U << 0 // Content field has attribute that was read by parent
101};
102
970ed795
EL
103/** WHITESPACE actions.
104 * Note that WHITESPACE_COLLAPSE includes the effect of WHITESPACE_REPLACE
105 * and the code relies on WHITESPACE_COLLAPSE having the higher value. */
106enum XER_whitespace_action {
107 WHITESPACE_PRESERVE,
108 WHITESPACE_REPLACE,
109 WHITESPACE_COLLAPSE
110};
111
112/// Check that \p f has the canonical flavor.
113inline bool is_canonical(unsigned int f)
114{
115 return (f & XER_CANONICAL) != 0;
116}
117
118inline bool is_exer(unsigned int f)
119{
120 return (f & XER_EXTENDED) != 0;
121}
122
123/** Is this a member of a SEQUENCE OF
124 *
125 * @param f XER flavor
126 * @return \c true if \p contains \c XER_RECOF, \c false otherwise
127 */
128inline bool is_record_of(unsigned int f)
129{
130 return (f & XER_RECOF) != 0;
131}
132
133/** Do list encoding
134 *
135 * This is now hijacked to mean "the enclosing type told us to omit our tag".
136 * Hence the check for USE-NIL too.
137 *
138 * @param f XER flavor
139 * @return \c true if \c XER_EXTENDED and either \c XER_LIST or \c USE_NIL is set.
140 */
141inline bool is_exerlist(unsigned int f)
142{
143 return (f & XER_EXTENDED) && ((f & (XER_LIST|USE_NIL|USE_TYPE_ATTR)) != 0);
144}
145
146/** Descriptor for XER encoding/decoding during runtime.
147 *
148 * This structure contains XER enc/dec information for the runtime.
149 *
150 * There is an instance of this struct for most TTCN3/ASN1 types.
151 * Because TITAN generates type aliases (typedefs) when one type references
152 * another (e.g. "type integer i1" results in "typedef INTEGER i1"),
153 * this struct holds information to distinguish them during encoding.
154 *
155 * Only those encoding instructions need to be recorded which can apply to
156 * scalar types (e.g. BOOLEAN, REAL, etc., usually implemented by classes in core/)
157 * because the same code needs to handle all varieties.
158 *
159 * - ANY-ELEMENT : UFT8String
160 * - BASE64 : OCTET STRING, open type, restricted character string
161 * - DECIMAL : REAL
162 * - NAME : anything (this is already present as \c name)
163 * - NAMESPACE : hmm
164 * - TEXT : INTEGER, enum
165 * - USE-NUMBER : enum
166 * - WHITESPACE : restricted character string
167 *
168 * ANY-ATTRIBUTE, EMBED-VALUES, LIST, USE-TYPE, USE-UNION apply to sequence/choice types;
169 * their effect will be resolved by the compiler.
170 *
171 * Instances of this type are written by the compiler into the generated code,
172 * one for each type. For a TTCN3 type foo_bar, there will be a class
173 * foo__bar and a XERdescriptor_t instance named foo__bar_xer_.
174 *
175 * Each built-in type has a descriptor (e.g. INTEGER_xer_) in the runtime.
176 *
177 * The \a name field contains the closing tag including a newline, e.g.
178 * \c "</INTEGER>\n". This allows for a more efficient output of the tags,
179 * minimizing the number of one-character inserts into the buffer.
180 *
181 * The start tag is written as an 'open angle bracket' character,
182 * followed by the \a name field without its first two characters (\c "</" ).
183 *
184 * In case of the canonical encoding (\c CXER ) there is no indenting,
185 * so the final newline is omitted by reducing the length by one.
186 *
187 * Example:
188 * @code
189 * int Foo::XER_encode(const XERdescriptor_t& p_td,
af710487 190 * TTCN_Buffer& p_buf, unsigned int flavor, int indent, embed_values_enc_struct_t*) const {
970ed795
EL
191 * int canon = is_canonical(flavor);
192 * if (!canon) do_indent(p_buf, indent);
193 * // output the start tag
194 * p_buf.put_c('<');
195 * p_buf.put_s((size_t)p_td.namelen-2-canon, (const unsigned char*)p_td.name+2);
196 * // this is not right if Foo has attributes :(
197 * // we'll need to reduce namelen further (or just get rid of this hackery altogether)
198 *
199 * // output actual content
200 * p_buf.put_.....
201 *
202 * // output the closing tag
203 * if (!canon) do_indent(p_buf, indent);
204 * p_buf.put_s((size_t)p_td.namelen-canon, (const unsigned char*)p_td.name);
205 * }
206 * @endcode
207 *
208 * Empty element tag:
209 *
210 * @code
211 * int Foo::XER_encode(const XERdescriptor_t& p_td,
af710487 212 * TTCN_Buffer& p_buf, unsigned int flavor, int indent, embed_values_enc_struct_t*) const {
970ed795
EL
213 * int canon = is_canonical(flavor);
214 * if (!canon) do_indent(p_buf, indent);
215 * // output an empty element tag
216 * p_buf.put_c('<');
217 * p_buf.put_s((size_t)p_td.namelen-4, (const unsigned char*)p_td.name+2);
218 * p_buf.put_s(3 - canon, (const unsigned char*)"/>\n");
219 * }
220 * @endcode
221 *
222 * @note We don't generate the XML prolog. This is required for Canonical XER
223 * (X.693 9.1.1) and permitted for Basic-XER (8.2.1).
224 *
225 * @note X.693 amd1 (EXER) 10.3.5 states: If an "ExtendedXMLValue" is empty,
226 * and its associated tags have not been removed by the use of an UNTAGGED
227 * encoding instruction, then the associated preceding and following tags
228 * <b>can (as an encoder's option)</b> be replaced with
229 * an XML empty-element tag (see ITU-T Rec. X.680 | ISO/IEC 8824-1, 16.8).
230 * This is called the associated empty-element tag.
231 *
232 * @note X.693 (XER) 9.1.4 states: (for Canonical XER)
233 * If the XML value notation permits the use of an XML empty-element tag
234 * (see ITU-T Rec. X.680 |ISO/IEC 8824-1, 15.5 and 16.8),
235 * then this empty-element tag @b shall be used.
236 *
237 * @note After editing XERdescriptor_t, make sure to change XER_STRUCT2 here
238 * and generate_code_xerdescriptor() in Type.cc.
239 * */
240struct XERdescriptor_t
241{
242 /** (closing) Tag name, including a newline.
243 * First is for basic and canonical XER, second for EXER */
244 const char *names[2];
245 /** Length of closing tag string (strlen of names[i]) */
246 const unsigned short namelens[2];
247 /** Various EXER flags */
248 const unsigned long xer_bits;
249 /** Whitespace handling */
250 const XER_whitespace_action whitespace;
251 /** value to compare for DEFAULT-FOR-EMPTY */
252 const Base_Type* dfeValue;
253 /** The module to which the type belongs. May be NULL in a descriptor
254 * for a built-in type, e.g. in INTEGER_xer_ */
255 const TTCN_Module* my_module;
256 /** Index into the module's namespace list.
257 * -1 means no namespace.
258 * >=+0 and FORM_UNQUALIFIED means that there IS a namespace,
259 * it just doesn't show up in the XML (but libxml2 will return it). */
260 const int ns_index;
261
262 /** Number of namespace URIs*/
263 const unsigned short nof_ns_uris;
264
265 /** List of namespace URIs
266 * In case of "anyElement" variants this list contains the valid ("anyElement from ...")
267 * or invalid ("anyElement except ...") namespace URIs.
268 * The unqualified namespace is marked by an empty string ("").*/
269 const char** ns_uris;
a38c6d4c 270
271 /** Points to the element type's XER descriptor in case of 'record of' and 'set of' types */
272 const XERdescriptor_t* oftype_descr;
970ed795
EL
273};
274
af710487 275/** Information related to the embedded values in XML encoding
276 *
277 * Used when a record/set with the EMBED-VALUES coding instruction contains
278 * one or more record of/set of fields. */
279struct embed_values_enc_struct_t
280{
281#ifdef TITAN_RUNTIME_2
282 /** Stores the array of embedded values */
283 const Record_Of_Type* embval_array;
284 /** Stores the erroneous descriptor of the embedded values field (for negative tests) */
285 const Erroneous_descriptor_t* embval_err;
286 /** Error value index for the embedded values (for negative tests) */
287 int embval_err_val_idx;
288 /** Erroneous descriptor index for the embedded values (for negative tests) */
289 int embval_err_descr_idx;
290#else
a38c6d4c 291 /** Stores the array of embedded values (regular record-of) */
292 const PreGenRecordOf::PREGEN__RECORD__OF__UNIVERSAL__CHARSTRING* embval_array_reg;
293 /** Stores the array of embedded values (optimized record-of) */
294 const PreGenRecordOf::PREGEN__RECORD__OF__UNIVERSAL__CHARSTRING__OPTIMIZED* embval_array_opt;
af710487 295#endif
296 /** Stores the index of the next embedded value to be read */
297 int embval_index;
298};
299
300/** Information related to the embedded values in XML decoding
301 *
302 * Used when a record/set with the EMBED-VALUES coding instruction contains
303 * one or more record of/set of fields. */
304struct embed_values_dec_struct_t
305{
306#ifdef TITAN_RUNTIME_2
307 /** Stores the array of embedded values */
308 Record_Of_Type* embval_array;
309#else
a38c6d4c 310 /** Stores the array of embedded values (regular record-of) */
311 PreGenRecordOf::PREGEN__RECORD__OF__UNIVERSAL__CHARSTRING* embval_array_reg;
312 /** Stores the array of embedded values (optimized record-of) */
313 PreGenRecordOf::PREGEN__RECORD__OF__UNIVERSAL__CHARSTRING__OPTIMIZED* embval_array_opt;
af710487 314#endif
315 /** Stores the number of embedded values that are currently in the array,
316 * and the index where the next one should be inserted */
317 int embval_index;
318};
319
970ed795
EL
320/** Check the name of an XML node against a XER type descriptor.
321 *
322 * @param name the (local, unqualified) name of the XML element
323 * @param p_td the type descriptor
324 * @param exer \c true if Extended XER decoding, \c false for Basic and Canonical XER
325 * @return \c true if \p name corresponds to the type descriptor, \c false otherwise.
326 */
327inline bool check_name(const char *name, const XERdescriptor_t& p_td, int exer)
328{
329 return strncmp(name, p_td.names[exer], p_td.namelens[exer]-2) == 0
330 && name[p_td.namelens[exer]-2] == '\0';
331}
332
333/** Verify the namespace of an XML node against a XER type descriptor.
334 *
335 * @pre EXER decoding is in progress
336 *
337 * @param ns_uri the URI of the current node
338 * @param p_td the type descriptor
339 * @return \c true if \p ns_uri is NULL and the type has no namespace
340 * or it's the default namespace.
341 * @return \c true if \p ns_uri is not NULL and it matches the one referenced
342 * by \p p_td.
343 * @return \c false otherwise.
344 */
345bool check_namespace(const char *ns_uri, const XERdescriptor_t& p_td);
346
347/** Check that the current element matches the XER descriptor
348 *
349 * Calls TTCN_EncDec_ErrorContext::error() if it doesn't.
350 *
351 * @param reader XML reader
352 * @param p_td XER descriptor
353 * @param exer 0 for Basic/Canonical XER, 1 for EXER
354 * @return the name of the current element
355 */
356const char* verify_name(XmlReaderWrap& reader, const XERdescriptor_t& p_td, int exer);
357
358/** Check the end tag
359 *
360 * Calls verify_name(), then compares \a depth with the current XML depth
361 * and calls TTCN_EncDec_ErrorContext::error() if they don't match.
362 *
363 * @param reader XML reader
364 * @param p_td XER descriptor
365 * @param depth XML tag depth (0 for top-level element)
366 * @param exer 0 for Basic/Canonical XER, 1 for EXER
367 */
368void verify_end(XmlReaderWrap& reader, const XERdescriptor_t& p_td, const int depth, int exer);
369
370class TTCN_Buffer;
371
372/** Output the namespace prefix
373 *
374 * The namespace prefix is determined by the XER descriptor (@a my_module
375 * and @a ns_index fields). It is not written if p_td.xer_bits has
376 * FORM_UNQUALIFIED.
377 *
378 * @param p_td XER descriptor
379 * @param p_buf buffer to write into
380 *
381 * @pre the caller should check that E-XER encoding is in effect.
382 */
383void write_ns_prefix(const XERdescriptor_t& p_td, TTCN_Buffer& p_buf);
384
51fa56b9 385/** Return the namespace referred to by a prefix
386 *
387 * Finds the namespace specified by \a prefix in the module's namespace table
388 * and returns its URI. Returns NULL if the namespace is not found.
389 *
390 * @param prefix namespace prefix to be found
391 * @param p_td XER descriptor (contains the module to search in)
392 */
393const char* get_ns_uri_from_prefix(const char *prefix, const XERdescriptor_t& p_td);
394
970ed795
EL
395/** Output the beginning of an XML attribute.
396 *
397 * Writes a space, the attribute name (from \p p_td), and the string "='".
398 * @post the buffer is ready to receive the actual value
399 *
400 * @param p_td XER descriptor (contains the attribute name)
401 * @param p_buf buffer to write into
402 */
403inline void begin_attribute(const XERdescriptor_t& p_td, TTCN_Buffer& p_buf)
404{
405 p_buf.put_c(' ');
406 write_ns_prefix(p_td, p_buf);
407 p_buf.put_s((size_t)p_td.namelens[1]-2, (const unsigned char*)p_td.names[1]);
408 p_buf.put_s((size_t)2, (const unsigned char*)"='");
409}
410
411/** Indent.
412 *
413 * @param buf buffer to write into.
414 * @param level indent level
415 *
416 * Writes the appropriate amount of indentation into \p buf.
417 *
418 * Indentation is currently done with with tabs.
419 * */
420int do_indent(TTCN_Buffer& buf, int level);
421
422/** Ensures that the anyElement or anyAttribute field respects its namespace
423 * restrictions.
424 * In case of "anyElement from ..." or "anyAttributes from ..." the namespace
425 * needs to be in the specified list.
426 * In case of "anyElement except ..." or "anyAttributes except ..." it cannot
427 * match any of the namespaces from the list.
428 * An invalid namespace causes a dynamic test case error.
429 *
430 * @param p_td type descriptor of the field in question, contains the list of
431 * valid or invalid namespaces
432 * @param p_xmlns constains the namespace in question
433 */
434void check_namespace_restrictions(const XERdescriptor_t& p_td, const char* p_xmlns);
435
436
437#ifdef DEFINE_XER_STRUCT
438# define XER_STRUCT2(type_name,xmlname) \
439 extern const XERdescriptor_t type_name##_xer_ = { \
440 { xmlname ">\n", xmlname ">\n" }, \
441 { 2+sizeof(xmlname)-1, 2+sizeof(xmlname)-1 }, \
a38c6d4c 442 0UL, WHITESPACE_PRESERVE, NULL, NULL, 0, 0, NULL, NULL }
970ed795
EL
443// The compiler should fold the two identical strings into one
444
445# define XER_STRUCT_COPY(cpy,original) \
446 const XERdescriptor_t& cpy##_xer_ = original##_xer_
447#else
448/** Declare a XER structure.
449 * @param type_name the name of a Titan runtime class
450 * @param xmlname the XML tag name
451 */
452# define XER_STRUCT2(type_name,xmlname) extern const XERdescriptor_t type_name##_xer_
453# define XER_STRUCT_COPY(cpy,original) extern const XERdescriptor_t& cpy##_xer_
454#endif
455
456/** Declare a XER structure where the name of the type matches the tag */
457# define XER_STRUCT(name) XER_STRUCT2(name, #name)
458
459/* XER descriptors for built-in types.
460 * The XML tag names are defined in Table 4, referenced by clause
461 * 11.25.2 (X.680/2002) or 12.36.2 (X.680/2008) */
462
463// Types shared between ASN.1 and TTCN-3
464XER_STRUCT2(BITSTRING, "BIT_STRING");
465XER_STRUCT (BOOLEAN);
466XER_STRUCT (CHARSTRING);
467XER_STRUCT2(FLOAT, "REAL");
468XER_STRUCT (INTEGER);
469XER_STRUCT2(OBJID, "OBJECT_IDENTIFIER");
470XER_STRUCT2(OCTETSTRING, "OCTET_STRING");
471XER_STRUCT (UNIVERSAL_CHARSTRING);
472
473XER_STRUCT(RELATIVE_OID);
474
475// ASN.1 types
476
477XER_STRUCT2(EMBEDDED_PDV, "SEQUENCE");
478XER_STRUCT2(EMBEDDED_PDV_identification, "identification");
479XER_STRUCT2(EMBEDDED_PDV_identification_sxs, "syntaxes");
480XER_STRUCT2(EMBEDDED_PDV_identification_sxs_abs, "abstract");
481XER_STRUCT2(EMBEDDED_PDV_identification_sxs_xfr, "transfer");
482XER_STRUCT2(EMBEDDED_PDV_identification_sx , "syntax");
483XER_STRUCT2(EMBEDDED_PDV_identification_pci, "presentation-context-id");
484XER_STRUCT2(EMBEDDED_PDV_identification_cn , "context-negotiation");
485XER_STRUCT2(EMBEDDED_PDV_identification_cn_pci , "presentation-context-id");
486XER_STRUCT2(EMBEDDED_PDV_identification_cn_tsx , "transfer-syntax");
487XER_STRUCT2(EMBEDDED_PDV_identification_ts , "transfer-syntax");
488XER_STRUCT2(EMBEDDED_PDV_identification_fix, "fixed");
489XER_STRUCT2(EMBEDDED_PDV_data_value_descriptor, "data-value-descriptor");
490XER_STRUCT2(EMBEDDED_PDV_data_value, "data-value");
491
492
493XER_STRUCT2(EXTERNAL, "SEQUENCE");
494XER_STRUCT2(EXTERNAL_direct_reference , "direct-reference");
495XER_STRUCT2(EXTERNAL_indirect_reference, "indirect-reference");
496XER_STRUCT2(EXTERNAL_data_value_descriptor, "data-value-descriptor");
497XER_STRUCT2(EXTERNAL_encoding, "encoding");
498XER_STRUCT2(EXTERNAL_encoding_singleASN , "single-ASN1-type");
499XER_STRUCT2(EXTERNAL_encoding_octet_aligned, "octet-aligned");
500XER_STRUCT2(EXTERNAL_encoding_arbitrary , "arbitrary");
501
502// The big, scary ASN.1 unrestricted character string
503XER_STRUCT2(CHARACTER_STRING, "SEQUENCE");
504XER_STRUCT_COPY(CHARACTER_STRING_identification, EMBEDDED_PDV_identification);
505XER_STRUCT_COPY(CHARACTER_STRING_identification_sxs, EMBEDDED_PDV_identification_sxs);
506XER_STRUCT_COPY(CHARACTER_STRING_identification_sxs_abs, EMBEDDED_PDV_identification_sxs_abs);
507XER_STRUCT_COPY(CHARACTER_STRING_identification_sxs_xfr, EMBEDDED_PDV_identification_sxs_xfr);
508XER_STRUCT_COPY(CHARACTER_STRING_identification_sx , EMBEDDED_PDV_identification_sx);
509XER_STRUCT_COPY(CHARACTER_STRING_identification_pci, EMBEDDED_PDV_identification_pci);
510XER_STRUCT_COPY(CHARACTER_STRING_identification_cn , EMBEDDED_PDV_identification_cn);
511XER_STRUCT_COPY(CHARACTER_STRING_identification_cn_pci , EMBEDDED_PDV_identification_cn_pci);
512XER_STRUCT_COPY(CHARACTER_STRING_identification_cn_tsx , EMBEDDED_PDV_identification_cn_tsx);
513XER_STRUCT_COPY(CHARACTER_STRING_identification_ts , EMBEDDED_PDV_identification_ts);
514XER_STRUCT_COPY(CHARACTER_STRING_identification_fix, EMBEDDED_PDV_identification_fix);
515// this one is used for decoding only (only to check that it's absent)
516XER_STRUCT2(CHARACTER_STRING_data_value_descriptor, "data-value-descriptor");
517// this can not be folded with EMBEDDED-PDV
518XER_STRUCT2(CHARACTER_STRING_data_value, "string-value");
519
520// ASN.1 restricted character strings
521XER_STRUCT(GeneralString);
522XER_STRUCT(NumericString);
523XER_STRUCT(UTF8String);
524XER_STRUCT(PrintableString);
525XER_STRUCT(UniversalString);
526
527XER_STRUCT(BMPString);
528XER_STRUCT(GraphicString);
529XER_STRUCT(IA5String);
530XER_STRUCT(TeletexString);
531XER_STRUCT(VideotexString);
532XER_STRUCT(VisibleString);
533
534XER_STRUCT2(ASN_NULL, "NULL");
535XER_STRUCT2(ASN_ROID, "RELATIVE_OID");
536XER_STRUCT (ASN_ANY); // obsoleted by 2002
537
538// TTCN-3 types
539XER_STRUCT2(HEXSTRING, "hexstring");
540XER_STRUCT2(VERDICTTYPE, "verdicttype");
541
542/** @} */
543
544#endif /*XER_HH_*/
This page took 0.043415 seconds and 5 git commands to generate.