4 // Code automatically generated by asnparse.
8 #pragma implementation "x880.h"
17 #if ! H323_DISABLE_X880
20 #ifndef PASN_NOPRINTON
21 const static PASN_Names Names_X880_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
42 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
43 X880_ROS::operator X880_Invoke &() const
45 X880_ROS::operator X880_Invoke &()
47 #ifndef PASN_LEANANDMEAN
48 PAssert(PIsDescendant(PAssertNULL(choice), X880_Invoke), PInvalidCast);
50 return *(X880_Invoke *)choice;
54 X880_ROS::operator const X880_Invoke &() const
57 #ifndef PASN_LEANANDMEAN
58 PAssert(PIsDescendant(PAssertNULL(choice), X880_Invoke), PInvalidCast);
60 return *(X880_Invoke *)choice;
64 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
65 X880_ROS::operator X880_ReturnResult &() const
67 X880_ROS::operator X880_ReturnResult &()
69 #ifndef PASN_LEANANDMEAN
70 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnResult), PInvalidCast);
72 return *(X880_ReturnResult *)choice;
76 X880_ROS::operator const X880_ReturnResult &() const
79 #ifndef PASN_LEANANDMEAN
80 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnResult), PInvalidCast);
82 return *(X880_ReturnResult *)choice;
86 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
87 X880_ROS::operator X880_ReturnError &() const
89 X880_ROS::operator X880_ReturnError &()
91 #ifndef PASN_LEANANDMEAN
92 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnError), PInvalidCast);
94 return *(X880_ReturnError *)choice;
98 X880_ROS::operator const X880_ReturnError &() const
101 #ifndef PASN_LEANANDMEAN
102 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnError), PInvalidCast);
104 return *(X880_ReturnError *)choice;
108 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
109 X880_ROS::operator X880_Reject &() const
111 X880_ROS::operator X880_Reject &()
113 #ifndef PASN_LEANANDMEAN
114 PAssert(PIsDescendant(PAssertNULL(choice), X880_Reject), PInvalidCast);
116 return *(X880_Reject *)choice;
120 X880_ROS::operator const X880_Reject &() const
123 #ifndef PASN_LEANANDMEAN
124 PAssert(PIsDescendant(PAssertNULL(choice), X880_Reject), PInvalidCast);
126 return *(X880_Reject *)choice;
130 BOOL X880_ROS::CreateObject()
134 choice = new X880_Invoke(1, ContextSpecificTagClass);
136 case e_returnResult :
137 choice = new X880_ReturnResult(2, ContextSpecificTagClass);
140 choice = new X880_ReturnError(3, ContextSpecificTagClass);
143 choice = new X880_Reject(4, ContextSpecificTagClass);
152 PObject * X880_ROS::Clone() const
154 #ifndef PASN_LEANANDMEAN
155 PAssert(IsClass(X880_ROS::Class()), PInvalidCast);
157 return new X880_ROS(*this);
165 X880_GeneralProblem::X880_GeneralProblem(unsigned tag, PASN_Object::TagClass tagClass)
166 : PASN_Integer(tag, tagClass)
171 X880_GeneralProblem & X880_GeneralProblem::operator=(int v)
178 X880_GeneralProblem & X880_GeneralProblem::operator=(unsigned v)
185 PObject * X880_GeneralProblem::Clone() const
187 #ifndef PASN_LEANANDMEAN
188 PAssert(IsClass(X880_GeneralProblem::Class()), PInvalidCast);
190 return new X880_GeneralProblem(*this);
198 X880_InvokeProblem::X880_InvokeProblem(unsigned tag, PASN_Object::TagClass tagClass)
199 : PASN_Integer(tag, tagClass)
204 X880_InvokeProblem & X880_InvokeProblem::operator=(int v)
211 X880_InvokeProblem & X880_InvokeProblem::operator=(unsigned v)
218 PObject * X880_InvokeProblem::Clone() const
220 #ifndef PASN_LEANANDMEAN
221 PAssert(IsClass(X880_InvokeProblem::Class()), PInvalidCast);
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)
244 X880_ReturnResultProblem & X880_ReturnResultProblem::operator=(unsigned v)
251 PObject * X880_ReturnResultProblem::Clone() const
253 #ifndef PASN_LEANANDMEAN
254 PAssert(IsClass(X880_ReturnResultProblem::Class()), PInvalidCast);
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)
277 X880_ReturnErrorProblem & X880_ReturnErrorProblem::operator=(unsigned v)
284 PObject * X880_ReturnErrorProblem::Clone() const
286 #ifndef PASN_LEANANDMEAN
287 PAssert(IsClass(X880_ReturnErrorProblem::Class()), PInvalidCast);
289 return new X880_ReturnErrorProblem(*this);
297 X880_RejectProblem::X880_RejectProblem(unsigned tag, PASN_Object::TagClass tagClass)
298 : PASN_Integer(tag, tagClass)
303 X880_RejectProblem & X880_RejectProblem::operator=(int v)
310 X880_RejectProblem & X880_RejectProblem::operator=(unsigned v)
317 PObject * X880_RejectProblem::Clone() const
319 #ifndef PASN_LEANANDMEAN
320 PAssert(IsClass(X880_RejectProblem::Class()), PInvalidCast);
322 return new X880_RejectProblem(*this);
330 X880_InvokeId::X880_InvokeId(unsigned tag, PASN_Object::TagClass tagClass)
331 : PASN_Integer(tag, tagClass)
336 X880_InvokeId & X880_InvokeId::operator=(int v)
343 X880_InvokeId & X880_InvokeId::operator=(unsigned v)
350 PObject * X880_InvokeId::Clone() const
352 #ifndef PASN_LEANANDMEAN
353 PAssert(IsClass(X880_InvokeId::Class()), PInvalidCast);
355 return new X880_InvokeId(*this);
360 #ifndef PASN_NOPRINTON
361 const static PASN_Names Names_X880_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
380 BOOL X880_Code::CreateObject()
384 choice = new PASN_Integer();
387 choice = new PASN_ObjectId();
396 PObject * X880_Code::Clone() const
398 #ifndef PASN_LEANANDMEAN
399 PAssert(IsClass(X880_Code::Class()), PInvalidCast);
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;
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) << "}";
427 PObject::Comparison X880_ReturnResult_result::Compare(const PObject & obj) const
429 #ifndef PASN_LEANANDMEAN
430 PAssert(PIsDescendant(&obj, X880_ReturnResult_result), PInvalidCast);
432 const X880_ReturnResult_result & other = (const X880_ReturnResult_result &)obj;
436 if ((result = m_opcode.Compare(other.m_opcode)) != EqualTo)
438 if ((result = m_result.Compare(other.m_result)) != EqualTo)
441 return PASN_Sequence::Compare(other);
445 PINDEX X880_ReturnResult_result::GetDataLength() const
448 length += m_opcode.GetObjectLength();
449 length += m_result.GetObjectLength();
454 BOOL X880_ReturnResult_result::Decode(PASN_Stream & strm)
456 if (!PreambleDecode(strm))
459 if (!m_opcode.Decode(strm))
461 if (!m_result.Decode(strm))
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);
484 return new X880_ReturnResult_result(*this);
489 #ifndef PASN_NOPRINTON
490 const static PASN_Names Names_X880_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
511 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
512 X880_Reject_problem::operator X880_GeneralProblem &() const
514 X880_Reject_problem::operator X880_GeneralProblem &()
516 #ifndef PASN_LEANANDMEAN
517 PAssert(PIsDescendant(PAssertNULL(choice), X880_GeneralProblem), PInvalidCast);
519 return *(X880_GeneralProblem *)choice;
523 X880_Reject_problem::operator const X880_GeneralProblem &() const
526 #ifndef PASN_LEANANDMEAN
527 PAssert(PIsDescendant(PAssertNULL(choice), X880_GeneralProblem), PInvalidCast);
529 return *(X880_GeneralProblem *)choice;
533 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
534 X880_Reject_problem::operator X880_InvokeProblem &() const
536 X880_Reject_problem::operator X880_InvokeProblem &()
538 #ifndef PASN_LEANANDMEAN
539 PAssert(PIsDescendant(PAssertNULL(choice), X880_InvokeProblem), PInvalidCast);
541 return *(X880_InvokeProblem *)choice;
545 X880_Reject_problem::operator const X880_InvokeProblem &() const
548 #ifndef PASN_LEANANDMEAN
549 PAssert(PIsDescendant(PAssertNULL(choice), X880_InvokeProblem), PInvalidCast);
551 return *(X880_InvokeProblem *)choice;
555 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
556 X880_Reject_problem::operator X880_ReturnResultProblem &() const
558 X880_Reject_problem::operator X880_ReturnResultProblem &()
560 #ifndef PASN_LEANANDMEAN
561 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnResultProblem), PInvalidCast);
563 return *(X880_ReturnResultProblem *)choice;
567 X880_Reject_problem::operator const X880_ReturnResultProblem &() const
570 #ifndef PASN_LEANANDMEAN
571 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnResultProblem), PInvalidCast);
573 return *(X880_ReturnResultProblem *)choice;
577 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
578 X880_Reject_problem::operator X880_ReturnErrorProblem &() const
580 X880_Reject_problem::operator X880_ReturnErrorProblem &()
582 #ifndef PASN_LEANANDMEAN
583 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnErrorProblem), PInvalidCast);
585 return *(X880_ReturnErrorProblem *)choice;
589 X880_Reject_problem::operator const X880_ReturnErrorProblem &() const
592 #ifndef PASN_LEANANDMEAN
593 PAssert(PIsDescendant(PAssertNULL(choice), X880_ReturnErrorProblem), PInvalidCast);
595 return *(X880_ReturnErrorProblem *)choice;
599 BOOL X880_Reject_problem::CreateObject()
603 choice = new X880_GeneralProblem();
606 choice = new X880_InvokeProblem();
608 case e_returnResult :
609 choice = new X880_ReturnResultProblem();
612 choice = new X880_ReturnErrorProblem();
621 PObject * X880_Reject_problem::Clone() const
623 #ifndef PASN_LEANANDMEAN
624 PAssert(IsClass(X880_Reject_problem::Class()), PInvalidCast);
626 return new X880_Reject_problem(*this);
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;
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) << "}";
657 PObject::Comparison X880_Invoke::Compare(const PObject & obj) const
659 #ifndef PASN_LEANANDMEAN
660 PAssert(PIsDescendant(&obj, X880_Invoke), PInvalidCast);
662 const X880_Invoke & other = (const X880_Invoke &)obj;
666 if ((result = m_invokeId.Compare(other.m_invokeId)) != EqualTo)
668 if ((result = m_linkedId.Compare(other.m_linkedId)) != EqualTo)
670 if ((result = m_opcode.Compare(other.m_opcode)) != EqualTo)
672 if ((result = m_argument.Compare(other.m_argument)) != EqualTo)
675 return PASN_Sequence::Compare(other);
679 PINDEX X880_Invoke::GetDataLength() const
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();
692 BOOL X880_Invoke::Decode(PASN_Stream & strm)
694 if (!PreambleDecode(strm))
697 if (!m_invokeId.Decode(strm))
699 if (HasOptionalField(e_linkedId) && !m_linkedId.Decode(strm))
701 if (!m_opcode.Decode(strm))
703 if (HasOptionalField(e_argument) && !m_argument.Decode(strm))
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);
730 return new X880_Invoke(*this);
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;
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) << "}";
757 PObject::Comparison X880_ReturnResult::Compare(const PObject & obj) const
759 #ifndef PASN_LEANANDMEAN
760 PAssert(PIsDescendant(&obj, X880_ReturnResult), PInvalidCast);
762 const X880_ReturnResult & other = (const X880_ReturnResult &)obj;
766 if ((result = m_invokeId.Compare(other.m_invokeId)) != EqualTo)
768 if ((result = m_result.Compare(other.m_result)) != EqualTo)
771 return PASN_Sequence::Compare(other);
775 PINDEX X880_ReturnResult::GetDataLength() const
778 length += m_invokeId.GetObjectLength();
779 if (HasOptionalField(e_result))
780 length += m_result.GetObjectLength();
785 BOOL X880_ReturnResult::Decode(PASN_Stream & strm)
787 if (!PreambleDecode(strm))
790 if (!m_invokeId.Decode(strm))
792 if (HasOptionalField(e_result) && !m_result.Decode(strm))
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);
816 return new X880_ReturnResult(*this);
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;
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) << "}";
844 PObject::Comparison X880_ReturnError::Compare(const PObject & obj) const
846 #ifndef PASN_LEANANDMEAN
847 PAssert(PIsDescendant(&obj, X880_ReturnError), PInvalidCast);
849 const X880_ReturnError & other = (const X880_ReturnError &)obj;
853 if ((result = m_invokeId.Compare(other.m_invokeId)) != EqualTo)
855 if ((result = m_errorCode.Compare(other.m_errorCode)) != EqualTo)
857 if ((result = m_parameter.Compare(other.m_parameter)) != EqualTo)
860 return PASN_Sequence::Compare(other);
864 PINDEX X880_ReturnError::GetDataLength() const
867 length += m_invokeId.GetObjectLength();
868 length += m_errorCode.GetObjectLength();
869 if (HasOptionalField(e_parameter))
870 length += m_parameter.GetObjectLength();
875 BOOL X880_ReturnError::Decode(PASN_Stream & strm)
877 if (!PreambleDecode(strm))
880 if (!m_invokeId.Decode(strm))
882 if (!m_errorCode.Decode(strm))
884 if (HasOptionalField(e_parameter) && !m_parameter.Decode(strm))
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);
909 return new X880_ReturnError(*this);
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;
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) << "}";
935 PObject::Comparison X880_Reject::Compare(const PObject & obj) const
937 #ifndef PASN_LEANANDMEAN
938 PAssert(PIsDescendant(&obj, X880_Reject), PInvalidCast);
940 const X880_Reject & other = (const X880_Reject &)obj;
944 if ((result = m_invokeId.Compare(other.m_invokeId)) != EqualTo)
946 if ((result = m_problem.Compare(other.m_problem)) != EqualTo)
949 return PASN_Sequence::Compare(other);
953 PINDEX X880_Reject::GetDataLength() const
956 length += m_invokeId.GetObjectLength();
957 length += m_problem.GetObjectLength();
962 BOOL X880_Reject::Decode(PASN_Stream & strm)
964 if (!PreambleDecode(strm))
967 if (!m_invokeId.Decode(strm))
969 if (!m_problem.Decode(strm))
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);
992 return new X880_Reject(*this);
996 #endif // if ! H323_DISABLE_X880