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