4 // Code automatically generated by asnparse.
8 #pragma implementation "rfc1155.h"
12 #include <ptclib/rfc1155.h>
23 PRFC1155_ObjectName::PRFC1155_ObjectName(unsigned tag
, PASN_Object::TagClass tagClass
)
24 : PASN_ObjectId(tag
, tagClass
)
29 PObject
* PRFC1155_ObjectName::Clone() const
31 #ifndef PASN_LEANANDMEAN
32 PAssert(IsClass(PRFC1155_ObjectName::Class()), PInvalidCast
);
34 return new PRFC1155_ObjectName(*this);
42 PRFC1155_ObjectSyntax::PRFC1155_ObjectSyntax(unsigned tag
, PASN_Object::TagClass tagClass
)
43 : PASN_Choice(tag
, tagClass
, 2, FALSE
44 //#ifndef PASN_NOPRINTON
45 // ,(const PASN_Names *)Names_PRFC1155_ObjectSyntax,0
52 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
53 PRFC1155_ObjectSyntax::operator PRFC1155_SimpleSyntax
&() const
55 PRFC1155_ObjectSyntax::operator PRFC1155_SimpleSyntax
&()
57 #ifndef PASN_LEANANDMEAN
58 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_SimpleSyntax
), PInvalidCast
);
60 return *(PRFC1155_SimpleSyntax
*)choice
;
64 PRFC1155_ObjectSyntax::operator const PRFC1155_SimpleSyntax
&() const
67 #ifndef PASN_LEANANDMEAN
68 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_SimpleSyntax
), PInvalidCast
);
70 return *(PRFC1155_SimpleSyntax
*)choice
;
74 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
75 PRFC1155_ObjectSyntax::operator PRFC1155_ApplicationSyntax
&() const
77 PRFC1155_ObjectSyntax::operator PRFC1155_ApplicationSyntax
&()
79 #ifndef PASN_LEANANDMEAN
80 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_ApplicationSyntax
), PInvalidCast
);
82 return *(PRFC1155_ApplicationSyntax
*)choice
;
86 PRFC1155_ObjectSyntax::operator const PRFC1155_ApplicationSyntax
&() const
89 #ifndef PASN_LEANANDMEAN
90 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_ApplicationSyntax
), PInvalidCast
);
92 return *(PRFC1155_ApplicationSyntax
*)choice
;
96 BOOL
PRFC1155_ObjectSyntax::CreateObject()
98 choice
= new PRFC1155_SimpleSyntax(tag
, tagClass
);
99 if (((PASN_Choice
*)choice
)->CreateObject())
103 choice
= new PRFC1155_ApplicationSyntax(tag
, tagClass
);
104 if (((PASN_Choice
*)choice
)->CreateObject())
113 PObject
* PRFC1155_ObjectSyntax::Clone() const
115 #ifndef PASN_LEANANDMEAN
116 PAssert(IsClass(PRFC1155_ObjectSyntax::Class()), PInvalidCast
);
118 return new PRFC1155_ObjectSyntax(*this);
123 #ifndef PASN_NOPRINTON
124 const static PASN_Names Names_PRFC1155_SimpleSyntax
[]={
135 PRFC1155_SimpleSyntax::PRFC1155_SimpleSyntax(unsigned tag
, PASN_Object::TagClass tagClass
)
136 : PASN_Choice(tag
, tagClass
, 4, FALSE
137 #ifndef PASN_NOPRINTON
138 ,(const PASN_Names
*)Names_PRFC1155_SimpleSyntax
,4
145 BOOL
PRFC1155_SimpleSyntax::CreateObject()
149 choice
= new PASN_Integer();
152 choice
= new PASN_OctetString();
155 choice
= new PASN_ObjectId();
158 choice
= new PASN_Null();
167 PObject
* PRFC1155_SimpleSyntax::Clone() const
169 #ifndef PASN_LEANANDMEAN
170 PAssert(IsClass(PRFC1155_SimpleSyntax::Class()), PInvalidCast
);
172 return new PRFC1155_SimpleSyntax(*this);
177 #ifndef PASN_NOPRINTON
178 const static PASN_Names Names_PRFC1155_ApplicationSyntax
[]={
189 PRFC1155_ApplicationSyntax::PRFC1155_ApplicationSyntax(unsigned tag
, PASN_Object::TagClass tagClass
)
190 : PASN_Choice(tag
, tagClass
, 5, FALSE
191 #ifndef PASN_NOPRINTON
192 ,(const PASN_Names
*)Names_PRFC1155_ApplicationSyntax
,4
199 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
200 PRFC1155_ApplicationSyntax::operator PRFC1155_NetworkAddress
&() const
202 PRFC1155_ApplicationSyntax::operator PRFC1155_NetworkAddress
&()
204 #ifndef PASN_LEANANDMEAN
205 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_NetworkAddress
), PInvalidCast
);
207 return *(PRFC1155_NetworkAddress
*)choice
;
211 PRFC1155_ApplicationSyntax::operator const PRFC1155_NetworkAddress
&() const
214 #ifndef PASN_LEANANDMEAN
215 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_NetworkAddress
), PInvalidCast
);
217 return *(PRFC1155_NetworkAddress
*)choice
;
221 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
222 PRFC1155_ApplicationSyntax::operator PRFC1155_Counter
&() const
224 PRFC1155_ApplicationSyntax::operator PRFC1155_Counter
&()
226 #ifndef PASN_LEANANDMEAN
227 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_Counter
), PInvalidCast
);
229 return *(PRFC1155_Counter
*)choice
;
233 PRFC1155_ApplicationSyntax::operator const PRFC1155_Counter
&() const
236 #ifndef PASN_LEANANDMEAN
237 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_Counter
), PInvalidCast
);
239 return *(PRFC1155_Counter
*)choice
;
243 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
244 PRFC1155_ApplicationSyntax::operator PRFC1155_Gauge
&() const
246 PRFC1155_ApplicationSyntax::operator PRFC1155_Gauge
&()
248 #ifndef PASN_LEANANDMEAN
249 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_Gauge
), PInvalidCast
);
251 return *(PRFC1155_Gauge
*)choice
;
255 PRFC1155_ApplicationSyntax::operator const PRFC1155_Gauge
&() const
258 #ifndef PASN_LEANANDMEAN
259 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_Gauge
), PInvalidCast
);
261 return *(PRFC1155_Gauge
*)choice
;
265 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
266 PRFC1155_ApplicationSyntax::operator PRFC1155_TimeTicks
&() const
268 PRFC1155_ApplicationSyntax::operator PRFC1155_TimeTicks
&()
270 #ifndef PASN_LEANANDMEAN
271 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_TimeTicks
), PInvalidCast
);
273 return *(PRFC1155_TimeTicks
*)choice
;
277 PRFC1155_ApplicationSyntax::operator const PRFC1155_TimeTicks
&() const
280 #ifndef PASN_LEANANDMEAN
281 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_TimeTicks
), PInvalidCast
);
283 return *(PRFC1155_TimeTicks
*)choice
;
287 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
288 PRFC1155_ApplicationSyntax::operator PRFC1155_Opaque
&() const
290 PRFC1155_ApplicationSyntax::operator PRFC1155_Opaque
&()
292 #ifndef PASN_LEANANDMEAN
293 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_Opaque
), PInvalidCast
);
295 return *(PRFC1155_Opaque
*)choice
;
299 PRFC1155_ApplicationSyntax::operator const PRFC1155_Opaque
&() const
302 #ifndef PASN_LEANANDMEAN
303 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_Opaque
), PInvalidCast
);
305 return *(PRFC1155_Opaque
*)choice
;
309 BOOL
PRFC1155_ApplicationSyntax::CreateObject()
313 choice
= new PRFC1155_Counter();
316 choice
= new PRFC1155_Gauge();
319 choice
= new PRFC1155_TimeTicks();
322 choice
= new PRFC1155_Opaque();
326 choice
= new PRFC1155_NetworkAddress(tag
, tagClass
);
327 if (((PASN_Choice
*)choice
)->CreateObject())
336 PObject
* PRFC1155_ApplicationSyntax::Clone() const
338 #ifndef PASN_LEANANDMEAN
339 PAssert(IsClass(PRFC1155_ApplicationSyntax::Class()), PInvalidCast
);
341 return new PRFC1155_ApplicationSyntax(*this);
346 #ifndef PASN_NOPRINTON
347 const static PASN_Names Names_PRFC1155_NetworkAddress
[]={
355 PRFC1155_NetworkAddress::PRFC1155_NetworkAddress(unsigned tag
, PASN_Object::TagClass tagClass
)
356 : PASN_Choice(tag
, tagClass
, 1, FALSE
357 #ifndef PASN_NOPRINTON
358 ,(const PASN_Names
*)Names_PRFC1155_NetworkAddress
,1
365 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
366 PRFC1155_NetworkAddress::operator PRFC1155_IpAddress
&() const
368 PRFC1155_NetworkAddress::operator PRFC1155_IpAddress
&()
370 #ifndef PASN_LEANANDMEAN
371 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_IpAddress
), PInvalidCast
);
373 return *(PRFC1155_IpAddress
*)choice
;
377 PRFC1155_NetworkAddress::operator const PRFC1155_IpAddress
&() const
380 #ifndef PASN_LEANANDMEAN
381 PAssert(PIsDescendant(PAssertNULL(choice
), PRFC1155_IpAddress
), PInvalidCast
);
383 return *(PRFC1155_IpAddress
*)choice
;
387 BOOL
PRFC1155_NetworkAddress::CreateObject()
391 choice
= new PRFC1155_IpAddress();
400 PObject
* PRFC1155_NetworkAddress::Clone() const
402 #ifndef PASN_LEANANDMEAN
403 PAssert(IsClass(PRFC1155_NetworkAddress::Class()), PInvalidCast
);
405 return new PRFC1155_NetworkAddress(*this);
413 PRFC1155_IpAddress::PRFC1155_IpAddress(unsigned tag
, PASN_Object::TagClass tagClass
)
414 : PASN_OctetString(tag
, tagClass
)
416 SetConstraints(PASN_Object::FixedConstraint
, 4);
420 PRFC1155_IpAddress::PRFC1155_IpAddress(const char * v
)
426 PRFC1155_IpAddress::PRFC1155_IpAddress(const PString
& v
)
432 PRFC1155_IpAddress::PRFC1155_IpAddress(const PBYTEArray
& v
)
438 PRFC1155_IpAddress
& PRFC1155_IpAddress::operator=(const char * v
)
445 PRFC1155_IpAddress
& PRFC1155_IpAddress::operator=(const PString
& v
)
452 PRFC1155_IpAddress
& PRFC1155_IpAddress::operator=(const PBYTEArray
& v
)
459 PObject
* PRFC1155_IpAddress::Clone() const
461 #ifndef PASN_LEANANDMEAN
462 PAssert(IsClass(PRFC1155_IpAddress::Class()), PInvalidCast
);
464 return new PRFC1155_IpAddress(*this);
472 PRFC1155_Counter::PRFC1155_Counter(unsigned tag
, PASN_Object::TagClass tagClass
)
473 : PASN_Integer(tag
, tagClass
)
475 SetConstraints(PASN_Object::FixedConstraint
, 0, 4294967295U);
479 PRFC1155_Counter
& PRFC1155_Counter::operator=(int v
)
486 PRFC1155_Counter
& PRFC1155_Counter::operator=(unsigned v
)
493 PObject
* PRFC1155_Counter::Clone() const
495 #ifndef PASN_LEANANDMEAN
496 PAssert(IsClass(PRFC1155_Counter::Class()), PInvalidCast
);
498 return new PRFC1155_Counter(*this);
506 PRFC1155_Gauge::PRFC1155_Gauge(unsigned tag
, PASN_Object::TagClass tagClass
)
507 : PASN_Integer(tag
, tagClass
)
509 SetConstraints(PASN_Object::FixedConstraint
, 0, 4294967295U);
513 PRFC1155_Gauge
& PRFC1155_Gauge::operator=(int v
)
520 PRFC1155_Gauge
& PRFC1155_Gauge::operator=(unsigned v
)
527 PObject
* PRFC1155_Gauge::Clone() const
529 #ifndef PASN_LEANANDMEAN
530 PAssert(IsClass(PRFC1155_Gauge::Class()), PInvalidCast
);
532 return new PRFC1155_Gauge(*this);
540 PRFC1155_TimeTicks::PRFC1155_TimeTicks(unsigned tag
, PASN_Object::TagClass tagClass
)
541 : PASN_Integer(tag
, tagClass
)
543 SetConstraints(PASN_Object::FixedConstraint
, 0, 4294967295U);
547 PRFC1155_TimeTicks
& PRFC1155_TimeTicks::operator=(int v
)
554 PRFC1155_TimeTicks
& PRFC1155_TimeTicks::operator=(unsigned v
)
561 PObject
* PRFC1155_TimeTicks::Clone() const
563 #ifndef PASN_LEANANDMEAN
564 PAssert(IsClass(PRFC1155_TimeTicks::Class()), PInvalidCast
);
566 return new PRFC1155_TimeTicks(*this);
574 PRFC1155_Opaque::PRFC1155_Opaque(unsigned tag
, PASN_Object::TagClass tagClass
)
575 : PASN_OctetString(tag
, tagClass
)
580 PRFC1155_Opaque::PRFC1155_Opaque(const char * v
)
586 PRFC1155_Opaque::PRFC1155_Opaque(const PString
& v
)
592 PRFC1155_Opaque::PRFC1155_Opaque(const PBYTEArray
& v
)
598 PRFC1155_Opaque
& PRFC1155_Opaque::operator=(const char * v
)
605 PRFC1155_Opaque
& PRFC1155_Opaque::operator=(const PString
& v
)
612 PRFC1155_Opaque
& PRFC1155_Opaque::operator=(const PBYTEArray
& v
)
619 PObject
* PRFC1155_Opaque::Clone() const
621 #ifndef PASN_LEANANDMEAN
622 PAssert(IsClass(PRFC1155_Opaque::Class()), PInvalidCast
);
624 return new PRFC1155_Opaque(*this);
628 #endif // if ! H323_DISABLE_PRFC1155
631 // End of rfc1155.cxx