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