//
// h4502.cxx
//
// Code automatically generated by asnparse.
//

#ifdef P_USE_PRAGMA
#pragma implementation "h4502.h"
#endif

#include <ptlib.h>
#include "asn/h4502.h"

#define new PNEW


#if ! H323_DISABLE_H4502




#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_DummyArg[]={
      {"extensionSeq",0}
     ,{"nonStandardData",1}
};
#endif
//
// DummyArg
//

H4502_DummyArg::H4502_DummyArg(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Choice(tag, tagClass, 2, PFalse
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_DummyArg,2
#endif
)
{
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_DummyArg::operator H4502_ExtensionSeq &() const
#else
H4502_DummyArg::operator H4502_ExtensionSeq &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


H4502_DummyArg::operator const H4502_ExtensionSeq &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_DummyArg::operator H225_NonStandardParameter &() const
#else
H4502_DummyArg::operator H225_NonStandardParameter &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


H4502_DummyArg::operator const H225_NonStandardParameter &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


PBoolean H4502_DummyArg::CreateObject()
{
  switch (tag) {
    case e_extensionSeq :
      choice = new H4502_ExtensionSeq();
      return PTrue;
    case e_nonStandardData :
      choice = new H225_NonStandardParameter();
      return PTrue;
  }

  choice = NULL;
  return PFalse;
}


PObject * H4502_DummyArg::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_DummyArg::Class()), PInvalidCast);
#endif
  return new H4502_DummyArg(*this);
}



#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_DummyRes[]={
      {"extensionSeq",0}
     ,{"nonStandardData",1}
};
#endif
//
// DummyRes
//

H4502_DummyRes::H4502_DummyRes(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Choice(tag, tagClass, 2, PFalse
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_DummyRes,2
#endif
)
{
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_DummyRes::operator H4502_ExtensionSeq &() const
#else
H4502_DummyRes::operator H4502_ExtensionSeq &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


H4502_DummyRes::operator const H4502_ExtensionSeq &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_DummyRes::operator H225_NonStandardParameter &() const
#else
H4502_DummyRes::operator H225_NonStandardParameter &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


H4502_DummyRes::operator const H225_NonStandardParameter &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


PBoolean H4502_DummyRes::CreateObject()
{
  switch (tag) {
    case e_extensionSeq :
      choice = new H4502_ExtensionSeq();
      return PTrue;
    case e_nonStandardData :
      choice = new H225_NonStandardParameter();
      return PTrue;
  }

  choice = NULL;
  return PFalse;
}


PObject * H4502_DummyRes::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_DummyRes::Class()), PInvalidCast);
#endif
  return new H4502_DummyRes(*this);
}


#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_EndDesignation[]={
        {"primaryEnd",0}
       ,{"secondaryEnd",1}
};
#endif
//
// EndDesignation
//

H4502_EndDesignation::H4502_EndDesignation(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Enumeration(tag, tagClass, 1, PTrue
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_EndDesignation,2
#endif
    )
{
}


H4502_EndDesignation & H4502_EndDesignation::operator=(unsigned v)
{
  SetValue(v);
  return *this;
}


PObject * H4502_EndDesignation::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_EndDesignation::Class()), PInvalidCast);
#endif
  return new H4502_EndDesignation(*this);
}


#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_CallStatus[]={
        {"answered",0}
       ,{"alerting",1}
};
#endif
//
// CallStatus
//

H4502_CallStatus::H4502_CallStatus(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Enumeration(tag, tagClass, 1, PTrue
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_CallStatus,2
#endif
    )
{
}


H4502_CallStatus & H4502_CallStatus::operator=(unsigned v)
{
  SetValue(v);
  return *this;
}


PObject * H4502_CallStatus::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CallStatus::Class()), PInvalidCast);
#endif
  return new H4502_CallStatus(*this);
}


//
// CallIdentity
//

H4502_CallIdentity::H4502_CallIdentity(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_NumericString(tag, tagClass)
{
  SetConstraints(PASN_Object::FixedConstraint, 0, 4);
}


H4502_CallIdentity & H4502_CallIdentity::operator=(const char * v)
{
  SetValue(v);
  return *this;
}


H4502_CallIdentity & H4502_CallIdentity::operator=(const PString & v)
{
  SetValue(v);
  return *this;
}


PObject * H4502_CallIdentity::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CallIdentity::Class()), PInvalidCast);
#endif
  return new H4502_CallIdentity(*this);
}


//
// ExtensionSeq
//

H4502_ExtensionSeq::H4502_ExtensionSeq(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Array(tag, tagClass)
{
}


PASN_Object * H4502_ExtensionSeq::CreateObject() const
{
  return new H4501_Extension;
}


H4501_Extension & H4502_ExtensionSeq::operator[](PINDEX i) const
{
  return (H4501_Extension &)array[i];
}


PObject * H4502_ExtensionSeq::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_ExtensionSeq::Class()), PInvalidCast);
#endif
  return new H4502_ExtensionSeq(*this);
}


#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_CallTransferOperation[]={
        {"callTransferIdentify",7}
       ,{"callTransferAbandon",8}
       ,{"callTransferInitiate",9}
       ,{"callTransferSetup",10}
       ,{"callTransferUpdate",13}
       ,{"subaddressTransfer",14}
       ,{"callTransferComplete",12}
       ,{"callTransferActive",11}
};
#endif
//
// CallTransferOperation
//

H4502_CallTransferOperation::H4502_CallTransferOperation(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Enumeration(tag, tagClass, 14, PFalse
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_CallTransferOperation,8
#endif
    )
{
}


H4502_CallTransferOperation & H4502_CallTransferOperation::operator=(unsigned v)
{
  SetValue(v);
  return *this;
}


PObject * H4502_CallTransferOperation::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CallTransferOperation::Class()), PInvalidCast);
#endif
  return new H4502_CallTransferOperation(*this);
}


#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_CallTransferErrors[]={
        {"unspecified",1008}
       ,{"invalidReroutingNumber",1004}
       ,{"unrecognizedCallIdentity",1005}
       ,{"establishmentFailure",1006}
};
#endif
//
// CallTransferErrors
//

H4502_CallTransferErrors::H4502_CallTransferErrors(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Enumeration(tag, tagClass, 1008, PFalse
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_CallTransferErrors,4
#endif
    )
{
}


H4502_CallTransferErrors & H4502_CallTransferErrors::operator=(unsigned v)
{
  SetValue(v);
  return *this;
}


PObject * H4502_CallTransferErrors::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CallTransferErrors::Class()), PInvalidCast);
#endif
  return new H4502_CallTransferErrors(*this);
}



#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_CTInitiateArg_argumentExtension[]={
      {"extensionSeq",0}
     ,{"nonStandardData",1}
};
#endif
//
// CTInitiateArg_argumentExtension
//

H4502_CTInitiateArg_argumentExtension::H4502_CTInitiateArg_argumentExtension(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Choice(tag, tagClass, 2, PFalse
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_CTInitiateArg_argumentExtension,2
#endif
)
{
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTInitiateArg_argumentExtension::operator H4502_ExtensionSeq &() const
#else
H4502_CTInitiateArg_argumentExtension::operator H4502_ExtensionSeq &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


H4502_CTInitiateArg_argumentExtension::operator const H4502_ExtensionSeq &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTInitiateArg_argumentExtension::operator H225_NonStandardParameter &() const
#else
H4502_CTInitiateArg_argumentExtension::operator H225_NonStandardParameter &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


H4502_CTInitiateArg_argumentExtension::operator const H225_NonStandardParameter &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


PBoolean H4502_CTInitiateArg_argumentExtension::CreateObject()
{
  switch (tag) {
    case e_extensionSeq :
      choice = new H4502_ExtensionSeq();
      return PTrue;
    case e_nonStandardData :
      choice = new H225_NonStandardParameter();
      return PTrue;
  }

  choice = NULL;
  return PFalse;
}


PObject * H4502_CTInitiateArg_argumentExtension::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTInitiateArg_argumentExtension::Class()), PInvalidCast);
#endif
  return new H4502_CTInitiateArg_argumentExtension(*this);
}



#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_CTSetupArg_argumentExtension[]={
      {"extensionSeq",0}
     ,{"nonStandardData",1}
};
#endif
//
// CTSetupArg_argumentExtension
//

H4502_CTSetupArg_argumentExtension::H4502_CTSetupArg_argumentExtension(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Choice(tag, tagClass, 2, PFalse
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_CTSetupArg_argumentExtension,2
#endif
)
{
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTSetupArg_argumentExtension::operator H4502_ExtensionSeq &() const
#else
H4502_CTSetupArg_argumentExtension::operator H4502_ExtensionSeq &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


H4502_CTSetupArg_argumentExtension::operator const H4502_ExtensionSeq &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTSetupArg_argumentExtension::operator H225_NonStandardParameter &() const
#else
H4502_CTSetupArg_argumentExtension::operator H225_NonStandardParameter &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


H4502_CTSetupArg_argumentExtension::operator const H225_NonStandardParameter &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


PBoolean H4502_CTSetupArg_argumentExtension::CreateObject()
{
  switch (tag) {
    case e_extensionSeq :
      choice = new H4502_ExtensionSeq();
      return PTrue;
    case e_nonStandardData :
      choice = new H225_NonStandardParameter();
      return PTrue;
  }

  choice = NULL;
  return PFalse;
}


PObject * H4502_CTSetupArg_argumentExtension::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTSetupArg_argumentExtension::Class()), PInvalidCast);
#endif
  return new H4502_CTSetupArg_argumentExtension(*this);
}



#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_CTIdentifyRes_resultExtension[]={
      {"extensionSeq",0}
     ,{"nonStandardData",1}
};
#endif
//
// CTIdentifyRes_resultExtension
//

H4502_CTIdentifyRes_resultExtension::H4502_CTIdentifyRes_resultExtension(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Choice(tag, tagClass, 2, PFalse
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_CTIdentifyRes_resultExtension,2
#endif
)
{
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTIdentifyRes_resultExtension::operator H4502_ExtensionSeq &() const
#else
H4502_CTIdentifyRes_resultExtension::operator H4502_ExtensionSeq &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


H4502_CTIdentifyRes_resultExtension::operator const H4502_ExtensionSeq &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTIdentifyRes_resultExtension::operator H225_NonStandardParameter &() const
#else
H4502_CTIdentifyRes_resultExtension::operator H225_NonStandardParameter &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


H4502_CTIdentifyRes_resultExtension::operator const H225_NonStandardParameter &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


PBoolean H4502_CTIdentifyRes_resultExtension::CreateObject()
{
  switch (tag) {
    case e_extensionSeq :
      choice = new H4502_ExtensionSeq();
      return PTrue;
    case e_nonStandardData :
      choice = new H225_NonStandardParameter();
      return PTrue;
  }

  choice = NULL;
  return PFalse;
}


PObject * H4502_CTIdentifyRes_resultExtension::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTIdentifyRes_resultExtension::Class()), PInvalidCast);
#endif
  return new H4502_CTIdentifyRes_resultExtension(*this);
}



#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_CTUpdateArg_argumentExtension[]={
      {"extensionSeq",0}
     ,{"nonStandardData",1}
};
#endif
//
// CTUpdateArg_argumentExtension
//

H4502_CTUpdateArg_argumentExtension::H4502_CTUpdateArg_argumentExtension(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Choice(tag, tagClass, 2, PFalse
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_CTUpdateArg_argumentExtension,2
#endif
)
{
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTUpdateArg_argumentExtension::operator H4502_ExtensionSeq &() const
#else
H4502_CTUpdateArg_argumentExtension::operator H4502_ExtensionSeq &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


H4502_CTUpdateArg_argumentExtension::operator const H4502_ExtensionSeq &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTUpdateArg_argumentExtension::operator H225_NonStandardParameter &() const
#else
H4502_CTUpdateArg_argumentExtension::operator H225_NonStandardParameter &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


H4502_CTUpdateArg_argumentExtension::operator const H225_NonStandardParameter &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


PBoolean H4502_CTUpdateArg_argumentExtension::CreateObject()
{
  switch (tag) {
    case e_extensionSeq :
      choice = new H4502_ExtensionSeq();
      return PTrue;
    case e_nonStandardData :
      choice = new H225_NonStandardParameter();
      return PTrue;
  }

  choice = NULL;
  return PFalse;
}


PObject * H4502_CTUpdateArg_argumentExtension::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTUpdateArg_argumentExtension::Class()), PInvalidCast);
#endif
  return new H4502_CTUpdateArg_argumentExtension(*this);
}



#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_SubaddressTransferArg_argumentExtension[]={
      {"extensionSeq",0}
     ,{"nonStandardData",1}
};
#endif
//
// SubaddressTransferArg_argumentExtension
//

H4502_SubaddressTransferArg_argumentExtension::H4502_SubaddressTransferArg_argumentExtension(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Choice(tag, tagClass, 2, PFalse
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_SubaddressTransferArg_argumentExtension,2
#endif
)
{
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_SubaddressTransferArg_argumentExtension::operator H4502_ExtensionSeq &() const
#else
H4502_SubaddressTransferArg_argumentExtension::operator H4502_ExtensionSeq &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


H4502_SubaddressTransferArg_argumentExtension::operator const H4502_ExtensionSeq &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_SubaddressTransferArg_argumentExtension::operator H225_NonStandardParameter &() const
#else
H4502_SubaddressTransferArg_argumentExtension::operator H225_NonStandardParameter &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


H4502_SubaddressTransferArg_argumentExtension::operator const H225_NonStandardParameter &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


PBoolean H4502_SubaddressTransferArg_argumentExtension::CreateObject()
{
  switch (tag) {
    case e_extensionSeq :
      choice = new H4502_ExtensionSeq();
      return PTrue;
    case e_nonStandardData :
      choice = new H225_NonStandardParameter();
      return PTrue;
  }

  choice = NULL;
  return PFalse;
}


PObject * H4502_SubaddressTransferArg_argumentExtension::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_SubaddressTransferArg_argumentExtension::Class()), PInvalidCast);
#endif
  return new H4502_SubaddressTransferArg_argumentExtension(*this);
}



#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_CTCompleteArg_argumentExtension[]={
      {"extensionSeq",0}
     ,{"nonStandardData",1}
};
#endif
//
// CTCompleteArg_argumentExtension
//

H4502_CTCompleteArg_argumentExtension::H4502_CTCompleteArg_argumentExtension(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Choice(tag, tagClass, 2, PFalse
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_CTCompleteArg_argumentExtension,2
#endif
)
{
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTCompleteArg_argumentExtension::operator H4502_ExtensionSeq &() const
#else
H4502_CTCompleteArg_argumentExtension::operator H4502_ExtensionSeq &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


H4502_CTCompleteArg_argumentExtension::operator const H4502_ExtensionSeq &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTCompleteArg_argumentExtension::operator H225_NonStandardParameter &() const
#else
H4502_CTCompleteArg_argumentExtension::operator H225_NonStandardParameter &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


H4502_CTCompleteArg_argumentExtension::operator const H225_NonStandardParameter &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


PBoolean H4502_CTCompleteArg_argumentExtension::CreateObject()
{
  switch (tag) {
    case e_extensionSeq :
      choice = new H4502_ExtensionSeq();
      return PTrue;
    case e_nonStandardData :
      choice = new H225_NonStandardParameter();
      return PTrue;
  }

  choice = NULL;
  return PFalse;
}


PObject * H4502_CTCompleteArg_argumentExtension::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTCompleteArg_argumentExtension::Class()), PInvalidCast);
#endif
  return new H4502_CTCompleteArg_argumentExtension(*this);
}



#ifndef PASN_NOPRINTON
const static PASN_Names Names_H4502_CTActiveArg_argumentExtension[]={
      {"extensionSeq",0}
     ,{"nonStandardData",1}
};
#endif
//
// CTActiveArg_argumentExtension
//

H4502_CTActiveArg_argumentExtension::H4502_CTActiveArg_argumentExtension(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Choice(tag, tagClass, 2, PFalse
#ifndef PASN_NOPRINTON
    ,(const PASN_Names *)Names_H4502_CTActiveArg_argumentExtension,2
#endif
)
{
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTActiveArg_argumentExtension::operator H4502_ExtensionSeq &() const
#else
H4502_CTActiveArg_argumentExtension::operator H4502_ExtensionSeq &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


H4502_CTActiveArg_argumentExtension::operator const H4502_ExtensionSeq &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H4502_ExtensionSeq), PInvalidCast);
#endif
  return *(H4502_ExtensionSeq *)choice;
}


#if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
H4502_CTActiveArg_argumentExtension::operator H225_NonStandardParameter &() const
#else
H4502_CTActiveArg_argumentExtension::operator H225_NonStandardParameter &()
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


H4502_CTActiveArg_argumentExtension::operator const H225_NonStandardParameter &() const
#endif
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(PAssertNULL(choice), H225_NonStandardParameter), PInvalidCast);
#endif
  return *(H225_NonStandardParameter *)choice;
}


PBoolean H4502_CTActiveArg_argumentExtension::CreateObject()
{
  switch (tag) {
    case e_extensionSeq :
      choice = new H4502_ExtensionSeq();
      return PTrue;
    case e_nonStandardData :
      choice = new H225_NonStandardParameter();
      return PTrue;
  }

  choice = NULL;
  return PFalse;
}


PObject * H4502_CTActiveArg_argumentExtension::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTActiveArg_argumentExtension::Class()), PInvalidCast);
#endif
  return new H4502_CTActiveArg_argumentExtension(*this);
}


//
// CTInitiateArg
//

H4502_CTInitiateArg::H4502_CTInitiateArg(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Sequence(tag, tagClass, 1, PTrue, 0)
{
}


#ifndef PASN_NOPRINTON
void H4502_CTInitiateArg::PrintOn(ostream & strm) const
{
  std::streamsize indent = strm.precision() + 2;
  strm << "{\n";
  strm << setw(indent+15) << "callIdentity = " << setprecision(indent) << m_callIdentity << '\n';
  strm << setw(indent+18) << "reroutingNumber = " << setprecision(indent) << m_reroutingNumber << '\n';
  if (HasOptionalField(e_argumentExtension))
    strm << setw(indent+20) << "argumentExtension = " << setprecision(indent) << m_argumentExtension << '\n';
  strm << setw(indent-1) << setprecision(indent-2) << "}";
}
#endif


PObject::Comparison H4502_CTInitiateArg::Compare(const PObject & obj) const
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(&obj, H4502_CTInitiateArg), PInvalidCast);
#endif
  const H4502_CTInitiateArg & other = (const H4502_CTInitiateArg &)obj;

  Comparison result;

  if ((result = m_callIdentity.Compare(other.m_callIdentity)) != EqualTo)
    return result;
  if ((result = m_reroutingNumber.Compare(other.m_reroutingNumber)) != EqualTo)
    return result;
  if ((result = m_argumentExtension.Compare(other.m_argumentExtension)) != EqualTo)
    return result;

  return PASN_Sequence::Compare(other);
}


PINDEX H4502_CTInitiateArg::GetDataLength() const
{
  PINDEX length = 0;
  length += m_callIdentity.GetObjectLength();
  length += m_reroutingNumber.GetObjectLength();
  if (HasOptionalField(e_argumentExtension))
    length += m_argumentExtension.GetObjectLength();
  return length;
}


PBoolean H4502_CTInitiateArg::Decode(PASN_Stream & strm)
{
  if (!PreambleDecode(strm))
    return PFalse;

  if (!m_callIdentity.Decode(strm))
    return PFalse;
  if (!m_reroutingNumber.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_argumentExtension) && !m_argumentExtension.Decode(strm))
    return PFalse;

  return UnknownExtensionsDecode(strm);
}


void H4502_CTInitiateArg::Encode(PASN_Stream & strm) const
{
  PreambleEncode(strm);

  m_callIdentity.Encode(strm);
  m_reroutingNumber.Encode(strm);
  if (HasOptionalField(e_argumentExtension))
    m_argumentExtension.Encode(strm);

  UnknownExtensionsEncode(strm);
}


PObject * H4502_CTInitiateArg::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTInitiateArg::Class()), PInvalidCast);
#endif
  return new H4502_CTInitiateArg(*this);
}


//
// CTSetupArg
//

H4502_CTSetupArg::H4502_CTSetupArg(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Sequence(tag, tagClass, 2, PTrue, 0)
{
}


#ifndef PASN_NOPRINTON
void H4502_CTSetupArg::PrintOn(ostream & strm) const
{
  std::streamsize indent = strm.precision() + 2;
  strm << "{\n";
  strm << setw(indent+15) << "callIdentity = " << setprecision(indent) << m_callIdentity << '\n';
  if (HasOptionalField(e_transferringNumber))
    strm << setw(indent+21) << "transferringNumber = " << setprecision(indent) << m_transferringNumber << '\n';
  if (HasOptionalField(e_argumentExtension))
    strm << setw(indent+20) << "argumentExtension = " << setprecision(indent) << m_argumentExtension << '\n';
  strm << setw(indent-1) << setprecision(indent-2) << "}";
}
#endif


PObject::Comparison H4502_CTSetupArg::Compare(const PObject & obj) const
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(&obj, H4502_CTSetupArg), PInvalidCast);
#endif
  const H4502_CTSetupArg & other = (const H4502_CTSetupArg &)obj;

  Comparison result;

  if ((result = m_callIdentity.Compare(other.m_callIdentity)) != EqualTo)
    return result;
  if ((result = m_transferringNumber.Compare(other.m_transferringNumber)) != EqualTo)
    return result;
  if ((result = m_argumentExtension.Compare(other.m_argumentExtension)) != EqualTo)
    return result;

  return PASN_Sequence::Compare(other);
}


PINDEX H4502_CTSetupArg::GetDataLength() const
{
  PINDEX length = 0;
  length += m_callIdentity.GetObjectLength();
  if (HasOptionalField(e_transferringNumber))
    length += m_transferringNumber.GetObjectLength();
  if (HasOptionalField(e_argumentExtension))
    length += m_argumentExtension.GetObjectLength();
  return length;
}


PBoolean H4502_CTSetupArg::Decode(PASN_Stream & strm)
{
  if (!PreambleDecode(strm))
    return PFalse;

  if (!m_callIdentity.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_transferringNumber) && !m_transferringNumber.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_argumentExtension) && !m_argumentExtension.Decode(strm))
    return PFalse;

  return UnknownExtensionsDecode(strm);
}


void H4502_CTSetupArg::Encode(PASN_Stream & strm) const
{
  PreambleEncode(strm);

  m_callIdentity.Encode(strm);
  if (HasOptionalField(e_transferringNumber))
    m_transferringNumber.Encode(strm);
  if (HasOptionalField(e_argumentExtension))
    m_argumentExtension.Encode(strm);

  UnknownExtensionsEncode(strm);
}


PObject * H4502_CTSetupArg::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTSetupArg::Class()), PInvalidCast);
#endif
  return new H4502_CTSetupArg(*this);
}


//
// CTIdentifyRes
//

H4502_CTIdentifyRes::H4502_CTIdentifyRes(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Sequence(tag, tagClass, 1, PTrue, 0)
{
}


#ifndef PASN_NOPRINTON
void H4502_CTIdentifyRes::PrintOn(ostream & strm) const
{
  std::streamsize indent = strm.precision() + 2;
  strm << "{\n";
  strm << setw(indent+15) << "callIdentity = " << setprecision(indent) << m_callIdentity << '\n';
  strm << setw(indent+18) << "reroutingNumber = " << setprecision(indent) << m_reroutingNumber << '\n';
  if (HasOptionalField(e_resultExtension))
    strm << setw(indent+18) << "resultExtension = " << setprecision(indent) << m_resultExtension << '\n';
  strm << setw(indent-1) << setprecision(indent-2) << "}";
}
#endif


PObject::Comparison H4502_CTIdentifyRes::Compare(const PObject & obj) const
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(&obj, H4502_CTIdentifyRes), PInvalidCast);
#endif
  const H4502_CTIdentifyRes & other = (const H4502_CTIdentifyRes &)obj;

  Comparison result;

  if ((result = m_callIdentity.Compare(other.m_callIdentity)) != EqualTo)
    return result;
  if ((result = m_reroutingNumber.Compare(other.m_reroutingNumber)) != EqualTo)
    return result;
  if ((result = m_resultExtension.Compare(other.m_resultExtension)) != EqualTo)
    return result;

  return PASN_Sequence::Compare(other);
}


PINDEX H4502_CTIdentifyRes::GetDataLength() const
{
  PINDEX length = 0;
  length += m_callIdentity.GetObjectLength();
  length += m_reroutingNumber.GetObjectLength();
  if (HasOptionalField(e_resultExtension))
    length += m_resultExtension.GetObjectLength();
  return length;
}


PBoolean H4502_CTIdentifyRes::Decode(PASN_Stream & strm)
{
  if (!PreambleDecode(strm))
    return PFalse;

  if (!m_callIdentity.Decode(strm))
    return PFalse;
  if (!m_reroutingNumber.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_resultExtension) && !m_resultExtension.Decode(strm))
    return PFalse;

  return UnknownExtensionsDecode(strm);
}


void H4502_CTIdentifyRes::Encode(PASN_Stream & strm) const
{
  PreambleEncode(strm);

  m_callIdentity.Encode(strm);
  m_reroutingNumber.Encode(strm);
  if (HasOptionalField(e_resultExtension))
    m_resultExtension.Encode(strm);

  UnknownExtensionsEncode(strm);
}


PObject * H4502_CTIdentifyRes::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTIdentifyRes::Class()), PInvalidCast);
#endif
  return new H4502_CTIdentifyRes(*this);
}


//
// CTUpdateArg
//

H4502_CTUpdateArg::H4502_CTUpdateArg(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Sequence(tag, tagClass, 3, PTrue, 0)
{
  m_redirectionInfo.SetConstraints(PASN_Object::FixedConstraint, 1, 128);
}


#ifndef PASN_NOPRINTON
void H4502_CTUpdateArg::PrintOn(ostream & strm) const
{
  std::streamsize indent = strm.precision() + 2;
  strm << "{\n";
  strm << setw(indent+20) << "redirectionNumber = " << setprecision(indent) << m_redirectionNumber << '\n';
  if (HasOptionalField(e_redirectionInfo))
    strm << setw(indent+18) << "redirectionInfo = " << setprecision(indent) << m_redirectionInfo << '\n';
  if (HasOptionalField(e_basicCallInfoElements))
    strm << setw(indent+24) << "basicCallInfoElements = " << setprecision(indent) << m_basicCallInfoElements << '\n';
  if (HasOptionalField(e_argumentExtension))
    strm << setw(indent+20) << "argumentExtension = " << setprecision(indent) << m_argumentExtension << '\n';
  strm << setw(indent-1) << setprecision(indent-2) << "}";
}
#endif


PObject::Comparison H4502_CTUpdateArg::Compare(const PObject & obj) const
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(&obj, H4502_CTUpdateArg), PInvalidCast);
#endif
  const H4502_CTUpdateArg & other = (const H4502_CTUpdateArg &)obj;

  Comparison result;

  if ((result = m_redirectionNumber.Compare(other.m_redirectionNumber)) != EqualTo)
    return result;
  if ((result = m_redirectionInfo.Compare(other.m_redirectionInfo)) != EqualTo)
    return result;
  if ((result = m_basicCallInfoElements.Compare(other.m_basicCallInfoElements)) != EqualTo)
    return result;
  if ((result = m_argumentExtension.Compare(other.m_argumentExtension)) != EqualTo)
    return result;

  return PASN_Sequence::Compare(other);
}


PINDEX H4502_CTUpdateArg::GetDataLength() const
{
  PINDEX length = 0;
  length += m_redirectionNumber.GetObjectLength();
  if (HasOptionalField(e_redirectionInfo))
    length += m_redirectionInfo.GetObjectLength();
  if (HasOptionalField(e_basicCallInfoElements))
    length += m_basicCallInfoElements.GetObjectLength();
  if (HasOptionalField(e_argumentExtension))
    length += m_argumentExtension.GetObjectLength();
  return length;
}


PBoolean H4502_CTUpdateArg::Decode(PASN_Stream & strm)
{
  if (!PreambleDecode(strm))
    return PFalse;

  if (!m_redirectionNumber.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_redirectionInfo) && !m_redirectionInfo.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_basicCallInfoElements) && !m_basicCallInfoElements.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_argumentExtension) && !m_argumentExtension.Decode(strm))
    return PFalse;

  return UnknownExtensionsDecode(strm);
}


void H4502_CTUpdateArg::Encode(PASN_Stream & strm) const
{
  PreambleEncode(strm);

  m_redirectionNumber.Encode(strm);
  if (HasOptionalField(e_redirectionInfo))
    m_redirectionInfo.Encode(strm);
  if (HasOptionalField(e_basicCallInfoElements))
    m_basicCallInfoElements.Encode(strm);
  if (HasOptionalField(e_argumentExtension))
    m_argumentExtension.Encode(strm);

  UnknownExtensionsEncode(strm);
}


PObject * H4502_CTUpdateArg::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTUpdateArg::Class()), PInvalidCast);
#endif
  return new H4502_CTUpdateArg(*this);
}


//
// SubaddressTransferArg
//

H4502_SubaddressTransferArg::H4502_SubaddressTransferArg(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Sequence(tag, tagClass, 1, PTrue, 0)
{
}


#ifndef PASN_NOPRINTON
void H4502_SubaddressTransferArg::PrintOn(ostream & strm) const
{
  std::streamsize indent = strm.precision() + 2;
  strm << "{\n";
  strm << setw(indent+24) << "redirectionSubaddress = " << setprecision(indent) << m_redirectionSubaddress << '\n';
  if (HasOptionalField(e_argumentExtension))
    strm << setw(indent+20) << "argumentExtension = " << setprecision(indent) << m_argumentExtension << '\n';
  strm << setw(indent-1) << setprecision(indent-2) << "}";
}
#endif


PObject::Comparison H4502_SubaddressTransferArg::Compare(const PObject & obj) const
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(&obj, H4502_SubaddressTransferArg), PInvalidCast);
#endif
  const H4502_SubaddressTransferArg & other = (const H4502_SubaddressTransferArg &)obj;

  Comparison result;

  if ((result = m_redirectionSubaddress.Compare(other.m_redirectionSubaddress)) != EqualTo)
    return result;
  if ((result = m_argumentExtension.Compare(other.m_argumentExtension)) != EqualTo)
    return result;

  return PASN_Sequence::Compare(other);
}


PINDEX H4502_SubaddressTransferArg::GetDataLength() const
{
  PINDEX length = 0;
  length += m_redirectionSubaddress.GetObjectLength();
  if (HasOptionalField(e_argumentExtension))
    length += m_argumentExtension.GetObjectLength();
  return length;
}


PBoolean H4502_SubaddressTransferArg::Decode(PASN_Stream & strm)
{
  if (!PreambleDecode(strm))
    return PFalse;

  if (!m_redirectionSubaddress.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_argumentExtension) && !m_argumentExtension.Decode(strm))
    return PFalse;

  return UnknownExtensionsDecode(strm);
}


void H4502_SubaddressTransferArg::Encode(PASN_Stream & strm) const
{
  PreambleEncode(strm);

  m_redirectionSubaddress.Encode(strm);
  if (HasOptionalField(e_argumentExtension))
    m_argumentExtension.Encode(strm);

  UnknownExtensionsEncode(strm);
}


PObject * H4502_SubaddressTransferArg::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_SubaddressTransferArg::Class()), PInvalidCast);
#endif
  return new H4502_SubaddressTransferArg(*this);
}


//
// CTCompleteArg
//

H4502_CTCompleteArg::H4502_CTCompleteArg(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Sequence(tag, tagClass, 3, PTrue, 0)
{
  m_redirectionInfo.SetConstraints(PASN_Object::FixedConstraint, 1, 128);
}


#ifndef PASN_NOPRINTON
void H4502_CTCompleteArg::PrintOn(ostream & strm) const
{
  std::streamsize indent = strm.precision() + 2;
  strm << "{\n";
  strm << setw(indent+17) << "endDesignation = " << setprecision(indent) << m_endDesignation << '\n';
  strm << setw(indent+20) << "redirectionNumber = " << setprecision(indent) << m_redirectionNumber << '\n';
  if (HasOptionalField(e_basicCallInfoElements))
    strm << setw(indent+24) << "basicCallInfoElements = " << setprecision(indent) << m_basicCallInfoElements << '\n';
  if (HasOptionalField(e_redirectionInfo))
    strm << setw(indent+18) << "redirectionInfo = " << setprecision(indent) << m_redirectionInfo << '\n';
  strm << setw(indent+13) << "callStatus = " << setprecision(indent) << m_callStatus << '\n';
  if (HasOptionalField(e_argumentExtension))
    strm << setw(indent+20) << "argumentExtension = " << setprecision(indent) << m_argumentExtension << '\n';
  strm << setw(indent-1) << setprecision(indent-2) << "}";
}
#endif


PObject::Comparison H4502_CTCompleteArg::Compare(const PObject & obj) const
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(&obj, H4502_CTCompleteArg), PInvalidCast);
#endif
  const H4502_CTCompleteArg & other = (const H4502_CTCompleteArg &)obj;

  Comparison result;

  if ((result = m_endDesignation.Compare(other.m_endDesignation)) != EqualTo)
    return result;
  if ((result = m_redirectionNumber.Compare(other.m_redirectionNumber)) != EqualTo)
    return result;
  if ((result = m_basicCallInfoElements.Compare(other.m_basicCallInfoElements)) != EqualTo)
    return result;
  if ((result = m_redirectionInfo.Compare(other.m_redirectionInfo)) != EqualTo)
    return result;
  if ((result = m_callStatus.Compare(other.m_callStatus)) != EqualTo)
    return result;
  if ((result = m_argumentExtension.Compare(other.m_argumentExtension)) != EqualTo)
    return result;

  return PASN_Sequence::Compare(other);
}


PINDEX H4502_CTCompleteArg::GetDataLength() const
{
  PINDEX length = 0;
  length += m_endDesignation.GetObjectLength();
  length += m_redirectionNumber.GetObjectLength();
  if (HasOptionalField(e_basicCallInfoElements))
    length += m_basicCallInfoElements.GetObjectLength();
  if (HasOptionalField(e_redirectionInfo))
    length += m_redirectionInfo.GetObjectLength();
  length += m_callStatus.GetObjectLength();
  if (HasOptionalField(e_argumentExtension))
    length += m_argumentExtension.GetObjectLength();
  return length;
}


PBoolean H4502_CTCompleteArg::Decode(PASN_Stream & strm)
{
  if (!PreambleDecode(strm))
    return PFalse;

  if (!m_endDesignation.Decode(strm))
    return PFalse;
  if (!m_redirectionNumber.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_basicCallInfoElements) && !m_basicCallInfoElements.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_redirectionInfo) && !m_redirectionInfo.Decode(strm))
    return PFalse;
  if (!m_callStatus.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_argumentExtension) && !m_argumentExtension.Decode(strm))
    return PFalse;

  return UnknownExtensionsDecode(strm);
}


void H4502_CTCompleteArg::Encode(PASN_Stream & strm) const
{
  PreambleEncode(strm);

  m_endDesignation.Encode(strm);
  m_redirectionNumber.Encode(strm);
  if (HasOptionalField(e_basicCallInfoElements))
    m_basicCallInfoElements.Encode(strm);
  if (HasOptionalField(e_redirectionInfo))
    m_redirectionInfo.Encode(strm);
  m_callStatus.Encode(strm);
  if (HasOptionalField(e_argumentExtension))
    m_argumentExtension.Encode(strm);

  UnknownExtensionsEncode(strm);
}


PObject * H4502_CTCompleteArg::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTCompleteArg::Class()), PInvalidCast);
#endif
  return new H4502_CTCompleteArg(*this);
}


//
// CTActiveArg
//

H4502_CTActiveArg::H4502_CTActiveArg(unsigned tag, PASN_Object::TagClass tagClass)
  : PASN_Sequence(tag, tagClass, 3, PTrue, 0)
{
  m_connectedInfo.SetConstraints(PASN_Object::FixedConstraint, 1, 128);
}


#ifndef PASN_NOPRINTON
void H4502_CTActiveArg::PrintOn(ostream & strm) const
{
  std::streamsize indent = strm.precision() + 2;
  strm << "{\n";
  strm << setw(indent+19) << "connectedAddress = " << setprecision(indent) << m_connectedAddress << '\n';
  if (HasOptionalField(e_basicCallInfoElements))
    strm << setw(indent+24) << "basicCallInfoElements = " << setprecision(indent) << m_basicCallInfoElements << '\n';
  if (HasOptionalField(e_connectedInfo))
    strm << setw(indent+16) << "connectedInfo = " << setprecision(indent) << m_connectedInfo << '\n';
  if (HasOptionalField(e_argumentExtension))
    strm << setw(indent+20) << "argumentExtension = " << setprecision(indent) << m_argumentExtension << '\n';
  strm << setw(indent-1) << setprecision(indent-2) << "}";
}
#endif


PObject::Comparison H4502_CTActiveArg::Compare(const PObject & obj) const
{
#ifndef PASN_LEANANDMEAN
  PAssert(PIsDescendant(&obj, H4502_CTActiveArg), PInvalidCast);
#endif
  const H4502_CTActiveArg & other = (const H4502_CTActiveArg &)obj;

  Comparison result;

  if ((result = m_connectedAddress.Compare(other.m_connectedAddress)) != EqualTo)
    return result;
  if ((result = m_basicCallInfoElements.Compare(other.m_basicCallInfoElements)) != EqualTo)
    return result;
  if ((result = m_connectedInfo.Compare(other.m_connectedInfo)) != EqualTo)
    return result;
  if ((result = m_argumentExtension.Compare(other.m_argumentExtension)) != EqualTo)
    return result;

  return PASN_Sequence::Compare(other);
}


PINDEX H4502_CTActiveArg::GetDataLength() const
{
  PINDEX length = 0;
  length += m_connectedAddress.GetObjectLength();
  if (HasOptionalField(e_basicCallInfoElements))
    length += m_basicCallInfoElements.GetObjectLength();
  if (HasOptionalField(e_connectedInfo))
    length += m_connectedInfo.GetObjectLength();
  if (HasOptionalField(e_argumentExtension))
    length += m_argumentExtension.GetObjectLength();
  return length;
}


PBoolean H4502_CTActiveArg::Decode(PASN_Stream & strm)
{
  if (!PreambleDecode(strm))
    return PFalse;

  if (!m_connectedAddress.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_basicCallInfoElements) && !m_basicCallInfoElements.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_connectedInfo) && !m_connectedInfo.Decode(strm))
    return PFalse;
  if (HasOptionalField(e_argumentExtension) && !m_argumentExtension.Decode(strm))
    return PFalse;

  return UnknownExtensionsDecode(strm);
}


void H4502_CTActiveArg::Encode(PASN_Stream & strm) const
{
  PreambleEncode(strm);

  m_connectedAddress.Encode(strm);
  if (HasOptionalField(e_basicCallInfoElements))
    m_basicCallInfoElements.Encode(strm);
  if (HasOptionalField(e_connectedInfo))
    m_connectedInfo.Encode(strm);
  if (HasOptionalField(e_argumentExtension))
    m_argumentExtension.Encode(strm);

  UnknownExtensionsEncode(strm);
}


PObject * H4502_CTActiveArg::Clone() const
{
#ifndef PASN_LEANANDMEAN
  PAssert(IsClass(H4502_CTActiveArg::Class()), PInvalidCast);
#endif
  return new H4502_CTActiveArg(*this);
}


#endif // if ! H323_DISABLE_H4502


// End of h4502.cxx
