Utilise new MergeSym feature to no longer overwrite the source .DEF file when buildin...
[openh323.git] / src / x880.cxx
blob179266674600185afc4b8042336327a0a0c1b225
1 //
2 // x880.cxx
3 //
4 // Code automatically generated by asnparse.
5 //
7 #ifdef P_USE_PRAGMA
8 #pragma implementation "x880.h"
9 #endif
11 #include <ptlib.h>
12 #include "x880.h"
14 #define new PNEW
17 #if ! H323_DISABLE_X880
20 #ifndef PASN_NOPRINTON
21 const static PASN_Names Names_X880_ROS[]={
22 {"invoke",0}
23 ,{"returnResult",1}
24 ,{"returnError",2}
25 ,{"reject",3}
27 #endif
29 // ROS
32 X880_ROS::X880_ROS(unsigned tag, PASN_Object::TagClass tagClass)
33 : PASN_Choice(tag, tagClass, 4, FALSE
34 #ifndef PASN_NOPRINTON
35 ,(const PASN_Names *)Names_X880_ROS,4
36 #endif
42 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
43 X880_ROS::operator X880_Invoke &() const
44 #else
45 X880_ROS::operator X880_Invoke &()
47 #ifndef PASN_LEANANDMEAN
48 PAssert(PIsDescendant(PAssertNULL(choice), X880_Invoke), PInvalidCast);
49 #endif
50 return *(X880_Invoke *)choice;
54 X880_ROS::operator const X880_Invoke &() const
55 #endif
57 #ifndef PASN_LEANANDMEAN
58 PAssert(PIsDescendant(PAssertNULL(choice), X880_Invoke), PInvalidCast);
59 #endif
60 return *(X880_Invoke *)choice;
64 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
65 X880_ROS::operator X880_ReturnResult &() const
66 #else
67 X880_ROS::operator X880_ReturnResult &()
69 #ifndef PASN_LEANANDMEAN
70 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnResult), PInvalidCast);
71 #endif
72 return *(X880_ReturnResult *)choice;
76 X880_ROS::operator const X880_ReturnResult &() const
77 #endif
79 #ifndef PASN_LEANANDMEAN
80 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnResult), PInvalidCast);
81 #endif
82 return *(X880_ReturnResult *)choice;
86 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
87 X880_ROS::operator X880_ReturnError &() const
88 #else
89 X880_ROS::operator X880_ReturnError &()
91 #ifndef PASN_LEANANDMEAN
92 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnError), PInvalidCast);
93 #endif
94 return *(X880_ReturnError *)choice;
98 X880_ROS::operator const X880_ReturnError &() const
99 #endif
101 #ifndef PASN_LEANANDMEAN
102 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnError), PInvalidCast);
103 #endif
104 return *(X880_ReturnError *)choice;
108 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
109 X880_ROS::operator X880_Reject &() const
110 #else
111 X880_ROS::operator X880_Reject &()
113 #ifndef PASN_LEANANDMEAN
114 PAssert(PIsDescendant(PAssertNULL(choice), X880_Reject), PInvalidCast);
115 #endif
116 return *(X880_Reject *)choice;
120 X880_ROS::operator const X880_Reject &() const
121 #endif
123 #ifndef PASN_LEANANDMEAN
124 PAssert(PIsDescendant(PAssertNULL(choice), X880_Reject), PInvalidCast);
125 #endif
126 return *(X880_Reject *)choice;
130 BOOL X880_ROS::CreateObject()
132 switch (tag) {
133 case e_invoke :
134 choice = new X880_Invoke(1, ContextSpecificTagClass);
135 return TRUE;
136 case e_returnResult :
137 choice = new X880_ReturnResult(2, ContextSpecificTagClass);
138 return TRUE;
139 case e_returnError :
140 choice = new X880_ReturnError(3, ContextSpecificTagClass);
141 return TRUE;
142 case e_reject :
143 choice = new X880_Reject(4, ContextSpecificTagClass);
144 return TRUE;
147 choice = NULL;
148 return FALSE;
152 PObject * X880_ROS::Clone() const
154 #ifndef PASN_LEANANDMEAN
155 PAssert(IsClass(X880_ROS::Class()), PInvalidCast);
156 #endif
157 return new X880_ROS(*this);
162 // GeneralProblem
165 X880_GeneralProblem::X880_GeneralProblem(unsigned tag, PASN_Object::TagClass tagClass)
166 : PASN_Integer(tag, tagClass)
171 X880_GeneralProblem & X880_GeneralProblem::operator=(int v)
173 SetValue(v);
174 return *this;
178 X880_GeneralProblem & X880_GeneralProblem::operator=(unsigned v)
180 SetValue(v);
181 return *this;
185 PObject * X880_GeneralProblem::Clone() const
187 #ifndef PASN_LEANANDMEAN
188 PAssert(IsClass(X880_GeneralProblem::Class()), PInvalidCast);
189 #endif
190 return new X880_GeneralProblem(*this);
195 // InvokeProblem
198 X880_InvokeProblem::X880_InvokeProblem(unsigned tag, PASN_Object::TagClass tagClass)
199 : PASN_Integer(tag, tagClass)
204 X880_InvokeProblem & X880_InvokeProblem::operator=(int v)
206 SetValue(v);
207 return *this;
211 X880_InvokeProblem & X880_InvokeProblem::operator=(unsigned v)
213 SetValue(v);
214 return *this;
218 PObject * X880_InvokeProblem::Clone() const
220 #ifndef PASN_LEANANDMEAN
221 PAssert(IsClass(X880_InvokeProblem::Class()), PInvalidCast);
222 #endif
223 return new X880_InvokeProblem(*this);
228 // ReturnResultProblem
231 X880_ReturnResultProblem::X880_ReturnResultProblem(unsigned tag, PASN_Object::TagClass tagClass)
232 : PASN_Integer(tag, tagClass)
237 X880_ReturnResultProblem & X880_ReturnResultProblem::operator=(int v)
239 SetValue(v);
240 return *this;
244 X880_ReturnResultProblem & X880_ReturnResultProblem::operator=(unsigned v)
246 SetValue(v);
247 return *this;
251 PObject * X880_ReturnResultProblem::Clone() const
253 #ifndef PASN_LEANANDMEAN
254 PAssert(IsClass(X880_ReturnResultProblem::Class()), PInvalidCast);
255 #endif
256 return new X880_ReturnResultProblem(*this);
261 // ReturnErrorProblem
264 X880_ReturnErrorProblem::X880_ReturnErrorProblem(unsigned tag, PASN_Object::TagClass tagClass)
265 : PASN_Integer(tag, tagClass)
270 X880_ReturnErrorProblem & X880_ReturnErrorProblem::operator=(int v)
272 SetValue(v);
273 return *this;
277 X880_ReturnErrorProblem & X880_ReturnErrorProblem::operator=(unsigned v)
279 SetValue(v);
280 return *this;
284 PObject * X880_ReturnErrorProblem::Clone() const
286 #ifndef PASN_LEANANDMEAN
287 PAssert(IsClass(X880_ReturnErrorProblem::Class()), PInvalidCast);
288 #endif
289 return new X880_ReturnErrorProblem(*this);
294 // RejectProblem
297 X880_RejectProblem::X880_RejectProblem(unsigned tag, PASN_Object::TagClass tagClass)
298 : PASN_Integer(tag, tagClass)
303 X880_RejectProblem & X880_RejectProblem::operator=(int v)
305 SetValue(v);
306 return *this;
310 X880_RejectProblem & X880_RejectProblem::operator=(unsigned v)
312 SetValue(v);
313 return *this;
317 PObject * X880_RejectProblem::Clone() const
319 #ifndef PASN_LEANANDMEAN
320 PAssert(IsClass(X880_RejectProblem::Class()), PInvalidCast);
321 #endif
322 return new X880_RejectProblem(*this);
327 // InvokeId
330 X880_InvokeId::X880_InvokeId(unsigned tag, PASN_Object::TagClass tagClass)
331 : PASN_Integer(tag, tagClass)
336 X880_InvokeId & X880_InvokeId::operator=(int v)
338 SetValue(v);
339 return *this;
343 X880_InvokeId & X880_InvokeId::operator=(unsigned v)
345 SetValue(v);
346 return *this;
350 PObject * X880_InvokeId::Clone() const
352 #ifndef PASN_LEANANDMEAN
353 PAssert(IsClass(X880_InvokeId::Class()), PInvalidCast);
354 #endif
355 return new X880_InvokeId(*this);
360 #ifndef PASN_NOPRINTON
361 const static PASN_Names Names_X880_Code[]={
362 {"local",0}
363 ,{"global",1}
365 #endif
367 // Code
370 X880_Code::X880_Code(unsigned tag, PASN_Object::TagClass tagClass)
371 : PASN_Choice(tag, tagClass, 2, FALSE
372 #ifndef PASN_NOPRINTON
373 ,(const PASN_Names *)Names_X880_Code,2
374 #endif
380 BOOL X880_Code::CreateObject()
382 switch (tag) {
383 case e_local :
384 choice = new PASN_Integer();
385 return TRUE;
386 case e_global :
387 choice = new PASN_ObjectId();
388 return TRUE;
391 choice = NULL;
392 return FALSE;
396 PObject * X880_Code::Clone() const
398 #ifndef PASN_LEANANDMEAN
399 PAssert(IsClass(X880_Code::Class()), PInvalidCast);
400 #endif
401 return new X880_Code(*this);
406 // ReturnResult_result
409 X880_ReturnResult_result::X880_ReturnResult_result(unsigned tag, PASN_Object::TagClass tagClass)
410 : PASN_Sequence(tag, tagClass, 0, TRUE, 0)
415 #ifndef PASN_NOPRINTON
416 void X880_ReturnResult_result::PrintOn(ostream & strm) const
418 int indent = strm.precision() + 2;
419 strm << "{\n";
420 strm << setw(indent+9) << "opcode = " << setprecision(indent) << m_opcode << '\n';
421 strm << setw(indent+9) << "result = " << setprecision(indent) << m_result << '\n';
422 strm << setw(indent-1) << setprecision(indent-2) << "}";
424 #endif
427 PObject::Comparison X880_ReturnResult_result::Compare(const PObject & obj) const
429 #ifndef PASN_LEANANDMEAN
430 PAssert(PIsDescendant(&obj, X880_ReturnResult_result), PInvalidCast);
431 #endif
432 const X880_ReturnResult_result & other = (const X880_ReturnResult_result &)obj;
434 Comparison result;
436 if ((result = m_opcode.Compare(other.m_opcode)) != EqualTo)
437 return result;
438 if ((result = m_result.Compare(other.m_result)) != EqualTo)
439 return result;
441 return PASN_Sequence::Compare(other);
445 PINDEX X880_ReturnResult_result::GetDataLength() const
447 PINDEX length = 0;
448 length += m_opcode.GetObjectLength();
449 length += m_result.GetObjectLength();
450 return length;
454 BOOL X880_ReturnResult_result::Decode(PASN_Stream & strm)
456 if (!PreambleDecode(strm))
457 return FALSE;
459 if (!m_opcode.Decode(strm))
460 return FALSE;
461 if (!m_result.Decode(strm))
462 return FALSE;
464 return UnknownExtensionsDecode(strm);
468 void X880_ReturnResult_result::Encode(PASN_Stream & strm) const
470 PreambleEncode(strm);
472 m_opcode.Encode(strm);
473 m_result.Encode(strm);
475 UnknownExtensionsEncode(strm);
479 PObject * X880_ReturnResult_result::Clone() const
481 #ifndef PASN_LEANANDMEAN
482 PAssert(IsClass(X880_ReturnResult_result::Class()), PInvalidCast);
483 #endif
484 return new X880_ReturnResult_result(*this);
489 #ifndef PASN_NOPRINTON
490 const static PASN_Names Names_X880_Reject_problem[]={
491 {"general",0}
492 ,{"invoke",1}
493 ,{"returnResult",2}
494 ,{"returnError",3}
496 #endif
498 // Reject_problem
501 X880_Reject_problem::X880_Reject_problem(unsigned tag, PASN_Object::TagClass tagClass)
502 : PASN_Choice(tag, tagClass, 4, FALSE
503 #ifndef PASN_NOPRINTON
504 ,(const PASN_Names *)Names_X880_Reject_problem,4
505 #endif
511 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
512 X880_Reject_problem::operator X880_GeneralProblem &() const
513 #else
514 X880_Reject_problem::operator X880_GeneralProblem &()
516 #ifndef PASN_LEANANDMEAN
517 PAssert(PIsDescendant(PAssertNULL(choice), X880_GeneralProblem), PInvalidCast);
518 #endif
519 return *(X880_GeneralProblem *)choice;
523 X880_Reject_problem::operator const X880_GeneralProblem &() const
524 #endif
526 #ifndef PASN_LEANANDMEAN
527 PAssert(PIsDescendant(PAssertNULL(choice), X880_GeneralProblem), PInvalidCast);
528 #endif
529 return *(X880_GeneralProblem *)choice;
533 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
534 X880_Reject_problem::operator X880_InvokeProblem &() const
535 #else
536 X880_Reject_problem::operator X880_InvokeProblem &()
538 #ifndef PASN_LEANANDMEAN
539 PAssert(PIsDescendant(PAssertNULL(choice), X880_InvokeProblem), PInvalidCast);
540 #endif
541 return *(X880_InvokeProblem *)choice;
545 X880_Reject_problem::operator const X880_InvokeProblem &() const
546 #endif
548 #ifndef PASN_LEANANDMEAN
549 PAssert(PIsDescendant(PAssertNULL(choice), X880_InvokeProblem), PInvalidCast);
550 #endif
551 return *(X880_InvokeProblem *)choice;
555 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
556 X880_Reject_problem::operator X880_ReturnResultProblem &() const
557 #else
558 X880_Reject_problem::operator X880_ReturnResultProblem &()
560 #ifndef PASN_LEANANDMEAN
561 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnResultProblem), PInvalidCast);
562 #endif
563 return *(X880_ReturnResultProblem *)choice;
567 X880_Reject_problem::operator const X880_ReturnResultProblem &() const
568 #endif
570 #ifndef PASN_LEANANDMEAN
571 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnResultProblem), PInvalidCast);
572 #endif
573 return *(X880_ReturnResultProblem *)choice;
577 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
578 X880_Reject_problem::operator X880_ReturnErrorProblem &() const
579 #else
580 X880_Reject_problem::operator X880_ReturnErrorProblem &()
582 #ifndef PASN_LEANANDMEAN
583 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnErrorProblem), PInvalidCast);
584 #endif
585 return *(X880_ReturnErrorProblem *)choice;
589 X880_Reject_problem::operator const X880_ReturnErrorProblem &() const
590 #endif
592 #ifndef PASN_LEANANDMEAN
593 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnErrorProblem), PInvalidCast);
594 #endif
595 return *(X880_ReturnErrorProblem *)choice;
599 BOOL X880_Reject_problem::CreateObject()
601 switch (tag) {
602 case e_general :
603 choice = new X880_GeneralProblem();
604 return TRUE;
605 case e_invoke :
606 choice = new X880_InvokeProblem();
607 return TRUE;
608 case e_returnResult :
609 choice = new X880_ReturnResultProblem();
610 return TRUE;
611 case e_returnError :
612 choice = new X880_ReturnErrorProblem();
613 return TRUE;
616 choice = NULL;
617 return FALSE;
621 PObject * X880_Reject_problem::Clone() const
623 #ifndef PASN_LEANANDMEAN
624 PAssert(IsClass(X880_Reject_problem::Class()), PInvalidCast);
625 #endif
626 return new X880_Reject_problem(*this);
631 // Invoke
634 X880_Invoke::X880_Invoke(unsigned tag, PASN_Object::TagClass tagClass)
635 : PASN_Sequence(tag, tagClass, 2, FALSE, 0)
637 m_invokeId.SetConstraints(PASN_Object::FixedConstraint, 0, 65535);
641 #ifndef PASN_NOPRINTON
642 void X880_Invoke::PrintOn(ostream & strm) const
644 int indent = strm.precision() + 2;
645 strm << "{\n";
646 strm << setw(indent+11) << "invokeId = " << setprecision(indent) << m_invokeId << '\n';
647 if (HasOptionalField(e_linkedId))
648 strm << setw(indent+11) << "linkedId = " << setprecision(indent) << m_linkedId << '\n';
649 strm << setw(indent+9) << "opcode = " << setprecision(indent) << m_opcode << '\n';
650 if (HasOptionalField(e_argument))
651 strm << setw(indent+11) << "argument = " << setprecision(indent) << m_argument << '\n';
652 strm << setw(indent-1) << setprecision(indent-2) << "}";
654 #endif
657 PObject::Comparison X880_Invoke::Compare(const PObject & obj) const
659 #ifndef PASN_LEANANDMEAN
660 PAssert(PIsDescendant(&obj, X880_Invoke), PInvalidCast);
661 #endif
662 const X880_Invoke & other = (const X880_Invoke &)obj;
664 Comparison result;
666 if ((result = m_invokeId.Compare(other.m_invokeId)) != EqualTo)
667 return result;
668 if ((result = m_linkedId.Compare(other.m_linkedId)) != EqualTo)
669 return result;
670 if ((result = m_opcode.Compare(other.m_opcode)) != EqualTo)
671 return result;
672 if ((result = m_argument.Compare(other.m_argument)) != EqualTo)
673 return result;
675 return PASN_Sequence::Compare(other);
679 PINDEX X880_Invoke::GetDataLength() const
681 PINDEX length = 0;
682 length += m_invokeId.GetObjectLength();
683 if (HasOptionalField(e_linkedId))
684 length += m_linkedId.GetObjectLength();
685 length += m_opcode.GetObjectLength();
686 if (HasOptionalField(e_argument))
687 length += m_argument.GetObjectLength();
688 return length;
692 BOOL X880_Invoke::Decode(PASN_Stream & strm)
694 if (!PreambleDecode(strm))
695 return FALSE;
697 if (!m_invokeId.Decode(strm))
698 return FALSE;
699 if (HasOptionalField(e_linkedId) && !m_linkedId.Decode(strm))
700 return FALSE;
701 if (!m_opcode.Decode(strm))
702 return FALSE;
703 if (HasOptionalField(e_argument) && !m_argument.Decode(strm))
704 return FALSE;
706 return UnknownExtensionsDecode(strm);
710 void X880_Invoke::Encode(PASN_Stream & strm) const
712 PreambleEncode(strm);
714 m_invokeId.Encode(strm);
715 if (HasOptionalField(e_linkedId))
716 m_linkedId.Encode(strm);
717 m_opcode.Encode(strm);
718 if (HasOptionalField(e_argument))
719 m_argument.Encode(strm);
721 UnknownExtensionsEncode(strm);
725 PObject * X880_Invoke::Clone() const
727 #ifndef PASN_LEANANDMEAN
728 PAssert(IsClass(X880_Invoke::Class()), PInvalidCast);
729 #endif
730 return new X880_Invoke(*this);
735 // ReturnResult
738 X880_ReturnResult::X880_ReturnResult(unsigned tag, PASN_Object::TagClass tagClass)
739 : PASN_Sequence(tag, tagClass, 1, FALSE, 0)
744 #ifndef PASN_NOPRINTON
745 void X880_ReturnResult::PrintOn(ostream & strm) const
747 int indent = strm.precision() + 2;
748 strm << "{\n";
749 strm << setw(indent+11) << "invokeId = " << setprecision(indent) << m_invokeId << '\n';
750 if (HasOptionalField(e_result))
751 strm << setw(indent+9) << "result = " << setprecision(indent) << m_result << '\n';
752 strm << setw(indent-1) << setprecision(indent-2) << "}";
754 #endif
757 PObject::Comparison X880_ReturnResult::Compare(const PObject & obj) const
759 #ifndef PASN_LEANANDMEAN
760 PAssert(PIsDescendant(&obj, X880_ReturnResult), PInvalidCast);
761 #endif
762 const X880_ReturnResult & other = (const X880_ReturnResult &)obj;
764 Comparison result;
766 if ((result = m_invokeId.Compare(other.m_invokeId)) != EqualTo)
767 return result;
768 if ((result = m_result.Compare(other.m_result)) != EqualTo)
769 return result;
771 return PASN_Sequence::Compare(other);
775 PINDEX X880_ReturnResult::GetDataLength() const
777 PINDEX length = 0;
778 length += m_invokeId.GetObjectLength();
779 if (HasOptionalField(e_result))
780 length += m_result.GetObjectLength();
781 return length;
785 BOOL X880_ReturnResult::Decode(PASN_Stream & strm)
787 if (!PreambleDecode(strm))
788 return FALSE;
790 if (!m_invokeId.Decode(strm))
791 return FALSE;
792 if (HasOptionalField(e_result) && !m_result.Decode(strm))
793 return FALSE;
795 return UnknownExtensionsDecode(strm);
799 void X880_ReturnResult::Encode(PASN_Stream & strm) const
801 PreambleEncode(strm);
803 m_invokeId.Encode(strm);
804 if (HasOptionalField(e_result))
805 m_result.Encode(strm);
807 UnknownExtensionsEncode(strm);
811 PObject * X880_ReturnResult::Clone() const
813 #ifndef PASN_LEANANDMEAN
814 PAssert(IsClass(X880_ReturnResult::Class()), PInvalidCast);
815 #endif
816 return new X880_ReturnResult(*this);
821 // ReturnError
824 X880_ReturnError::X880_ReturnError(unsigned tag, PASN_Object::TagClass tagClass)
825 : PASN_Sequence(tag, tagClass, 1, FALSE, 0)
830 #ifndef PASN_NOPRINTON
831 void X880_ReturnError::PrintOn(ostream & strm) const
833 int indent = strm.precision() + 2;
834 strm << "{\n";
835 strm << setw(indent+11) << "invokeId = " << setprecision(indent) << m_invokeId << '\n';
836 strm << setw(indent+12) << "errorCode = " << setprecision(indent) << m_errorCode << '\n';
837 if (HasOptionalField(e_parameter))
838 strm << setw(indent+12) << "parameter = " << setprecision(indent) << m_parameter << '\n';
839 strm << setw(indent-1) << setprecision(indent-2) << "}";
841 #endif
844 PObject::Comparison X880_ReturnError::Compare(const PObject & obj) const
846 #ifndef PASN_LEANANDMEAN
847 PAssert(PIsDescendant(&obj, X880_ReturnError), PInvalidCast);
848 #endif
849 const X880_ReturnError & other = (const X880_ReturnError &)obj;
851 Comparison result;
853 if ((result = m_invokeId.Compare(other.m_invokeId)) != EqualTo)
854 return result;
855 if ((result = m_errorCode.Compare(other.m_errorCode)) != EqualTo)
856 return result;
857 if ((result = m_parameter.Compare(other.m_parameter)) != EqualTo)
858 return result;
860 return PASN_Sequence::Compare(other);
864 PINDEX X880_ReturnError::GetDataLength() const
866 PINDEX length = 0;
867 length += m_invokeId.GetObjectLength();
868 length += m_errorCode.GetObjectLength();
869 if (HasOptionalField(e_parameter))
870 length += m_parameter.GetObjectLength();
871 return length;
875 BOOL X880_ReturnError::Decode(PASN_Stream & strm)
877 if (!PreambleDecode(strm))
878 return FALSE;
880 if (!m_invokeId.Decode(strm))
881 return FALSE;
882 if (!m_errorCode.Decode(strm))
883 return FALSE;
884 if (HasOptionalField(e_parameter) && !m_parameter.Decode(strm))
885 return FALSE;
887 return UnknownExtensionsDecode(strm);
891 void X880_ReturnError::Encode(PASN_Stream & strm) const
893 PreambleEncode(strm);
895 m_invokeId.Encode(strm);
896 m_errorCode.Encode(strm);
897 if (HasOptionalField(e_parameter))
898 m_parameter.Encode(strm);
900 UnknownExtensionsEncode(strm);
904 PObject * X880_ReturnError::Clone() const
906 #ifndef PASN_LEANANDMEAN
907 PAssert(IsClass(X880_ReturnError::Class()), PInvalidCast);
908 #endif
909 return new X880_ReturnError(*this);
914 // Reject
917 X880_Reject::X880_Reject(unsigned tag, PASN_Object::TagClass tagClass)
918 : PASN_Sequence(tag, tagClass, 0, FALSE, 0)
923 #ifndef PASN_NOPRINTON
924 void X880_Reject::PrintOn(ostream & strm) const
926 int indent = strm.precision() + 2;
927 strm << "{\n";
928 strm << setw(indent+11) << "invokeId = " << setprecision(indent) << m_invokeId << '\n';
929 strm << setw(indent+10) << "problem = " << setprecision(indent) << m_problem << '\n';
930 strm << setw(indent-1) << setprecision(indent-2) << "}";
932 #endif
935 PObject::Comparison X880_Reject::Compare(const PObject & obj) const
937 #ifndef PASN_LEANANDMEAN
938 PAssert(PIsDescendant(&obj, X880_Reject), PInvalidCast);
939 #endif
940 const X880_Reject & other = (const X880_Reject &)obj;
942 Comparison result;
944 if ((result = m_invokeId.Compare(other.m_invokeId)) != EqualTo)
945 return result;
946 if ((result = m_problem.Compare(other.m_problem)) != EqualTo)
947 return result;
949 return PASN_Sequence::Compare(other);
953 PINDEX X880_Reject::GetDataLength() const
955 PINDEX length = 0;
956 length += m_invokeId.GetObjectLength();
957 length += m_problem.GetObjectLength();
958 return length;
962 BOOL X880_Reject::Decode(PASN_Stream & strm)
964 if (!PreambleDecode(strm))
965 return FALSE;
967 if (!m_invokeId.Decode(strm))
968 return FALSE;
969 if (!m_problem.Decode(strm))
970 return FALSE;
972 return UnknownExtensionsDecode(strm);
976 void X880_Reject::Encode(PASN_Stream & strm) const
978 PreambleEncode(strm);
980 m_invokeId.Encode(strm);
981 m_problem.Encode(strm);
983 UnknownExtensionsEncode(strm);
987 PObject * X880_Reject::Clone() const
989 #ifndef PASN_LEANANDMEAN
990 PAssert(IsClass(X880_Reject::Class()), PInvalidCast);
991 #endif
992 return new X880_Reject(*this);
996 #endif // if ! H323_DISABLE_X880
999 // End of x880.cxx