]> git.saurik.com Git - apple/security.git/blob - SecurityASN1/inc/sm_x411mtsas.h
Security-54.tar.gz
[apple/security.git] / SecurityASN1 / inc / sm_x411mtsas.h
1 // NOTE: this is a machine generated file--editing not recommended
2 //
3 // sm_x411mtsas.h - class definitions for ASN.1 module MTSAbstractService
4 //
5 // This file was generated by snacc on Mon Apr 22 22:34:19 2002
6 // UBC snacc by Mike Sample
7 // A couple of enhancements made by IBM European Networking Center
8
9 #ifndef _sm_x411mtsas_h_
10 #define _sm_x411mtsas_h_
11
12
13 //------------------------------------------------------------------------------
14 // class declarations:
15
16 class CountryName;
17 class AdministrationDomainName;
18 class PrivateDomainName;
19 class PersonalName;
20 class DomainDefinedAttribute;
21 class ExtensionAttribute;
22 class TeletexDomainDefinedAttribute;
23 class OrganizationUnitNames;
24 class DomainDefinedAttributes;
25 class ExtensionAttributes;
26 class StandardAttributes;
27 class ORAddress;
28 class TeletexPersonalName;
29 class TeletexOrganizationUnitNames;
30 class TeletexDomainDefinedAttributes;
31
32 //------------------------------------------------------------------------------
33 // class definitions:
34
35 typedef enum MTSAbstractServiceAnyId
36 {
37
38 } MTSAbstractServiceAnyId;
39
40
41 class CountryName: public AsnType
42 {
43 public:
44 enum ChoiceIdEnum
45 {
46 x121_dcc_codeCid = 0,
47 iso_3166_alpha2_codeCid = 1
48 };
49
50 enum ChoiceIdEnum choiceId;
51 union
52 {
53 NumericString *x121_dcc_code;
54 PrintableString *iso_3166_alpha2_code;
55 };
56
57
58 CountryName();
59 CountryName (const CountryName &);
60 virtual ~CountryName();
61
62 virtual AsnType *Clone() const;
63
64 virtual AsnType *Copy() const;
65
66 CountryName &operator = (const CountryName &);
67 AsnLen BEncContent (BUF_TYPE b);
68 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
69 AsnLen BEnc (BUF_TYPE b);
70 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
71 void Print (ostream &os) const;
72 };
73
74
75 class AdministrationDomainName: public AsnType
76 {
77 public:
78 enum ChoiceIdEnum
79 {
80 numericCid = 0,
81 printableCid = 1
82 };
83
84 enum ChoiceIdEnum choiceId;
85 union
86 {
87 NumericString *numeric;
88 PrintableString *printable;
89 };
90
91
92 AdministrationDomainName();
93 AdministrationDomainName (const AdministrationDomainName &);
94 virtual ~AdministrationDomainName();
95
96 virtual AsnType *Clone() const;
97
98 virtual AsnType *Copy() const;
99
100 AdministrationDomainName &operator = (const AdministrationDomainName &);
101 AsnLen BEncContent (BUF_TYPE b);
102 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
103 AsnLen BEnc (BUF_TYPE b);
104 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
105 void Print (ostream &os) const;
106 };
107
108
109 /* NumericString (SIZE (1..ub-x121-address-length)) */
110 typedef NumericString X121Address;
111
112 /* PrintableString (SIZE (1..ub-terminal-id-length)) */
113 typedef PrintableString TerminalIdentifier;
114
115 class PrivateDomainName: public AsnType
116 {
117 public:
118 enum ChoiceIdEnum
119 {
120 numericCid = 0,
121 printableCid = 1
122 };
123
124 enum ChoiceIdEnum choiceId;
125 union
126 {
127 NumericString *numeric;
128 PrintableString *printable;
129 };
130
131
132 PrivateDomainName();
133 PrivateDomainName (const PrivateDomainName &);
134 virtual ~PrivateDomainName();
135
136 virtual AsnType *Clone() const;
137
138 virtual AsnType *Copy() const;
139
140 PrivateDomainName &operator = (const PrivateDomainName &);
141 AsnLen BEncContent (BUF_TYPE b);
142 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
143 AsnLen BEnc (BUF_TYPE b);
144 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
145 void Print (ostream &os) const;
146 };
147
148
149 /* PrintableString (SIZE (1..ub-organization-name-length)) */
150 typedef PrintableString OrganizationName;
151
152 /* NumericString (SIZE (1..ub-numeric-user-id-length)) */
153 typedef NumericString NumericUserIdentifier;
154
155 class PersonalName: public AsnType
156 {
157 public:
158 PrintableString surname;
159 PrintableString *given_name;
160 PrintableString *initials;
161 PrintableString *generation_qualifier;
162
163 PersonalName();
164 PersonalName (const PersonalName &);
165 virtual ~PersonalName();
166 virtual AsnType *Clone() const;
167
168 virtual AsnType *Copy() const;
169
170 PersonalName &operator = (const PersonalName &);
171 AsnLen BEncContent (BUF_TYPE b);
172 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
173
174 AsnLen BEnc (BUF_TYPE b);
175 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
176 void Print (ostream &os) const;
177 };
178
179
180 /* PrintableString (SIZE (1..ub-organizational-unit-name-length)) */
181 typedef PrintableString OrganizationUnitName;
182
183 class DomainDefinedAttribute: public AsnType
184 {
185 public:
186 PrintableString type;
187 PrintableString value;
188
189 DomainDefinedAttribute();
190 DomainDefinedAttribute (const DomainDefinedAttribute &);
191 virtual ~DomainDefinedAttribute();
192 virtual AsnType *Clone() const;
193
194 virtual AsnType *Copy() const;
195
196 DomainDefinedAttribute &operator = (const DomainDefinedAttribute &);
197 AsnLen BEncContent (BUF_TYPE b);
198 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
199
200 AsnLen BEnc (BUF_TYPE b);
201 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
202 void Print (ostream &os) const;
203 };
204
205
206 class ExtensionAttribute: public AsnType
207 {
208 public:
209 AsnInt extension_attribute_type;
210 AsnAny extension_attribute_value;
211
212 ExtensionAttribute();
213 ExtensionAttribute (const ExtensionAttribute &);
214 virtual ~ExtensionAttribute();
215 virtual AsnType *Clone() const;
216
217 virtual AsnType *Copy() const;
218
219 ExtensionAttribute &operator = (const ExtensionAttribute &);
220 AsnLen BEncContent (BUF_TYPE b);
221 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
222
223 AsnLen BEnc (BUF_TYPE b);
224 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
225 void Print (ostream &os) const;
226 };
227
228
229 /* TeletexString (SIZE (1..ub-organizational-unit-name-length)) */
230 typedef TeletexString TeletexOrganizationalUnitName;
231
232 class TeletexDomainDefinedAttribute: public AsnType
233 {
234 public:
235 TeletexString type;
236 TeletexString value;
237
238 TeletexDomainDefinedAttribute();
239 TeletexDomainDefinedAttribute (const TeletexDomainDefinedAttribute &);
240 virtual ~TeletexDomainDefinedAttribute();
241 virtual AsnType *Clone() const;
242
243 virtual AsnType *Copy() const;
244
245 TeletexDomainDefinedAttribute &operator = (const TeletexDomainDefinedAttribute &);
246 AsnLen BEncContent (BUF_TYPE b);
247 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
248
249 AsnLen BEnc (BUF_TYPE b);
250 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
251 void Print (ostream &os) const;
252 };
253
254
255 /* X121Address */
256 typedef X121Address NetworkAddress;
257
258 class OrganizationUnitNames: public AsnType
259 {
260 protected:
261 unsigned long int count;
262 struct AsnListElmt
263 {
264 AsnListElmt *next;
265 AsnListElmt *prev;
266 OrganizationUnitName *elmt;
267 } *first, *curr, *last;
268
269 public:
270 OrganizationUnitNames() { count = 0; first = curr = last = NULL; }
271 OrganizationUnitNames (const OrganizationUnitNames &);
272 virtual ~OrganizationUnitNames();
273 virtual AsnType *Clone() const;
274
275 virtual AsnType *Copy() const;
276
277 OrganizationUnitNames &operator = (const OrganizationUnitNames &);
278 void SetCurrElmt (unsigned long int index);
279 unsigned long int GetCurrElmtIndex();
280 void SetCurrToFirst() { curr = first; }
281 void SetCurrToLast() { curr = last; }
282 // reading member fcns
283 int Count() const { return count; }
284 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
285 OrganizationUnitName *First() const { return count > 0 ? first->elmt : NULL; }
286 OrganizationUnitName *Last() const { return count > 0 ? last->elmt : NULL; }
287 OrganizationUnitName *Curr() const { return curr ? curr->elmt : NULL; }
288 OrganizationUnitName *Next() const { return curr && curr->next ? curr->next->elmt : NULL; }
289 OrganizationUnitName *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; }
290
291 // routines that move the curr elmt
292 OrganizationUnitName *GoNext() { if (curr) curr = curr->next; return Curr(); }
293 OrganizationUnitName *GoPrev() { if (curr) curr = curr->prev; return Curr(); }
294
295 // write & alloc fcns - returns new elmt
296 OrganizationUnitName *Append(); // add elmt to end of list
297 OrganizationUnitName *Prepend(); // add elmt to beginning of list
298 OrganizationUnitName *InsertBefore(); //insert elmt before current elmt
299 OrganizationUnitName *InsertAfter(); //insert elmt after current elmt
300
301 // write & alloc & copy - returns list after copying elmt
302 OrganizationUnitNames &AppendCopy (OrganizationUnitName &elmt); // add elmt to end of list
303 OrganizationUnitNames &PrependCopy (OrganizationUnitName &elmt); // add elmt to beginning of list
304 OrganizationUnitNames &InsertBeforeAndCopy (OrganizationUnitName &elmt); //insert elmt before current elmt
305 OrganizationUnitNames &InsertAfterAndCopy (OrganizationUnitName &elmt); //insert elmt after current elmt
306
307 // removing the current elmt from the list
308 void RemoveCurrFromList();
309
310 // encode and decode routines
311 AsnLen BEnc (BUF_TYPE b);
312 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
313 AsnLen BEncContent (BUF_TYPE b);
314 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
315
316 PDU_MEMBER_MACROS
317 void Print (ostream &os) const;
318 };
319
320
321 class DomainDefinedAttributes: public AsnType
322 {
323 protected:
324 unsigned long int count;
325 struct AsnListElmt
326 {
327 AsnListElmt *next;
328 AsnListElmt *prev;
329 DomainDefinedAttribute *elmt;
330 } *first, *curr, *last;
331
332 public:
333 DomainDefinedAttributes() { count = 0; first = curr = last = NULL; }
334 DomainDefinedAttributes (const DomainDefinedAttributes &);
335 virtual ~DomainDefinedAttributes();
336 virtual AsnType *Clone() const;
337
338 virtual AsnType *Copy() const;
339
340 DomainDefinedAttributes &operator = (const DomainDefinedAttributes &);
341 void SetCurrElmt (unsigned long int index);
342 unsigned long int GetCurrElmtIndex();
343 void SetCurrToFirst() { curr = first; }
344 void SetCurrToLast() { curr = last; }
345 // reading member fcns
346 int Count() const { return count; }
347 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
348 DomainDefinedAttribute *First() const { return count > 0 ? first->elmt : NULL; }
349 DomainDefinedAttribute *Last() const { return count > 0 ? last->elmt : NULL; }
350 DomainDefinedAttribute *Curr() const { return curr ? curr->elmt : NULL; }
351 DomainDefinedAttribute *Next() const { return curr && curr->next ? curr->next->elmt : NULL; }
352 DomainDefinedAttribute *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; }
353
354 // routines that move the curr elmt
355 DomainDefinedAttribute *GoNext() { if (curr) curr = curr->next; return Curr(); }
356 DomainDefinedAttribute *GoPrev() { if (curr) curr = curr->prev; return Curr(); }
357
358 // write & alloc fcns - returns new elmt
359 DomainDefinedAttribute *Append(); // add elmt to end of list
360 DomainDefinedAttribute *Prepend(); // add elmt to beginning of list
361 DomainDefinedAttribute *InsertBefore(); //insert elmt before current elmt
362 DomainDefinedAttribute *InsertAfter(); //insert elmt after current elmt
363
364 // write & alloc & copy - returns list after copying elmt
365 DomainDefinedAttributes &AppendCopy (DomainDefinedAttribute &elmt); // add elmt to end of list
366 DomainDefinedAttributes &PrependCopy (DomainDefinedAttribute &elmt); // add elmt to beginning of list
367 DomainDefinedAttributes &InsertBeforeAndCopy (DomainDefinedAttribute &elmt); //insert elmt before current elmt
368 DomainDefinedAttributes &InsertAfterAndCopy (DomainDefinedAttribute &elmt); //insert elmt after current elmt
369
370 // removing the current elmt from the list
371 void RemoveCurrFromList();
372
373 // encode and decode routines
374 AsnLen BEnc (BUF_TYPE b);
375 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
376 AsnLen BEncContent (BUF_TYPE b);
377 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
378
379 PDU_MEMBER_MACROS
380 void Print (ostream &os) const;
381 };
382
383
384 class ExtensionAttributes: public AsnType
385 {
386 protected:
387 unsigned long int count;
388 struct AsnListElmt
389 {
390 AsnListElmt *next;
391 AsnListElmt *prev;
392 ExtensionAttribute *elmt;
393 } *first, *curr, *last;
394
395 public:
396 ExtensionAttributes() { count = 0; first = curr = last = NULL; }
397 ExtensionAttributes (const ExtensionAttributes &);
398 virtual ~ExtensionAttributes();
399 virtual AsnType *Clone() const;
400
401 virtual AsnType *Copy() const;
402
403 ExtensionAttributes &operator = (const ExtensionAttributes &);
404 void SetCurrElmt (unsigned long int index);
405 unsigned long int GetCurrElmtIndex();
406 void SetCurrToFirst() { curr = first; }
407 void SetCurrToLast() { curr = last; }
408 // reading member fcns
409 int Count() const { return count; }
410 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
411 ExtensionAttribute *First() const { return count > 0 ? first->elmt : NULL; }
412 ExtensionAttribute *Last() const { return count > 0 ? last->elmt : NULL; }
413 ExtensionAttribute *Curr() const { return curr ? curr->elmt : NULL; }
414 ExtensionAttribute *Next() const { return curr && curr->next ? curr->next->elmt : NULL; }
415 ExtensionAttribute *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; }
416
417 // routines that move the curr elmt
418 ExtensionAttribute *GoNext() { if (curr) curr = curr->next; return Curr(); }
419 ExtensionAttribute *GoPrev() { if (curr) curr = curr->prev; return Curr(); }
420
421 // write & alloc fcns - returns new elmt
422 ExtensionAttribute *Append(); // add elmt to end of list
423 ExtensionAttribute *Prepend(); // add elmt to beginning of list
424 ExtensionAttribute *InsertBefore(); //insert elmt before current elmt
425 ExtensionAttribute *InsertAfter(); //insert elmt after current elmt
426
427 // write & alloc & copy - returns list after copying elmt
428 ExtensionAttributes &AppendCopy (ExtensionAttribute &elmt); // add elmt to end of list
429 ExtensionAttributes &PrependCopy (ExtensionAttribute &elmt); // add elmt to beginning of list
430 ExtensionAttributes &InsertBeforeAndCopy (ExtensionAttribute &elmt); //insert elmt before current elmt
431 ExtensionAttributes &InsertAfterAndCopy (ExtensionAttribute &elmt); //insert elmt after current elmt
432
433 // removing the current elmt from the list
434 void RemoveCurrFromList();
435
436 // encode and decode routines
437 AsnLen BEnc (BUF_TYPE b);
438 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
439 AsnLen BEncContent (BUF_TYPE b);
440 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
441
442 PDU_MEMBER_MACROS
443 void Print (ostream &os) const;
444 };
445
446
447 class StandardAttributes: public AsnType
448 {
449 public:
450 CountryName *country_name;
451 AdministrationDomainName *administration_domain_name;
452 NetworkAddress *network_address;
453 TerminalIdentifier *terminal_identifier;
454 PrivateDomainName *private_domain_name;
455 OrganizationName *organization_name;
456 NumericUserIdentifier *numeric_user_identifier;
457 PersonalName *personal_name;
458 OrganizationUnitNames *organizational_unit_names;
459
460 StandardAttributes();
461 StandardAttributes (const StandardAttributes &);
462 virtual ~StandardAttributes();
463 virtual AsnType *Clone() const;
464
465 virtual AsnType *Copy() const;
466
467 StandardAttributes &operator = (const StandardAttributes &);
468 AsnLen BEncContent (BUF_TYPE b);
469 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
470
471 AsnLen BEnc (BUF_TYPE b);
472 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
473 void Print (ostream &os) const;
474 };
475
476
477 class ORAddress: public AsnType
478 {
479 public:
480 StandardAttributes *standard_attributes;
481 DomainDefinedAttributes *domain_defined_attributes;
482 ExtensionAttributes *extension_attributes;
483
484 ORAddress();
485 ORAddress (const ORAddress &);
486 virtual ~ORAddress();
487 virtual AsnType *Clone() const;
488
489 virtual AsnType *Copy() const;
490
491 ORAddress &operator = (const ORAddress &);
492 AsnLen BEncContent (BUF_TYPE b);
493 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
494
495 AsnLen BEnc (BUF_TYPE b);
496 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
497 void Print (ostream &os) const;
498 };
499
500
501 /* PrintableString (SIZE (1..ub-common-name-length)) */
502 typedef PrintableString CommonName;
503
504 /* TeletexString (SIZE (1..ub-common-name-length)) */
505 typedef TeletexString TeletexCommonName;
506
507 /* TeletexString (SIZE (1..ub-organization-name-length)) */
508 typedef TeletexString TeletexOrganizationalName;
509
510 class TeletexPersonalName: public AsnType
511 {
512 public:
513 TeletexString surname;
514 TeletexString *given_name;
515 TeletexString *initials;
516 TeletexString *generation_qualifier;
517
518 TeletexPersonalName();
519 TeletexPersonalName (const TeletexPersonalName &);
520 virtual ~TeletexPersonalName();
521 virtual AsnType *Clone() const;
522
523 virtual AsnType *Copy() const;
524
525 TeletexPersonalName &operator = (const TeletexPersonalName &);
526 AsnLen BEncContent (BUF_TYPE b);
527 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
528
529 AsnLen BEnc (BUF_TYPE b);
530 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
531 void Print (ostream &os) const;
532 };
533
534
535 class TeletexOrganizationUnitNames: public AsnType
536 {
537 protected:
538 unsigned long int count;
539 struct AsnListElmt
540 {
541 AsnListElmt *next;
542 AsnListElmt *prev;
543 TeletexOrganizationalUnitName *elmt;
544 } *first, *curr, *last;
545
546 public:
547 TeletexOrganizationUnitNames() { count = 0; first = curr = last = NULL; }
548 TeletexOrganizationUnitNames (const TeletexOrganizationUnitNames &);
549 virtual ~TeletexOrganizationUnitNames();
550 virtual AsnType *Clone() const;
551
552 virtual AsnType *Copy() const;
553
554 TeletexOrganizationUnitNames &operator = (const TeletexOrganizationUnitNames &);
555 void SetCurrElmt (unsigned long int index);
556 unsigned long int GetCurrElmtIndex();
557 void SetCurrToFirst() { curr = first; }
558 void SetCurrToLast() { curr = last; }
559 // reading member fcns
560 int Count() const { return count; }
561 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
562 TeletexOrganizationalUnitName *First() const { return count > 0 ? first->elmt : NULL; }
563 TeletexOrganizationalUnitName *Last() const { return count > 0 ? last->elmt : NULL; }
564 TeletexOrganizationalUnitName *Curr() const { return curr ? curr->elmt : NULL; }
565 TeletexOrganizationalUnitName *Next() const { return curr && curr->next ? curr->next->elmt : NULL; }
566 TeletexOrganizationalUnitName *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; }
567
568 // routines that move the curr elmt
569 TeletexOrganizationalUnitName *GoNext() { if (curr) curr = curr->next; return Curr(); }
570 TeletexOrganizationalUnitName *GoPrev() { if (curr) curr = curr->prev; return Curr(); }
571
572 // write & alloc fcns - returns new elmt
573 TeletexOrganizationalUnitName *Append(); // add elmt to end of list
574 TeletexOrganizationalUnitName *Prepend(); // add elmt to beginning of list
575 TeletexOrganizationalUnitName *InsertBefore(); //insert elmt before current elmt
576 TeletexOrganizationalUnitName *InsertAfter(); //insert elmt after current elmt
577
578 // write & alloc & copy - returns list after copying elmt
579 TeletexOrganizationUnitNames &AppendCopy (TeletexOrganizationalUnitName &elmt); // add elmt to end of list
580 TeletexOrganizationUnitNames &PrependCopy (TeletexOrganizationalUnitName &elmt); // add elmt to beginning of list
581 TeletexOrganizationUnitNames &InsertBeforeAndCopy (TeletexOrganizationalUnitName &elmt); //insert elmt before current elmt
582 TeletexOrganizationUnitNames &InsertAfterAndCopy (TeletexOrganizationalUnitName &elmt); //insert elmt after current elmt
583
584 // removing the current elmt from the list
585 void RemoveCurrFromList();
586
587 // encode and decode routines
588 AsnLen BEnc (BUF_TYPE b);
589 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
590 AsnLen BEncContent (BUF_TYPE b);
591 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
592
593 PDU_MEMBER_MACROS
594 void Print (ostream &os) const;
595 };
596
597
598 class TeletexDomainDefinedAttributes: public AsnType
599 {
600 protected:
601 unsigned long int count;
602 struct AsnListElmt
603 {
604 AsnListElmt *next;
605 AsnListElmt *prev;
606 TeletexDomainDefinedAttribute *elmt;
607 } *first, *curr, *last;
608
609 public:
610 TeletexDomainDefinedAttributes() { count = 0; first = curr = last = NULL; }
611 TeletexDomainDefinedAttributes (const TeletexDomainDefinedAttributes &);
612 virtual ~TeletexDomainDefinedAttributes();
613 virtual AsnType *Clone() const;
614
615 virtual AsnType *Copy() const;
616
617 TeletexDomainDefinedAttributes &operator = (const TeletexDomainDefinedAttributes &);
618 void SetCurrElmt (unsigned long int index);
619 unsigned long int GetCurrElmtIndex();
620 void SetCurrToFirst() { curr = first; }
621 void SetCurrToLast() { curr = last; }
622 // reading member fcns
623 int Count() const { return count; }
624 // NOTE: if your compiler complains about these NULLs, its definition of NULL is broken (and you better change it there!)
625 TeletexDomainDefinedAttribute *First() const { return count > 0 ? first->elmt : NULL; }
626 TeletexDomainDefinedAttribute *Last() const { return count > 0 ? last->elmt : NULL; }
627 TeletexDomainDefinedAttribute *Curr() const { return curr ? curr->elmt : NULL; }
628 TeletexDomainDefinedAttribute *Next() const { return curr && curr->next ? curr->next->elmt : NULL; }
629 TeletexDomainDefinedAttribute *Prev() const { return curr && curr->prev ? curr->prev->elmt : NULL; }
630
631 // routines that move the curr elmt
632 TeletexDomainDefinedAttribute *GoNext() { if (curr) curr = curr->next; return Curr(); }
633 TeletexDomainDefinedAttribute *GoPrev() { if (curr) curr = curr->prev; return Curr(); }
634
635 // write & alloc fcns - returns new elmt
636 TeletexDomainDefinedAttribute *Append(); // add elmt to end of list
637 TeletexDomainDefinedAttribute *Prepend(); // add elmt to beginning of list
638 TeletexDomainDefinedAttribute *InsertBefore(); //insert elmt before current elmt
639 TeletexDomainDefinedAttribute *InsertAfter(); //insert elmt after current elmt
640
641 // write & alloc & copy - returns list after copying elmt
642 TeletexDomainDefinedAttributes &AppendCopy (TeletexDomainDefinedAttribute &elmt); // add elmt to end of list
643 TeletexDomainDefinedAttributes &PrependCopy (TeletexDomainDefinedAttribute &elmt); // add elmt to beginning of list
644 TeletexDomainDefinedAttributes &InsertBeforeAndCopy (TeletexDomainDefinedAttribute &elmt); //insert elmt before current elmt
645 TeletexDomainDefinedAttributes &InsertAfterAndCopy (TeletexDomainDefinedAttribute &elmt); //insert elmt after current elmt
646
647 // removing the current elmt from the list
648 void RemoveCurrFromList();
649
650 // encode and decode routines
651 AsnLen BEnc (BUF_TYPE b);
652 void BDec (BUF_TYPE b, AsnLen &bytesDecoded, ENV_TYPE env);
653 AsnLen BEncContent (BUF_TYPE b);
654 void BDecContent (BUF_TYPE b, AsnTag tag, AsnLen elmtLen, AsnLen &bytesDecoded, ENV_TYPE env);
655
656 PDU_MEMBER_MACROS
657 void Print (ostream &os) const;
658 };
659
660
661 //------------------------------------------------------------------------------
662 // externs for value defs
663
664 //------------------------------------------------------------------------------
665
666 #endif /* conditional include of sm_x411mtsas.h */