Utilise new MergeSym feature to no longer overwrite the source .DEF file when buildin...
[openh323.git] / src / h4508.cxx
blob4f7580c2f5cddaaeff8a8dd6eb64cc40a58cbc27
1 //
2 // h4508.cxx
3 //
4 // Code automatically generated by asnparse.
5 //
7 #ifdef P_USE_PRAGMA
8 #pragma implementation "h4508.h"
9 #endif
11 #include <ptlib.h>
12 #include "h4508.h"
14 #define new PNEW
17 #if ! H323_DISABLE_H4508
21 #ifndef PASN_NOPRINTON
22 const static PASN_Names Names_H4508_NameOperations[]={
23 {"callingName",0}
24 ,{"alertingName",1}
25 ,{"connectedName",2}
26 ,{"busyName",3}
28 #endif
30 // NameOperations
33 H4508_NameOperations::H4508_NameOperations(unsigned tag, PASN_Object::TagClass tagClass)
34 : PASN_Enumeration(tag, tagClass, 3, FALSE
35 #ifndef PASN_NOPRINTON
36 ,(const PASN_Names *)Names_H4508_NameOperations,4
37 #endif
43 H4508_NameOperations & H4508_NameOperations::operator=(unsigned v)
45 SetValue(v);
46 return *this;
50 PObject * H4508_NameOperations::Clone() const
52 #ifndef PASN_LEANANDMEAN
53 PAssert(IsClass(H4508_NameOperations::Class()), PInvalidCast);
54 #endif
55 return new H4508_NameOperations(*this);
60 #ifndef PASN_NOPRINTON
61 const static PASN_Names Names_H4508_Name[]={
62 {"namePresentationAllowed",0}
63 ,{"namePresentationRestricted",1}
64 ,{"nameNotAvailable",2}
66 #endif
68 // Name
71 H4508_Name::H4508_Name(unsigned tag, PASN_Object::TagClass tagClass)
72 : PASN_Choice(tag, tagClass, 3, TRUE
73 #ifndef PASN_NOPRINTON
74 ,(const PASN_Names *)Names_H4508_Name,3
75 #endif
81 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
82 H4508_Name::operator H4508_NamePresentationAllowed &() const
83 #else
84 H4508_Name::operator H4508_NamePresentationAllowed &()
86 #ifndef PASN_LEANANDMEAN
87 PAssert(PIsDescendant(PAssertNULL(choice), H4508_NamePresentationAllowed), PInvalidCast);
88 #endif
89 return *(H4508_NamePresentationAllowed *)choice;
93 H4508_Name::operator const H4508_NamePresentationAllowed &() const
94 #endif
96 #ifndef PASN_LEANANDMEAN
97 PAssert(PIsDescendant(PAssertNULL(choice), H4508_NamePresentationAllowed), PInvalidCast);
98 #endif
99 return *(H4508_NamePresentationAllowed *)choice;
103 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
104 H4508_Name::operator H4508_NamePresentationRestricted &() const
105 #else
106 H4508_Name::operator H4508_NamePresentationRestricted &()
108 #ifndef PASN_LEANANDMEAN
109 PAssert(PIsDescendant(PAssertNULL(choice), H4508_NamePresentationRestricted), PInvalidCast);
110 #endif
111 return *(H4508_NamePresentationRestricted *)choice;
115 H4508_Name::operator const H4508_NamePresentationRestricted &() const
116 #endif
118 #ifndef PASN_LEANANDMEAN
119 PAssert(PIsDescendant(PAssertNULL(choice), H4508_NamePresentationRestricted), PInvalidCast);
120 #endif
121 return *(H4508_NamePresentationRestricted *)choice;
125 BOOL H4508_Name::CreateObject()
127 switch (tag) {
128 case e_namePresentationAllowed :
129 choice = new H4508_NamePresentationAllowed();
130 return TRUE;
131 case e_namePresentationRestricted :
132 choice = new H4508_NamePresentationRestricted();
133 return TRUE;
134 case e_nameNotAvailable :
135 choice = new PASN_Null();
136 return TRUE;
139 choice = NULL;
140 return FALSE;
144 PObject * H4508_Name::Clone() const
146 #ifndef PASN_LEANANDMEAN
147 PAssert(IsClass(H4508_Name::Class()), PInvalidCast);
148 #endif
149 return new H4508_Name(*this);
154 #ifndef PASN_NOPRINTON
155 const static PASN_Names Names_H4508_NamePresentationAllowed[]={
156 {"simpleName",0}
157 ,{"extendedName",1}
159 #endif
161 // NamePresentationAllowed
164 H4508_NamePresentationAllowed::H4508_NamePresentationAllowed(unsigned tag, PASN_Object::TagClass tagClass)
165 : PASN_Choice(tag, tagClass, 2, TRUE
166 #ifndef PASN_NOPRINTON
167 ,(const PASN_Names *)Names_H4508_NamePresentationAllowed,2
168 #endif
174 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
175 H4508_NamePresentationAllowed::operator H4508_SimpleName &() const
176 #else
177 H4508_NamePresentationAllowed::operator H4508_SimpleName &()
179 #ifndef PASN_LEANANDMEAN
180 PAssert(PIsDescendant(PAssertNULL(choice), H4508_SimpleName), PInvalidCast);
181 #endif
182 return *(H4508_SimpleName *)choice;
186 H4508_NamePresentationAllowed::operator const H4508_SimpleName &() const
187 #endif
189 #ifndef PASN_LEANANDMEAN
190 PAssert(PIsDescendant(PAssertNULL(choice), H4508_SimpleName), PInvalidCast);
191 #endif
192 return *(H4508_SimpleName *)choice;
196 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
197 H4508_NamePresentationAllowed::operator H4508_ExtendedName &() const
198 #else
199 H4508_NamePresentationAllowed::operator H4508_ExtendedName &()
201 #ifndef PASN_LEANANDMEAN
202 PAssert(PIsDescendant(PAssertNULL(choice), H4508_ExtendedName), PInvalidCast);
203 #endif
204 return *(H4508_ExtendedName *)choice;
208 H4508_NamePresentationAllowed::operator const H4508_ExtendedName &() const
209 #endif
211 #ifndef PASN_LEANANDMEAN
212 PAssert(PIsDescendant(PAssertNULL(choice), H4508_ExtendedName), PInvalidCast);
213 #endif
214 return *(H4508_ExtendedName *)choice;
218 BOOL H4508_NamePresentationAllowed::CreateObject()
220 switch (tag) {
221 case e_simpleName :
222 choice = new H4508_SimpleName();
223 return TRUE;
224 case e_extendedName :
225 choice = new H4508_ExtendedName();
226 return TRUE;
229 choice = NULL;
230 return FALSE;
234 PObject * H4508_NamePresentationAllowed::Clone() const
236 #ifndef PASN_LEANANDMEAN
237 PAssert(IsClass(H4508_NamePresentationAllowed::Class()), PInvalidCast);
238 #endif
239 return new H4508_NamePresentationAllowed(*this);
244 #ifndef PASN_NOPRINTON
245 const static PASN_Names Names_H4508_NamePresentationRestricted[]={
246 {"simpleName",0}
247 ,{"extendedName",1}
248 ,{"restrictedNull",2}
250 #endif
252 // NamePresentationRestricted
255 H4508_NamePresentationRestricted::H4508_NamePresentationRestricted(unsigned tag, PASN_Object::TagClass tagClass)
256 : PASN_Choice(tag, tagClass, 3, TRUE
257 #ifndef PASN_NOPRINTON
258 ,(const PASN_Names *)Names_H4508_NamePresentationRestricted,3
259 #endif
265 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
266 H4508_NamePresentationRestricted::operator H4508_SimpleName &() const
267 #else
268 H4508_NamePresentationRestricted::operator H4508_SimpleName &()
270 #ifndef PASN_LEANANDMEAN
271 PAssert(PIsDescendant(PAssertNULL(choice), H4508_SimpleName), PInvalidCast);
272 #endif
273 return *(H4508_SimpleName *)choice;
277 H4508_NamePresentationRestricted::operator const H4508_SimpleName &() const
278 #endif
280 #ifndef PASN_LEANANDMEAN
281 PAssert(PIsDescendant(PAssertNULL(choice), H4508_SimpleName), PInvalidCast);
282 #endif
283 return *(H4508_SimpleName *)choice;
287 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
288 H4508_NamePresentationRestricted::operator H4508_ExtendedName &() const
289 #else
290 H4508_NamePresentationRestricted::operator H4508_ExtendedName &()
292 #ifndef PASN_LEANANDMEAN
293 PAssert(PIsDescendant(PAssertNULL(choice), H4508_ExtendedName), PInvalidCast);
294 #endif
295 return *(H4508_ExtendedName *)choice;
299 H4508_NamePresentationRestricted::operator const H4508_ExtendedName &() const
300 #endif
302 #ifndef PASN_LEANANDMEAN
303 PAssert(PIsDescendant(PAssertNULL(choice), H4508_ExtendedName), PInvalidCast);
304 #endif
305 return *(H4508_ExtendedName *)choice;
309 BOOL H4508_NamePresentationRestricted::CreateObject()
311 switch (tag) {
312 case e_simpleName :
313 choice = new H4508_SimpleName();
314 return TRUE;
315 case e_extendedName :
316 choice = new H4508_ExtendedName();
317 return TRUE;
318 case e_restrictedNull :
319 choice = new PASN_Null();
320 return TRUE;
323 choice = NULL;
324 return FALSE;
328 PObject * H4508_NamePresentationRestricted::Clone() const
330 #ifndef PASN_LEANANDMEAN
331 PAssert(IsClass(H4508_NamePresentationRestricted::Class()), PInvalidCast);
332 #endif
333 return new H4508_NamePresentationRestricted(*this);
338 // SimpleName
341 H4508_SimpleName::H4508_SimpleName(unsigned tag, PASN_Object::TagClass tagClass)
342 : PASN_OctetString(tag, tagClass)
344 SetConstraints(PASN_Object::FixedConstraint, 1, 50);
348 H4508_SimpleName::H4508_SimpleName(const char * v)
350 SetValue(v);
354 H4508_SimpleName::H4508_SimpleName(const PString & v)
356 SetValue(v);
360 H4508_SimpleName::H4508_SimpleName(const PBYTEArray & v)
362 SetValue(v);
366 H4508_SimpleName & H4508_SimpleName::operator=(const char * v)
368 SetValue(v);
369 return *this;
373 H4508_SimpleName & H4508_SimpleName::operator=(const PString & v)
375 SetValue(v);
376 return *this;
380 H4508_SimpleName & H4508_SimpleName::operator=(const PBYTEArray & v)
382 SetValue(v);
383 return *this;
387 PObject * H4508_SimpleName::Clone() const
389 #ifndef PASN_LEANANDMEAN
390 PAssert(IsClass(H4508_SimpleName::Class()), PInvalidCast);
391 #endif
392 return new H4508_SimpleName(*this);
397 // ExtendedName
400 H4508_ExtendedName::H4508_ExtendedName(unsigned tag, PASN_Object::TagClass tagClass)
401 : PASN_BMPString(tag, tagClass)
403 SetConstraints(PASN_Object::FixedConstraint, 1, 256);
407 H4508_ExtendedName & H4508_ExtendedName::operator=(const char * v)
409 SetValue(v);
410 return *this;
414 H4508_ExtendedName & H4508_ExtendedName::operator=(const PString & v)
416 SetValue(v);
417 return *this;
421 H4508_ExtendedName & H4508_ExtendedName::operator=(const PWORDArray & v)
423 SetValue(v);
424 return *this;
428 H4508_ExtendedName & H4508_ExtendedName::operator=(const PASN_BMPString & v)
430 SetValue(v);
431 return *this;
435 PObject * H4508_ExtendedName::Clone() const
437 #ifndef PASN_LEANANDMEAN
438 PAssert(IsClass(H4508_ExtendedName::Class()), PInvalidCast);
439 #endif
440 return new H4508_ExtendedName(*this);
444 #endif // if ! H323_DISABLE_H4508
447 // End of h4508.cxx