]> git.saurik.com Git - apple/security.git/blob - SecuritySNACCRuntime/c++-lib/c++/asn-useful.cpp
Security-28.tar.gz
[apple/security.git] / SecuritySNACCRuntime / c++-lib / c++ / asn-useful.cpp
1 /*
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18
19 // NOTE: this is a machine generated file--editing not recommended
20 //
21 // asn-useful.cpp - class member functions for ASN.1 module ASN-USEFUL
22 //
23 // This file was generated by snacc on Wed Jun 14 14:50:26 2000
24 // UBC snacc written by Mike Sample
25 // A couple of enhancements made by IBM European Networking Center
26
27
28 #include "asn-incl.h"
29 #include "asn-useful.h"
30
31 //------------------------------------------------------------------------------
32 // value defs
33
34
35 //------------------------------------------------------------------------------
36 // class member definitions:
37
38 AsnType *ObjectDescriptor::Clone() const
39 {
40 return new ObjectDescriptor;
41 }
42
43 AsnType *ObjectDescriptor::Copy() const
44 {
45 return new ObjectDescriptor (*this);
46 }
47
48 AsnLen ObjectDescriptor::BEnc (BUF_TYPE b)
49 {
50 AsnLen l;
51 l = BEncContent (b);
52 l += BEncDefLen (b, l);
53
54 l += BEncTag1 (b, UNIV, PRIM, OD_TAG_CODE);
55 return l;
56 }
57
58 void ObjectDescriptor::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
59 {
60 AsnTag tag;
61 AsnLen elmtLen1;
62
63 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, OD_TAG_CODE))
64 && (tag != MAKE_TAG_ID (UNIV, CONS, OD_TAG_CODE)))
65 {
66 Asn1Error << "ObjectDescriptor::BDec: ERROR - wrong tag" << endl;
67 longjmp (env, 50);
68 }
69 elmtLen1 = BDecLen (b, bytesDecoded, env);
70 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
71 }
72
73 int ObjectDescriptor::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
74 {
75 bytesEncoded = BEnc (b);
76 return !b.WriteError();
77 }
78
79 int ObjectDescriptor::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
80 {
81 ENV_TYPE env;
82 int val;
83
84 bytesDecoded = 0;
85 if ((val = setjmp (env)) == 0)
86 {
87 BDec (b, bytesDecoded, env);
88 return !b.ReadError();
89 }
90 else
91 return false;
92 }
93
94 AsnType *UTF8String::Clone() const
95 {
96 return new UTF8String;
97 }
98
99 AsnType *UTF8String::Copy() const
100 {
101 return new UTF8String (*this);
102 }
103
104 AsnLen UTF8String::BEnc (BUF_TYPE b)
105 {
106 AsnLen l;
107 l = BEncContent (b);
108 l += BEncDefLen (b, l);
109
110 l += BEncTag1 (b, UNIV, PRIM, 12);
111 return l;
112 }
113
114 void UTF8String::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
115 {
116 AsnTag tag;
117 AsnLen elmtLen1;
118
119 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, 12))
120 && (tag != MAKE_TAG_ID (UNIV, CONS, 12)))
121 {
122 Asn1Error << "UTF8String::BDec: ERROR - wrong tag" << endl;
123 longjmp (env, 49);
124 }
125 elmtLen1 = BDecLen (b, bytesDecoded, env);
126 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
127 }
128
129 int UTF8String::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
130 {
131 bytesEncoded = BEnc (b);
132 return !b.WriteError();
133 }
134
135 int UTF8String::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
136 {
137 ENV_TYPE env;
138 int val;
139
140 bytesDecoded = 0;
141 if ((val = setjmp (env)) == 0)
142 {
143 BDec (b, bytesDecoded, env);
144 return !b.ReadError();
145 }
146 else
147 return false;
148 }
149
150 AsnType *NumericString::Clone() const
151 {
152 return new NumericString;
153 }
154
155 AsnType *NumericString::Copy() const
156 {
157 return new NumericString (*this);
158 }
159
160 AsnLen NumericString::BEnc (BUF_TYPE b)
161 {
162 AsnLen l;
163 l = BEncContent (b);
164 l += BEncDefLen (b, l);
165
166 l += BEncTag1 (b, UNIV, PRIM, NUMERICSTRING_TAG_CODE);
167 return l;
168 }
169
170 void NumericString::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
171 {
172 AsnTag tag;
173 AsnLen elmtLen1;
174
175 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, NUMERICSTRING_TAG_CODE))
176 && (tag != MAKE_TAG_ID (UNIV, CONS, NUMERICSTRING_TAG_CODE)))
177 {
178 Asn1Error << "NumericString::BDec: ERROR - wrong tag" << endl;
179 longjmp (env, 48);
180 }
181 elmtLen1 = BDecLen (b, bytesDecoded, env);
182 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
183 }
184
185 int NumericString::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
186 {
187 bytesEncoded = BEnc (b);
188 return !b.WriteError();
189 }
190
191 int NumericString::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
192 {
193 ENV_TYPE env;
194 int val;
195
196 bytesDecoded = 0;
197 if ((val = setjmp (env)) == 0)
198 {
199 BDec (b, bytesDecoded, env);
200 return !b.ReadError();
201 }
202 else
203 return false;
204 }
205
206 AsnType *PrintableString::Clone() const
207 {
208 return new PrintableString;
209 }
210
211 AsnType *PrintableString::Copy() const
212 {
213 return new PrintableString (*this);
214 }
215
216 AsnLen PrintableString::BEnc (BUF_TYPE b)
217 {
218 AsnLen l;
219 l = BEncContent (b);
220 l += BEncDefLen (b, l);
221
222 l += BEncTag1 (b, UNIV, PRIM, PRINTABLESTRING_TAG_CODE);
223 return l;
224 }
225
226 void PrintableString::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
227 {
228 AsnTag tag;
229 AsnLen elmtLen1;
230
231 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, PRINTABLESTRING_TAG_CODE))
232 && (tag != MAKE_TAG_ID (UNIV, CONS, PRINTABLESTRING_TAG_CODE)))
233 {
234 Asn1Error << "PrintableString::BDec: ERROR - wrong tag" << endl;
235 longjmp (env, 47);
236 }
237 elmtLen1 = BDecLen (b, bytesDecoded, env);
238 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
239 }
240
241 int PrintableString::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
242 {
243 bytesEncoded = BEnc (b);
244 return !b.WriteError();
245 }
246
247 int PrintableString::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
248 {
249 ENV_TYPE env;
250 int val;
251
252 bytesDecoded = 0;
253 if ((val = setjmp (env)) == 0)
254 {
255 BDec (b, bytesDecoded, env);
256 return !b.ReadError();
257 }
258 else
259 return false;
260 }
261
262 AsnType *TeletexString::Clone() const
263 {
264 return new TeletexString;
265 }
266
267 AsnType *TeletexString::Copy() const
268 {
269 return new TeletexString (*this);
270 }
271
272 AsnLen TeletexString::BEnc (BUF_TYPE b)
273 {
274 AsnLen l;
275 l = BEncContent (b);
276 l += BEncDefLen (b, l);
277
278 l += BEncTag1 (b, UNIV, PRIM, TELETEXSTRING_TAG_CODE);
279 return l;
280 }
281
282 void TeletexString::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
283 {
284 AsnTag tag;
285 AsnLen elmtLen1;
286
287 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, TELETEXSTRING_TAG_CODE))
288 && (tag != MAKE_TAG_ID (UNIV, CONS, TELETEXSTRING_TAG_CODE)))
289 {
290 Asn1Error << "TeletexString::BDec: ERROR - wrong tag" << endl;
291 longjmp (env, 46);
292 }
293 elmtLen1 = BDecLen (b, bytesDecoded, env);
294 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
295 }
296
297 int TeletexString::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
298 {
299 bytesEncoded = BEnc (b);
300 return !b.WriteError();
301 }
302
303 int TeletexString::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
304 {
305 ENV_TYPE env;
306 int val;
307
308 bytesDecoded = 0;
309 if ((val = setjmp (env)) == 0)
310 {
311 BDec (b, bytesDecoded, env);
312 return !b.ReadError();
313 }
314 else
315 return false;
316 }
317
318 AsnType *T61String::Clone() const
319 {
320 return new T61String;
321 }
322
323 AsnType *T61String::Copy() const
324 {
325 return new T61String (*this);
326 }
327
328 AsnLen T61String::BEnc (BUF_TYPE b)
329 {
330 AsnLen l;
331 l = BEncContent (b);
332 l += BEncDefLen (b, l);
333
334 l += BEncTag1 (b, UNIV, PRIM, TELETEXSTRING_TAG_CODE);
335 return l;
336 }
337
338 void T61String::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
339 {
340 AsnTag tag;
341 AsnLen elmtLen1;
342
343 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, TELETEXSTRING_TAG_CODE))
344 && (tag != MAKE_TAG_ID (UNIV, CONS, TELETEXSTRING_TAG_CODE)))
345 {
346 Asn1Error << "T61String::BDec: ERROR - wrong tag" << endl;
347 longjmp (env, 45);
348 }
349 elmtLen1 = BDecLen (b, bytesDecoded, env);
350 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
351 }
352
353 int T61String::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
354 {
355 bytesEncoded = BEnc (b);
356 return !b.WriteError();
357 }
358
359 int T61String::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
360 {
361 ENV_TYPE env;
362 int val;
363
364 bytesDecoded = 0;
365 if ((val = setjmp (env)) == 0)
366 {
367 BDec (b, bytesDecoded, env);
368 return !b.ReadError();
369 }
370 else
371 return false;
372 }
373
374 AsnType *VideotexString::Clone() const
375 {
376 return new VideotexString;
377 }
378
379 AsnType *VideotexString::Copy() const
380 {
381 return new VideotexString (*this);
382 }
383
384 AsnLen VideotexString::BEnc (BUF_TYPE b)
385 {
386 AsnLen l;
387 l = BEncContent (b);
388 l += BEncDefLen (b, l);
389
390 l += BEncTag1 (b, UNIV, PRIM, VIDEOTEXSTRING_TAG_CODE);
391 return l;
392 }
393
394 void VideotexString::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
395 {
396 AsnTag tag;
397 AsnLen elmtLen1;
398
399 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, VIDEOTEXSTRING_TAG_CODE))
400 && (tag != MAKE_TAG_ID (UNIV, CONS, VIDEOTEXSTRING_TAG_CODE)))
401 {
402 Asn1Error << "VideotexString::BDec: ERROR - wrong tag" << endl;
403 longjmp (env, 44);
404 }
405 elmtLen1 = BDecLen (b, bytesDecoded, env);
406 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
407 }
408
409 int VideotexString::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
410 {
411 bytesEncoded = BEnc (b);
412 return !b.WriteError();
413 }
414
415 int VideotexString::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
416 {
417 ENV_TYPE env;
418 int val;
419
420 bytesDecoded = 0;
421 if ((val = setjmp (env)) == 0)
422 {
423 BDec (b, bytesDecoded, env);
424 return !b.ReadError();
425 }
426 else
427 return false;
428 }
429
430 AsnType *IA5String::Clone() const
431 {
432 return new IA5String;
433 }
434
435 AsnType *IA5String::Copy() const
436 {
437 return new IA5String (*this);
438 }
439
440 AsnLen IA5String::BEnc (BUF_TYPE b)
441 {
442 AsnLen l;
443 l = BEncContent (b);
444 l += BEncDefLen (b, l);
445
446 l += BEncTag1 (b, UNIV, PRIM, IA5STRING_TAG_CODE);
447 return l;
448 }
449
450 void IA5String::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
451 {
452 AsnTag tag;
453 AsnLen elmtLen1;
454
455 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, IA5STRING_TAG_CODE))
456 && (tag != MAKE_TAG_ID (UNIV, CONS, IA5STRING_TAG_CODE)))
457 {
458 Asn1Error << "IA5String::BDec: ERROR - wrong tag" << endl;
459 longjmp (env, 43);
460 }
461 elmtLen1 = BDecLen (b, bytesDecoded, env);
462 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
463 }
464
465 int IA5String::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
466 {
467 bytesEncoded = BEnc (b);
468 return !b.WriteError();
469 }
470
471 int IA5String::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
472 {
473 ENV_TYPE env;
474 int val;
475
476 bytesDecoded = 0;
477 if ((val = setjmp (env)) == 0)
478 {
479 BDec (b, bytesDecoded, env);
480 return !b.ReadError();
481 }
482 else
483 return false;
484 }
485
486 AsnType *GraphicString::Clone() const
487 {
488 return new GraphicString;
489 }
490
491 AsnType *GraphicString::Copy() const
492 {
493 return new GraphicString (*this);
494 }
495
496 AsnLen GraphicString::BEnc (BUF_TYPE b)
497 {
498 AsnLen l;
499 l = BEncContent (b);
500 l += BEncDefLen (b, l);
501
502 l += BEncTag1 (b, UNIV, PRIM, GRAPHICSTRING_TAG_CODE);
503 return l;
504 }
505
506 void GraphicString::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
507 {
508 AsnTag tag;
509 AsnLen elmtLen1;
510
511 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, GRAPHICSTRING_TAG_CODE))
512 && (tag != MAKE_TAG_ID (UNIV, CONS, GRAPHICSTRING_TAG_CODE)))
513 {
514 Asn1Error << "GraphicString::BDec: ERROR - wrong tag" << endl;
515 longjmp (env, 42);
516 }
517 elmtLen1 = BDecLen (b, bytesDecoded, env);
518 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
519 }
520
521 int GraphicString::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
522 {
523 bytesEncoded = BEnc (b);
524 return !b.WriteError();
525 }
526
527 int GraphicString::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
528 {
529 ENV_TYPE env;
530 int val;
531
532 bytesDecoded = 0;
533 if ((val = setjmp (env)) == 0)
534 {
535 BDec (b, bytesDecoded, env);
536 return !b.ReadError();
537 }
538 else
539 return false;
540 }
541
542 AsnType *VisibleString::Clone() const
543 {
544 return new VisibleString;
545 }
546
547 AsnType *VisibleString::Copy() const
548 {
549 return new VisibleString (*this);
550 }
551
552 AsnLen VisibleString::BEnc (BUF_TYPE b)
553 {
554 AsnLen l;
555 l = BEncContent (b);
556 l += BEncDefLen (b, l);
557
558 l += BEncTag1 (b, UNIV, PRIM, VISIBLESTRING_TAG_CODE);
559 return l;
560 }
561
562 void VisibleString::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
563 {
564 AsnTag tag;
565 AsnLen elmtLen1;
566
567 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, VISIBLESTRING_TAG_CODE))
568 && (tag != MAKE_TAG_ID (UNIV, CONS, VISIBLESTRING_TAG_CODE)))
569 {
570 Asn1Error << "VisibleString::BDec: ERROR - wrong tag" << endl;
571 longjmp (env, 41);
572 }
573 elmtLen1 = BDecLen (b, bytesDecoded, env);
574 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
575 }
576
577 int VisibleString::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
578 {
579 bytesEncoded = BEnc (b);
580 return !b.WriteError();
581 }
582
583 int VisibleString::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
584 {
585 ENV_TYPE env;
586 int val;
587
588 bytesDecoded = 0;
589 if ((val = setjmp (env)) == 0)
590 {
591 BDec (b, bytesDecoded, env);
592 return !b.ReadError();
593 }
594 else
595 return false;
596 }
597
598 AsnType *ISO646String::Clone() const
599 {
600 return new ISO646String;
601 }
602
603 AsnType *ISO646String::Copy() const
604 {
605 return new ISO646String (*this);
606 }
607
608 AsnLen ISO646String::BEnc (BUF_TYPE b)
609 {
610 AsnLen l;
611 l = BEncContent (b);
612 l += BEncDefLen (b, l);
613
614 l += BEncTag1 (b, UNIV, PRIM, VISIBLESTRING_TAG_CODE);
615 return l;
616 }
617
618 void ISO646String::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
619 {
620 AsnTag tag;
621 AsnLen elmtLen1;
622
623 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, VISIBLESTRING_TAG_CODE))
624 && (tag != MAKE_TAG_ID (UNIV, CONS, VISIBLESTRING_TAG_CODE)))
625 {
626 Asn1Error << "ISO646String::BDec: ERROR - wrong tag" << endl;
627 longjmp (env, 40);
628 }
629 elmtLen1 = BDecLen (b, bytesDecoded, env);
630 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
631 }
632
633 int ISO646String::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
634 {
635 bytesEncoded = BEnc (b);
636 return !b.WriteError();
637 }
638
639 int ISO646String::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
640 {
641 ENV_TYPE env;
642 int val;
643
644 bytesDecoded = 0;
645 if ((val = setjmp (env)) == 0)
646 {
647 BDec (b, bytesDecoded, env);
648 return !b.ReadError();
649 }
650 else
651 return false;
652 }
653
654 AsnType *GeneralString::Clone() const
655 {
656 return new GeneralString;
657 }
658
659 AsnType *GeneralString::Copy() const
660 {
661 return new GeneralString (*this);
662 }
663
664 AsnLen GeneralString::BEnc (BUF_TYPE b)
665 {
666 AsnLen l;
667 l = BEncContent (b);
668 l += BEncDefLen (b, l);
669
670 l += BEncTag1 (b, UNIV, PRIM, GENERALSTRING_TAG_CODE);
671 return l;
672 }
673
674 void GeneralString::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
675 {
676 AsnTag tag;
677 AsnLen elmtLen1;
678
679 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, GENERALSTRING_TAG_CODE))
680 && (tag != MAKE_TAG_ID (UNIV, CONS, GENERALSTRING_TAG_CODE)))
681 {
682 Asn1Error << "GeneralString::BDec: ERROR - wrong tag" << endl;
683 longjmp (env, 39);
684 }
685 elmtLen1 = BDecLen (b, bytesDecoded, env);
686 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
687 }
688
689 int GeneralString::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
690 {
691 bytesEncoded = BEnc (b);
692 return !b.WriteError();
693 }
694
695 int GeneralString::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
696 {
697 ENV_TYPE env;
698 int val;
699
700 bytesDecoded = 0;
701 if ((val = setjmp (env)) == 0)
702 {
703 BDec (b, bytesDecoded, env);
704 return !b.ReadError();
705 }
706 else
707 return false;
708 }
709
710 AsnType *UTCTime::Clone() const
711 {
712 return new UTCTime;
713 }
714
715 AsnType *UTCTime::Copy() const
716 {
717 return new UTCTime (*this);
718 }
719
720 AsnLen UTCTime::BEnc (BUF_TYPE b)
721 {
722 AsnLen l;
723 l = BEncContent (b);
724 l += BEncDefLen (b, l);
725
726 l += BEncTag1 (b, UNIV, PRIM, UTCTIME_TAG_CODE);
727 return l;
728 }
729
730 void UTCTime::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
731 {
732 AsnTag tag;
733 AsnLen elmtLen1;
734
735 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, UTCTIME_TAG_CODE))
736 && (tag != MAKE_TAG_ID (UNIV, CONS, UTCTIME_TAG_CODE)))
737 {
738 Asn1Error << "UTCTime::BDec: ERROR - wrong tag" << endl;
739 longjmp (env, 38);
740 }
741 elmtLen1 = BDecLen (b, bytesDecoded, env);
742 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
743 }
744
745 int UTCTime::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
746 {
747 bytesEncoded = BEnc (b);
748 return !b.WriteError();
749 }
750
751 int UTCTime::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
752 {
753 ENV_TYPE env;
754 int val;
755
756 bytesDecoded = 0;
757 if ((val = setjmp (env)) == 0)
758 {
759 BDec (b, bytesDecoded, env);
760 return !b.ReadError();
761 }
762 else
763 return false;
764 }
765
766 AsnType *GeneralizedTime::Clone() const
767 {
768 return new GeneralizedTime;
769 }
770
771 AsnType *GeneralizedTime::Copy() const
772 {
773 return new GeneralizedTime (*this);
774 }
775
776 AsnLen GeneralizedTime::BEnc (BUF_TYPE b)
777 {
778 AsnLen l;
779 l = BEncContent (b);
780 l += BEncDefLen (b, l);
781
782 l += BEncTag1 (b, UNIV, PRIM, GENERALIZEDTIME_TAG_CODE);
783 return l;
784 }
785
786 void GeneralizedTime::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
787 {
788 AsnTag tag;
789 AsnLen elmtLen1;
790
791 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, GENERALIZEDTIME_TAG_CODE))
792 && (tag != MAKE_TAG_ID (UNIV, CONS, GENERALIZEDTIME_TAG_CODE)))
793 {
794 Asn1Error << "GeneralizedTime::BDec: ERROR - wrong tag" << endl;
795 longjmp (env, 37);
796 }
797 elmtLen1 = BDecLen (b, bytesDecoded, env);
798 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
799 }
800
801 int GeneralizedTime::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
802 {
803 bytesEncoded = BEnc (b);
804 return !b.WriteError();
805 }
806
807 int GeneralizedTime::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
808 {
809 ENV_TYPE env;
810 int val;
811
812 bytesDecoded = 0;
813 if ((val = setjmp (env)) == 0)
814 {
815 BDec (b, bytesDecoded, env);
816 return !b.ReadError();
817 }
818 else
819 return false;
820 }
821
822 AsnType *UniversalString::Clone() const
823 {
824 return new UniversalString;
825 }
826
827 AsnType *UniversalString::Copy() const
828 {
829 return new UniversalString (*this);
830 }
831
832 AsnLen UniversalString::BEnc (BUF_TYPE b)
833 {
834 AsnLen l;
835 l = BEncContent (b);
836 l += BEncDefLen (b, l);
837
838 l += BEncTag1 (b, UNIV, PRIM, UNIVERSALSTRING_TAG_CODE);
839 return l;
840 }
841
842 void UniversalString::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
843 {
844 AsnTag tag;
845 AsnLen elmtLen1;
846
847 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, UNIVERSALSTRING_TAG_CODE))
848 && (tag != MAKE_TAG_ID (UNIV, CONS, UNIVERSALSTRING_TAG_CODE)))
849 {
850 Asn1Error << "UniversalString::BDec: ERROR - wrong tag" << endl;
851 longjmp (env, 36);
852 }
853 elmtLen1 = BDecLen (b, bytesDecoded, env);
854 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
855 }
856
857 int UniversalString::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
858 {
859 bytesEncoded = BEnc (b);
860 return !b.WriteError();
861 }
862
863 int UniversalString::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
864 {
865 ENV_TYPE env;
866 int val;
867
868 bytesDecoded = 0;
869 if ((val = setjmp (env)) == 0)
870 {
871 BDec (b, bytesDecoded, env);
872 return !b.ReadError();
873 }
874 else
875 return false;
876 }
877
878 AsnType *BMPString::Clone() const
879 {
880 return new BMPString;
881 }
882
883 AsnType *BMPString::Copy() const
884 {
885 return new BMPString (*this);
886 }
887
888 AsnLen BMPString::BEnc (BUF_TYPE b)
889 {
890 AsnLen l;
891 l = BEncContent (b);
892 l += BEncDefLen (b, l);
893
894 l += BEncTag1 (b, UNIV, PRIM, BMPSTRING_TAG_CODE);
895 return l;
896 }
897
898 void BMPString::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
899 {
900 AsnTag tag;
901 AsnLen elmtLen1;
902
903 if (((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, PRIM, BMPSTRING_TAG_CODE))
904 && (tag != MAKE_TAG_ID (UNIV, CONS, BMPSTRING_TAG_CODE)))
905 {
906 Asn1Error << "BMPString::BDec: ERROR - wrong tag" << endl;
907 longjmp (env, 35);
908 }
909 elmtLen1 = BDecLen (b, bytesDecoded, env);
910 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
911 }
912
913 int BMPString::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
914 {
915 bytesEncoded = BEnc (b);
916 return !b.WriteError();
917 }
918
919 int BMPString::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
920 {
921 ENV_TYPE env;
922 int val;
923
924 bytesDecoded = 0;
925 if ((val = setjmp (env)) == 0)
926 {
927 BDec (b, bytesDecoded, env);
928 return !b.ReadError();
929 }
930 else
931 return false;
932 }
933
934 EXTERNALChoice::EXTERNALChoice()
935 {
936 choiceId = single_ASN1_typeCid;
937 #if TCL
938 single_ASN1_type = new AsnOcts;
939 #else
940 single_ASN1_type = NULL; // incomplete initialization of mandatory element!
941 #endif // TCL
942 }
943
944 EXTERNALChoice::EXTERNALChoice (const EXTERNALChoice &)
945 {
946 Asn1Error << "use of incompletely defined EXTERNALChoice::EXTERNALChoice (const EXTERNALChoice &)" << endl;
947 abort();
948 }
949
950 EXTERNALChoice::~EXTERNALChoice()
951 {
952 switch (choiceId)
953 {
954 case single_ASN1_typeCid:
955 delete single_ASN1_type;
956 break;
957 case octet_alignedCid:
958 delete octet_aligned;
959 break;
960 case arbitraryCid:
961 delete arbitrary;
962 break;
963 } // end of switch
964 } // end of destructor
965
966 AsnType *EXTERNALChoice::Clone() const
967 {
968 return new EXTERNALChoice;
969 }
970
971 AsnType *EXTERNALChoice::Copy() const
972 {
973 return new EXTERNALChoice (*this);
974 }
975
976 #if SNACC_DEEP_COPY
977 EXTERNALChoice &EXTERNALChoice::operator = (const EXTERNALChoice &that)
978 #else // SNACC_DEEP_COPY
979 EXTERNALChoice &EXTERNALChoice::operator = (const EXTERNALChoice &)
980 #endif // SNACC_DEEP_COPY
981 {
982 #if SNACC_DEEP_COPY
983 if (this != &that)
984 {
985 switch (choiceId)
986 {
987 case single_ASN1_typeCid:
988 delete single_ASN1_type;
989 break;
990 case octet_alignedCid:
991 delete octet_aligned;
992 break;
993 case arbitraryCid:
994 delete arbitrary;
995 break;
996 }
997 switch (choiceId = that.choiceId)
998 {
999 case single_ASN1_typeCid:
1000 single_ASN1_type = new AsnOcts;
1001 *single_ASN1_type = *that.single_ASN1_type;
1002 break;
1003 case octet_alignedCid:
1004 octet_aligned = new AsnOcts;
1005 *octet_aligned = *that.octet_aligned;
1006 break;
1007 case arbitraryCid:
1008 arbitrary = new AsnBits;
1009 *arbitrary = *that.arbitrary;
1010 break;
1011 }
1012 }
1013
1014 return *this;
1015 #else // SNACC_DEEP_COPY
1016 Asn1Error << "use of incompletely defined EXTERNALChoice &EXTERNALChoice::operator = (const EXTERNALChoice &)" << endl;
1017 abort();
1018 // if your compiler complains here, check the -novolat option
1019 #endif // SNACC_DEEP_COPY
1020 }
1021
1022 AsnLen
1023 EXTERNALChoice::BEncContent (BUF_TYPE b)
1024 {
1025 AsnLen l;
1026 switch (choiceId)
1027 {
1028 case single_ASN1_typeCid:
1029 BEncEocIfNec (b);
1030 l = single_ASN1_type->BEncContent (b);
1031 l += BEncDefLen (b, l);
1032
1033 l += BEncTag1 (b, UNIV, PRIM, OCTETSTRING_TAG_CODE);
1034 l += BEncConsLen (b, l);
1035
1036 l += BEncTag1 (b, CNTX, CONS, 0);
1037 break;
1038
1039 case octet_alignedCid:
1040 l = octet_aligned->BEncContent (b);
1041 l += BEncDefLen (b, l);
1042
1043 l += BEncTag1 (b, CNTX, PRIM, 1);
1044 break;
1045
1046 case arbitraryCid:
1047 l = arbitrary->BEncContent (b);
1048 l += BEncDefLen (b, l);
1049
1050 l += BEncTag1 (b, CNTX, PRIM, 2);
1051 break;
1052
1053 } // end switch
1054 return l;
1055 } // EXTERNALChoice::BEncContent
1056
1057
1058 void EXTERNALChoice::BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env)
1059 {
1060 AsnLen elmtLen1;
1061 switch (tag)
1062 {
1063 case MAKE_TAG_ID (CNTX, CONS, 0):
1064 tag = BDecTag (b, bytesDecoded, env);
1065 if ((tag != MAKE_TAG_ID (UNIV, PRIM, OCTETSTRING_TAG_CODE))
1066 && (tag != MAKE_TAG_ID (UNIV, CONS, OCTETSTRING_TAG_CODE)))
1067 {
1068 Asn1Error << "Unexpected Tag" << endl;
1069 longjmp (env, 34);
1070 }
1071
1072 elmtLen1 = BDecLen (b, bytesDecoded, env);
1073 choiceId = single_ASN1_typeCid;
1074 single_ASN1_type = new AsnOcts;
1075 single_ASN1_type->BDecContent (b, tag, elmtLen1, bytesDecoded, env);
1076 if (elmtLen0 == INDEFINITE_LEN)
1077 BDecEoc (b, bytesDecoded, env);
1078 break;
1079
1080 case MAKE_TAG_ID (CNTX, PRIM, 1):
1081 case MAKE_TAG_ID (CNTX, CONS, 1):
1082 choiceId = octet_alignedCid;
1083 octet_aligned = new AsnOcts;
1084 octet_aligned->BDecContent (b, tag, elmtLen0, bytesDecoded, env);
1085 break;
1086
1087 case MAKE_TAG_ID (CNTX, PRIM, 2):
1088 case MAKE_TAG_ID (CNTX, CONS, 2):
1089 choiceId = arbitraryCid;
1090 arbitrary = new AsnBits;
1091 arbitrary->BDecContent (b, tag, elmtLen0, bytesDecoded, env);
1092 break;
1093
1094 default:
1095 Asn1Error << "ERROR - unexpected tag in CHOICE" << endl;
1096 longjmp (env, 33);
1097 break;
1098 } // end switch
1099 } // EXTERNALChoice::BDecContent
1100
1101
1102 AsnLen EXTERNALChoice::BEnc (BUF_TYPE b)
1103 {
1104 AsnLen l;
1105 l = BEncContent (b);
1106 return l;
1107 }
1108
1109 void EXTERNALChoice::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
1110 {
1111 AsnLen elmtLen;
1112 AsnTag tag;
1113
1114 /* CHOICEs are a special case - grab identifying tag */
1115 /* this allows easier handling of nested CHOICEs */
1116 tag = BDecTag (b, bytesDecoded, env);
1117 elmtLen = BDecLen (b, bytesDecoded, env);
1118 BDecContent (b, tag, elmtLen, bytesDecoded, env);
1119 }
1120
1121 int EXTERNALChoice::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
1122 {
1123 bytesEncoded = BEnc (b);
1124 return !b.WriteError();
1125 }
1126
1127 int EXTERNALChoice::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
1128 {
1129 ENV_TYPE env;
1130 int val;
1131
1132 bytesDecoded = 0;
1133 if ((val = setjmp (env)) == 0)
1134 {
1135 BDec (b, bytesDecoded, env);
1136 return !b.ReadError();
1137 }
1138 else
1139 return false;
1140 }
1141
1142 void EXTERNALChoice::Print (ostream &os) const
1143 {
1144 #ifndef NDEBUG
1145 switch (choiceId)
1146 {
1147 case single_ASN1_typeCid:
1148 os << "single-ASN1-type ";
1149 if (single_ASN1_type)
1150 os << *single_ASN1_type;
1151 else
1152 os << "-- void3 --\n";
1153 break;
1154
1155 case octet_alignedCid:
1156 os << "octet-aligned ";
1157 if (octet_aligned)
1158 os << *octet_aligned;
1159 else
1160 os << "-- void3 --\n";
1161 break;
1162
1163 case arbitraryCid:
1164 os << "arbitrary ";
1165 if (arbitrary)
1166 os << *arbitrary;
1167 else
1168 os << "-- void3 --\n";
1169 break;
1170
1171 } // end of switch
1172 #endif /* NDEBUG */
1173 } // EXTERNALChoice::Print
1174
1175 EXTERNAL::EXTERNAL()
1176 {
1177 direct_reference = NULL;
1178 indirect_reference = NULL;
1179 data_value_descriptor = NULL;
1180 #if TCL
1181 encoding = new EXTERNALChoice;
1182 #else
1183 encoding = NULL; // incomplete initialization of mandatory element!
1184 #endif // TCL
1185 }
1186
1187 EXTERNAL::EXTERNAL (const EXTERNAL &)
1188 {
1189 Asn1Error << "use of incompletely defined EXTERNAL::EXTERNAL (const EXTERNAL &)" << endl;
1190 abort();
1191 }
1192
1193 EXTERNAL::~EXTERNAL()
1194 {
1195 delete direct_reference;
1196 delete indirect_reference;
1197 delete data_value_descriptor;
1198 delete encoding;
1199 }
1200
1201 AsnType *EXTERNAL::Clone() const
1202 {
1203 return new EXTERNAL;
1204 }
1205
1206 AsnType *EXTERNAL::Copy() const
1207 {
1208 return new EXTERNAL (*this);
1209 }
1210
1211 #if SNACC_DEEP_COPY
1212 EXTERNAL &EXTERNAL::operator = (const EXTERNAL &that)
1213 #else // SNACC_DEEP_COPY
1214 EXTERNAL &EXTERNAL::operator = (const EXTERNAL &)
1215 #endif // SNACC_DEEP_COPY
1216 {
1217 #if SNACC_DEEP_COPY
1218 if (this != &that)
1219 {
1220 if (that.direct_reference)
1221 {
1222 if (!direct_reference)
1223 direct_reference = new AsnOid;
1224 *direct_reference = *that.direct_reference;
1225 }
1226 else
1227 {
1228 delete direct_reference;
1229 direct_reference = NULL;
1230 }
1231 if (that.indirect_reference)
1232 {
1233 if (!indirect_reference)
1234 indirect_reference = new AsnInt;
1235 *indirect_reference = *that.indirect_reference;
1236 }
1237 else
1238 {
1239 delete indirect_reference;
1240 indirect_reference = NULL;
1241 }
1242 if (that.data_value_descriptor)
1243 {
1244 if (!data_value_descriptor)
1245 data_value_descriptor = new ObjectDescriptor;
1246 *data_value_descriptor = *that.data_value_descriptor;
1247 }
1248 else
1249 {
1250 delete data_value_descriptor;
1251 data_value_descriptor = NULL;
1252 }
1253 if (that.encoding)
1254 {
1255 if (!encoding)
1256 encoding = new EXTERNALChoice;
1257 *encoding = *that.encoding;
1258 }
1259 else
1260 {
1261 delete encoding;
1262 encoding = NULL;
1263 }
1264 }
1265
1266 return *this;
1267 #else // SNACC_DEEP_COPY
1268 Asn1Error << "use of incompletely defined EXTERNAL &EXTERNAL::operator = (const EXTERNAL &)" << endl;
1269 abort();
1270 // if your compiler complains here, check the -novolat option
1271 #endif // SNACC_DEEP_COPY
1272 }
1273
1274 AsnLen
1275 EXTERNAL::BEncContent (BUF_TYPE b)
1276 {
1277 AsnLen totalLen = 0;
1278 AsnLen l;
1279
1280 l = encoding->BEncContent (b);
1281 totalLen += l;
1282
1283 if (NOT_NULL (data_value_descriptor))
1284 {
1285 l = data_value_descriptor->BEncContent (b);
1286 l += BEncDefLen (b, l);
1287
1288 l += BEncTag1 (b, UNIV, PRIM, OD_TAG_CODE);
1289 totalLen += l;
1290 }
1291
1292 if (NOT_NULL (indirect_reference))
1293 {
1294 l = indirect_reference->BEncContent (b);
1295 BEncDefLenTo127 (b, l);
1296 l++;
1297
1298 l += BEncTag1 (b, UNIV, PRIM, INTEGER_TAG_CODE);
1299 totalLen += l;
1300 }
1301
1302 if (NOT_NULL (direct_reference))
1303 {
1304 l = direct_reference->BEncContent (b);
1305 l += BEncDefLen (b, l);
1306
1307 l += BEncTag1 (b, UNIV, PRIM, OID_TAG_CODE);
1308 totalLen += l;
1309 }
1310
1311 return totalLen;
1312 } // EXTERNAL::BEncContent
1313
1314
1315 void EXTERNAL::BDecContent (BUF_TYPE b, AsnTag /*tag0*/, AsnLen elmtLen0, AsnLen &bytesDecoded, ENV_TYPE env)
1316 {
1317 AsnTag tag1;
1318 AsnLen seqBytesDecoded = 0;
1319 AsnLen elmtLen1;
1320 tag1 = BDecTag (b, seqBytesDecoded, env);
1321
1322 if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OID_TAG_CODE)))
1323 {
1324 elmtLen1 = BDecLen (b, seqBytesDecoded, env);
1325 direct_reference = new AsnOid;
1326 direct_reference->BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env);
1327 tag1 = BDecTag (b, seqBytesDecoded, env);
1328 }
1329
1330 if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, INTEGER_TAG_CODE)))
1331 {
1332 elmtLen1 = BDecLen (b, seqBytesDecoded, env);
1333 indirect_reference = new AsnInt;
1334 indirect_reference->BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env);
1335 tag1 = BDecTag (b, seqBytesDecoded, env);
1336 }
1337
1338 if ((tag1 == MAKE_TAG_ID (UNIV, PRIM, OD_TAG_CODE))
1339 || (tag1 == MAKE_TAG_ID (UNIV, CONS, OD_TAG_CODE)))
1340 {
1341 elmtLen1 = BDecLen (b, seqBytesDecoded, env);
1342 data_value_descriptor = new ObjectDescriptor;
1343 data_value_descriptor->BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env);
1344 tag1 = BDecTag (b, seqBytesDecoded, env);
1345 }
1346
1347 if ((tag1 == MAKE_TAG_ID (CNTX, CONS, 0))
1348 || (tag1 == MAKE_TAG_ID (CNTX, PRIM, 1))
1349 || (tag1 == MAKE_TAG_ID (CNTX, CONS, 1))
1350 || (tag1 == MAKE_TAG_ID (CNTX, PRIM, 2))
1351 || (tag1 == MAKE_TAG_ID (CNTX, CONS, 2)))
1352 {
1353 elmtLen1 = BDecLen (b, seqBytesDecoded, env);
1354 encoding = new EXTERNALChoice;
1355 encoding->BDecContent (b, tag1, elmtLen1, seqBytesDecoded, env);
1356 }
1357 else
1358 {
1359 Asn1Error << "ERROR - SEQUENCE is missing non-optional elmt." << endl;
1360 longjmp (env, 32);
1361 }
1362
1363 bytesDecoded += seqBytesDecoded;
1364 if (elmtLen0 == INDEFINITE_LEN)
1365 {
1366 BDecEoc (b, bytesDecoded, env);
1367 return;
1368 }
1369 else if (seqBytesDecoded != elmtLen0)
1370 {
1371 Asn1Error << "ERROR - Length discrepancy on sequence." << endl;
1372 longjmp (env, 31);
1373 }
1374 else
1375 return;
1376 } // EXTERNAL::BDecContent
1377
1378 AsnLen EXTERNAL::BEnc (BUF_TYPE b)
1379 {
1380 AsnLen l;
1381 l = BEncContent (b);
1382 l += BEncConsLen (b, l);
1383 l += BEncTag1 (b, UNIV, CONS, EXTERNAL_TAG_CODE);
1384 return l;
1385 }
1386
1387 void EXTERNAL::BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env)
1388 {
1389 AsnTag tag;
1390 AsnLen elmtLen1;
1391
1392 if ((tag = BDecTag (b, bytesDecoded, env)) != MAKE_TAG_ID (UNIV, CONS, EXTERNAL_TAG_CODE))
1393 {
1394 Asn1Error << "EXTERNAL::BDec: ERROR - wrong tag" << endl;
1395 longjmp (env, 30);
1396 }
1397 elmtLen1 = BDecLen (b, bytesDecoded, env);
1398 BDecContent (b, tag, elmtLen1, bytesDecoded, env);
1399 }
1400
1401 int EXTERNAL::BEncPdu (BUF_TYPE b, AsnLen &bytesEncoded)
1402 {
1403 bytesEncoded = BEnc (b);
1404 return !b.WriteError();
1405 }
1406
1407 int EXTERNAL::BDecPdu (BUF_TYPE b, AsnLen &bytesDecoded)
1408 {
1409 ENV_TYPE env;
1410 int val;
1411
1412 bytesDecoded = 0;
1413 if ((val = setjmp (env)) == 0)
1414 {
1415 BDec (b, bytesDecoded, env);
1416 return !b.ReadError();
1417 }
1418 else
1419 return false;
1420 }
1421
1422 void EXTERNAL::Print (ostream &os) const
1423 {
1424 #ifndef NDEBUG
1425 os << "{ -- SEQUENCE --" << endl;
1426 indentG += stdIndentG;
1427
1428 if (NOT_NULL (direct_reference))
1429 {
1430 Indent (os, indentG);
1431 os << "direct-reference ";
1432 os << *direct_reference;
1433 }
1434 else
1435 {
1436 Indent (os, indentG);
1437 os << "direct-reference ";
1438 os << "-- void --";
1439 os << "," << endl;
1440 }
1441
1442 if (NOT_NULL (indirect_reference))
1443 {
1444 Indent (os, indentG);
1445 os << "indirect-reference ";
1446 os << *indirect_reference;
1447 }
1448 else
1449 {
1450 Indent (os, indentG);
1451 os << "indirect-reference ";
1452 os << "-- void --";
1453 os << "," << endl;
1454 }
1455
1456 if (NOT_NULL (data_value_descriptor))
1457 {
1458 Indent (os, indentG);
1459 os << "data-value-descriptor ";
1460 os << *data_value_descriptor;
1461 }
1462 else
1463 {
1464 Indent (os, indentG);
1465 os << "data-value-descriptor ";
1466 os << "-- void --";
1467 os << "," << endl;
1468 }
1469
1470 if (NOT_NULL (encoding))
1471 {
1472 Indent (os, indentG);
1473 os << "encoding ";
1474 os << *encoding;
1475 }
1476 else
1477 {
1478 Indent (os, indentG);
1479 os << "encoding ";
1480 os << "-- void --";
1481 os << endl;
1482 }
1483
1484 os << endl;
1485 indentG -= stdIndentG;
1486 Indent (os, indentG);
1487 os << "}";
1488 #endif /* NDEBUG */
1489 } // EXTERNAL::Print
1490
1491