home *** CD-ROM | disk | FTP | other *** search
/ ftp.muug.mb.ca / 2014.06.ftp.muug.mb.ca.tar / ftp.muug.mb.ca / pub / openh323.tar.gz / openh323.tar / openh323 / src / h4501.cxx < prev    next >
C/C++ Source or Header  |  2004-06-22  |  38KB  |  1,636 lines

  1. //
  2. // h4501.cxx
  3. //
  4. // Code automatically generated by asnparse.
  5. //
  6.  
  7. #ifdef __GNUC__
  8. #pragma implementation "h4501.h"
  9. #endif
  10.  
  11. #include <ptlib.h>
  12. #include "h4501.h"
  13.  
  14. #define new PNEW
  15.  
  16.  
  17. #if ! H323_DISABLE_H4501
  18.  
  19.  
  20.  
  21. //
  22. // EntityType
  23. //
  24.  
  25. H4501_EntityType::H4501_EntityType(unsigned tag, PASN_Object::TagClass tagClass)
  26.   : PASN_Choice(tag, tagClass, 2, TRUE
  27. #ifndef PASN_NOPRINTON
  28.       , "endpoint "
  29.         "anyEntity "
  30. #endif
  31.     )
  32. {
  33. }
  34.  
  35.  
  36. BOOL H4501_EntityType::CreateObject()
  37. {
  38.   choice = (tag <= e_anyEntity) ? new PASN_Null() : NULL;
  39.   return choice != NULL;
  40. }
  41.  
  42.  
  43. PObject * H4501_EntityType::Clone() const
  44. {
  45. #ifndef PASN_LEANANDMEAN
  46.   PAssert(IsClass(H4501_EntityType::Class()), PInvalidCast);
  47. #endif
  48.   return new H4501_EntityType(*this);
  49. }
  50.  
  51.  
  52. //
  53. // AddressInformation
  54. //
  55.  
  56. H4501_AddressInformation::H4501_AddressInformation(unsigned tag, PASN_Object::TagClass tagClass)
  57.   : H225_AliasAddress(tag, tagClass)
  58. {
  59. }
  60.  
  61.  
  62. PObject * H4501_AddressInformation::Clone() const
  63. {
  64. #ifndef PASN_LEANANDMEAN
  65.   PAssert(IsClass(H4501_AddressInformation::Class()), PInvalidCast);
  66. #endif
  67.   return new H4501_AddressInformation(*this);
  68. }
  69.  
  70.  
  71. //
  72. // InterpretationApdu
  73. //
  74.  
  75. H4501_InterpretationApdu::H4501_InterpretationApdu(unsigned tag, PASN_Object::TagClass tagClass)
  76.   : PASN_Choice(tag, tagClass, 3, TRUE
  77. #ifndef PASN_NOPRINTON
  78.       , "discardAnyUnrecognizedInvokePdu "
  79.         "clearCallIfAnyInvokePduNotRecognized "
  80.         "rejectAnyUnrecognizedInvokePdu "
  81. #endif
  82.     )
  83. {
  84. }
  85.  
  86.  
  87. BOOL H4501_InterpretationApdu::CreateObject()
  88. {
  89.   choice = (tag <= e_rejectAnyUnrecognizedInvokePdu) ? new PASN_Null() : NULL;
  90.   return choice != NULL;
  91. }
  92.  
  93.  
  94. PObject * H4501_InterpretationApdu::Clone() const
  95. {
  96. #ifndef PASN_LEANANDMEAN
  97.   PAssert(IsClass(H4501_InterpretationApdu::Class()), PInvalidCast);
  98. #endif
  99.   return new H4501_InterpretationApdu(*this);
  100. }
  101.  
  102.  
  103. //
  104. // ServiceApdus
  105. //
  106.  
  107. H4501_ServiceApdus::H4501_ServiceApdus(unsigned tag, PASN_Object::TagClass tagClass)
  108.   : PASN_Choice(tag, tagClass, 1, TRUE
  109. #ifndef PASN_NOPRINTON
  110.       , "rosApdus "
  111. #endif
  112.     )
  113. {
  114. }
  115.  
  116.  
  117. #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
  118. H4501_ServiceApdus::operator H4501_ArrayOf_ROS &() const
  119. #else
  120. H4501_ServiceApdus::operator H4501_ArrayOf_ROS &()
  121. {
  122. #ifndef PASN_LEANANDMEAN
  123.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_ArrayOf_ROS::Class()), PInvalidCast);
  124. #endif
  125.   return *(H4501_ArrayOf_ROS *)choice;
  126. }
  127.  
  128.  
  129. H4501_ServiceApdus::operator const H4501_ArrayOf_ROS &() const
  130. #endif
  131. {
  132. #ifndef PASN_LEANANDMEAN
  133.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_ArrayOf_ROS::Class()), PInvalidCast);
  134. #endif
  135.   return *(H4501_ArrayOf_ROS *)choice;
  136. }
  137.  
  138.  
  139. BOOL H4501_ServiceApdus::CreateObject()
  140. {
  141.   switch (tag) {
  142.     case e_rosApdus :
  143.       choice = new H4501_ArrayOf_ROS();
  144.       choice->SetConstraints(PASN_Object::FixedConstraint, 1, MaximumValue);
  145.       return TRUE;
  146.   }
  147.  
  148.   choice = NULL;
  149.   return FALSE;
  150. }
  151.  
  152.  
  153. PObject * H4501_ServiceApdus::Clone() const
  154. {
  155. #ifndef PASN_LEANANDMEAN
  156.   PAssert(IsClass(H4501_ServiceApdus::Class()), PInvalidCast);
  157. #endif
  158.   return new H4501_ServiceApdus(*this);
  159. }
  160.  
  161.  
  162. //
  163. // InvokeIdSet
  164. //
  165.  
  166. H4501_InvokeIdSet::H4501_InvokeIdSet(unsigned tag, PASN_Object::TagClass tagClass)
  167.   : PASN_Integer(tag, tagClass)
  168. {
  169. }
  170.  
  171.  
  172. H4501_InvokeIdSet & H4501_InvokeIdSet::operator=(int v)
  173. {
  174.   SetValue(v);
  175.   return *this;
  176. }
  177.  
  178.  
  179. H4501_InvokeIdSet & H4501_InvokeIdSet::operator=(unsigned v)
  180. {
  181.   SetValue(v);
  182.   return *this;
  183. }
  184.  
  185.  
  186. PObject * H4501_InvokeIdSet::Clone() const
  187. {
  188. #ifndef PASN_LEANANDMEAN
  189.   PAssert(IsClass(H4501_InvokeIdSet::Class()), PInvalidCast);
  190. #endif
  191.   return new H4501_InvokeIdSet(*this);
  192. }
  193.  
  194.  
  195. //
  196. // InvokeIDs
  197. //
  198.  
  199. H4501_InvokeIDs::H4501_InvokeIDs(unsigned tag, PASN_Object::TagClass tagClass)
  200.   : PASN_Integer(tag, tagClass)
  201. {
  202.   SetConstraints(PASN_Object::FixedConstraint, 0, 65535);
  203. }
  204.  
  205.  
  206. H4501_InvokeIDs & H4501_InvokeIDs::operator=(int v)
  207. {
  208.   SetValue(v);
  209.   return *this;
  210. }
  211.  
  212.  
  213. H4501_InvokeIDs & H4501_InvokeIDs::operator=(unsigned v)
  214. {
  215.   SetValue(v);
  216.   return *this;
  217. }
  218.  
  219.  
  220. PObject * H4501_InvokeIDs::Clone() const
  221. {
  222. #ifndef PASN_LEANANDMEAN
  223.   PAssert(IsClass(H4501_InvokeIDs::Class()), PInvalidCast);
  224. #endif
  225.   return new H4501_InvokeIDs(*this);
  226. }
  227.  
  228.  
  229. //
  230. // PresentedAddressScreened
  231. //
  232.  
  233. H4501_PresentedAddressScreened::H4501_PresentedAddressScreened(unsigned tag, PASN_Object::TagClass tagClass)
  234.   : PASN_Choice(tag, tagClass, 4, TRUE
  235. #ifndef PASN_NOPRINTON
  236.       , "presentationAllowedAddress "
  237.         "presentationRestricted "
  238.         "numberNotAvailableDueToInterworking "
  239.         "presentationRestrictedAddress "
  240. #endif
  241.     )
  242. {
  243. }
  244.  
  245.  
  246. #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
  247. H4501_PresentedAddressScreened::operator H4501_AddressScreened &() const
  248. #else
  249. H4501_PresentedAddressScreened::operator H4501_AddressScreened &()
  250. {
  251. #ifndef PASN_LEANANDMEAN
  252.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_AddressScreened::Class()), PInvalidCast);
  253. #endif
  254.   return *(H4501_AddressScreened *)choice;
  255. }
  256.  
  257.  
  258. H4501_PresentedAddressScreened::operator const H4501_AddressScreened &() const
  259. #endif
  260. {
  261. #ifndef PASN_LEANANDMEAN
  262.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_AddressScreened::Class()), PInvalidCast);
  263. #endif
  264.   return *(H4501_AddressScreened *)choice;
  265. }
  266.  
  267.  
  268. BOOL H4501_PresentedAddressScreened::CreateObject()
  269. {
  270.   switch (tag) {
  271.     case e_presentationAllowedAddress :
  272.     case e_presentationRestrictedAddress :
  273.       choice = new H4501_AddressScreened();
  274.       return TRUE;
  275.     case e_presentationRestricted :
  276.     case e_numberNotAvailableDueToInterworking :
  277.       choice = new PASN_Null();
  278.       return TRUE;
  279.   }
  280.  
  281.   choice = NULL;
  282.   return FALSE;
  283. }
  284.  
  285.  
  286. PObject * H4501_PresentedAddressScreened::Clone() const
  287. {
  288. #ifndef PASN_LEANANDMEAN
  289.   PAssert(IsClass(H4501_PresentedAddressScreened::Class()), PInvalidCast);
  290. #endif
  291.   return new H4501_PresentedAddressScreened(*this);
  292. }
  293.  
  294.  
  295. //
  296. // PresentedAddressUnscreened
  297. //
  298.  
  299. H4501_PresentedAddressUnscreened::H4501_PresentedAddressUnscreened(unsigned tag, PASN_Object::TagClass tagClass)
  300.   : PASN_Choice(tag, tagClass, 4, TRUE
  301. #ifndef PASN_NOPRINTON
  302.       , "presentationAllowedAddress "
  303.         "presentationRestricted "
  304.         "numberNotAvailableDueToInterworking "
  305.         "presentationRestrictedAddress "
  306. #endif
  307.     )
  308. {
  309. }
  310.  
  311.  
  312. #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
  313. H4501_PresentedAddressUnscreened::operator H4501_Address &() const
  314. #else
  315. H4501_PresentedAddressUnscreened::operator H4501_Address &()
  316. {
  317. #ifndef PASN_LEANANDMEAN
  318.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_Address::Class()), PInvalidCast);
  319. #endif
  320.   return *(H4501_Address *)choice;
  321. }
  322.  
  323.  
  324. H4501_PresentedAddressUnscreened::operator const H4501_Address &() const
  325. #endif
  326. {
  327. #ifndef PASN_LEANANDMEAN
  328.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_Address::Class()), PInvalidCast);
  329. #endif
  330.   return *(H4501_Address *)choice;
  331. }
  332.  
  333.  
  334. BOOL H4501_PresentedAddressUnscreened::CreateObject()
  335. {
  336.   switch (tag) {
  337.     case e_presentationAllowedAddress :
  338.     case e_presentationRestrictedAddress :
  339.       choice = new H4501_Address();
  340.       return TRUE;
  341.     case e_presentationRestricted :
  342.     case e_numberNotAvailableDueToInterworking :
  343.       choice = new PASN_Null();
  344.       return TRUE;
  345.   }
  346.  
  347.   choice = NULL;
  348.   return FALSE;
  349. }
  350.  
  351.  
  352. PObject * H4501_PresentedAddressUnscreened::Clone() const
  353. {
  354. #ifndef PASN_LEANANDMEAN
  355.   PAssert(IsClass(H4501_PresentedAddressUnscreened::Class()), PInvalidCast);
  356. #endif
  357.   return new H4501_PresentedAddressUnscreened(*this);
  358. }
  359.  
  360.  
  361. //
  362. // PresentedNumberScreened
  363. //
  364.  
  365. H4501_PresentedNumberScreened::H4501_PresentedNumberScreened(unsigned tag, PASN_Object::TagClass tagClass)
  366.   : PASN_Choice(tag, tagClass, 4, TRUE
  367. #ifndef PASN_NOPRINTON
  368.       , "presentationAllowedAddress "
  369.         "presentationRestricted "
  370.         "numberNotAvailableDueToInterworking "
  371.         "presentationRestrictedAddress "
  372. #endif
  373.     )
  374. {
  375. }
  376.  
  377.  
  378. #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
  379. H4501_PresentedNumberScreened::operator H4501_NumberScreened &() const
  380. #else
  381. H4501_PresentedNumberScreened::operator H4501_NumberScreened &()
  382. {
  383. #ifndef PASN_LEANANDMEAN
  384.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_NumberScreened::Class()), PInvalidCast);
  385. #endif
  386.   return *(H4501_NumberScreened *)choice;
  387. }
  388.  
  389.  
  390. H4501_PresentedNumberScreened::operator const H4501_NumberScreened &() const
  391. #endif
  392. {
  393. #ifndef PASN_LEANANDMEAN
  394.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_NumberScreened::Class()), PInvalidCast);
  395. #endif
  396.   return *(H4501_NumberScreened *)choice;
  397. }
  398.  
  399.  
  400. BOOL H4501_PresentedNumberScreened::CreateObject()
  401. {
  402.   switch (tag) {
  403.     case e_presentationAllowedAddress :
  404.     case e_presentationRestrictedAddress :
  405.       choice = new H4501_NumberScreened();
  406.       return TRUE;
  407.     case e_presentationRestricted :
  408.     case e_numberNotAvailableDueToInterworking :
  409.       choice = new PASN_Null();
  410.       return TRUE;
  411.   }
  412.  
  413.   choice = NULL;
  414.   return FALSE;
  415. }
  416.  
  417.  
  418. PObject * H4501_PresentedNumberScreened::Clone() const
  419. {
  420. #ifndef PASN_LEANANDMEAN
  421.   PAssert(IsClass(H4501_PresentedNumberScreened::Class()), PInvalidCast);
  422. #endif
  423.   return new H4501_PresentedNumberScreened(*this);
  424. }
  425.  
  426.  
  427. //
  428. // PresentedNumberUnscreened
  429. //
  430.  
  431. H4501_PresentedNumberUnscreened::H4501_PresentedNumberUnscreened(unsigned tag, PASN_Object::TagClass tagClass)
  432.   : PASN_Choice(tag, tagClass, 4, TRUE
  433. #ifndef PASN_NOPRINTON
  434.       , "presentationAllowedAddress "
  435.         "presentationRestricted "
  436.         "numberNotAvailableDueToInterworking "
  437.         "presentationRestrictedAddress "
  438. #endif
  439.     )
  440. {
  441. }
  442.  
  443.  
  444. #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
  445. H4501_PresentedNumberUnscreened::operator H225_PartyNumber &() const
  446. #else
  447. H4501_PresentedNumberUnscreened::operator H225_PartyNumber &()
  448. {
  449. #ifndef PASN_LEANANDMEAN
  450.   PAssert(PAssertNULL(choice)->IsDescendant(H225_PartyNumber::Class()), PInvalidCast);
  451. #endif
  452.   return *(H225_PartyNumber *)choice;
  453. }
  454.  
  455.  
  456. H4501_PresentedNumberUnscreened::operator const H225_PartyNumber &() const
  457. #endif
  458. {
  459. #ifndef PASN_LEANANDMEAN
  460.   PAssert(PAssertNULL(choice)->IsDescendant(H225_PartyNumber::Class()), PInvalidCast);
  461. #endif
  462.   return *(H225_PartyNumber *)choice;
  463. }
  464.  
  465.  
  466. BOOL H4501_PresentedNumberUnscreened::CreateObject()
  467. {
  468.   switch (tag) {
  469.     case e_presentationAllowedAddress :
  470.     case e_presentationRestrictedAddress :
  471.       choice = new H225_PartyNumber();
  472.       return TRUE;
  473.     case e_presentationRestricted :
  474.     case e_numberNotAvailableDueToInterworking :
  475.       choice = new PASN_Null();
  476.       return TRUE;
  477.   }
  478.  
  479.   choice = NULL;
  480.   return FALSE;
  481. }
  482.  
  483.  
  484. PObject * H4501_PresentedNumberUnscreened::Clone() const
  485. {
  486. #ifndef PASN_LEANANDMEAN
  487.   PAssert(IsClass(H4501_PresentedNumberUnscreened::Class()), PInvalidCast);
  488. #endif
  489.   return new H4501_PresentedNumberUnscreened(*this);
  490. }
  491.  
  492.  
  493. //
  494. // PartySubaddress
  495. //
  496.  
  497. H4501_PartySubaddress::H4501_PartySubaddress(unsigned tag, PASN_Object::TagClass tagClass)
  498.   : PASN_Choice(tag, tagClass, 2, TRUE
  499. #ifndef PASN_NOPRINTON
  500.       , "userSpecifiedSubaddress "
  501.         "nsapSubaddress "
  502. #endif
  503.     )
  504. {
  505. }
  506.  
  507.  
  508. #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
  509. H4501_PartySubaddress::operator H4501_UserSpecifiedSubaddress &() const
  510. #else
  511. H4501_PartySubaddress::operator H4501_UserSpecifiedSubaddress &()
  512. {
  513. #ifndef PASN_LEANANDMEAN
  514.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_UserSpecifiedSubaddress::Class()), PInvalidCast);
  515. #endif
  516.   return *(H4501_UserSpecifiedSubaddress *)choice;
  517. }
  518.  
  519.  
  520. H4501_PartySubaddress::operator const H4501_UserSpecifiedSubaddress &() const
  521. #endif
  522. {
  523. #ifndef PASN_LEANANDMEAN
  524.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_UserSpecifiedSubaddress::Class()), PInvalidCast);
  525. #endif
  526.   return *(H4501_UserSpecifiedSubaddress *)choice;
  527. }
  528.  
  529.  
  530. #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
  531. H4501_PartySubaddress::operator H4501_NSAPSubaddress &() const
  532. #else
  533. H4501_PartySubaddress::operator H4501_NSAPSubaddress &()
  534. {
  535. #ifndef PASN_LEANANDMEAN
  536.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_NSAPSubaddress::Class()), PInvalidCast);
  537. #endif
  538.   return *(H4501_NSAPSubaddress *)choice;
  539. }
  540.  
  541.  
  542. H4501_PartySubaddress::operator const H4501_NSAPSubaddress &() const
  543. #endif
  544. {
  545. #ifndef PASN_LEANANDMEAN
  546.   PAssert(PAssertNULL(choice)->IsDescendant(H4501_NSAPSubaddress::Class()), PInvalidCast);
  547. #endif
  548.   return *(H4501_NSAPSubaddress *)choice;
  549. }
  550.  
  551.  
  552. BOOL H4501_PartySubaddress::CreateObject()
  553. {
  554.   switch (tag) {
  555.     case e_userSpecifiedSubaddress :
  556.       choice = new H4501_UserSpecifiedSubaddress();
  557.       return TRUE;
  558.     case e_nsapSubaddress :
  559.       choice = new H4501_NSAPSubaddress();
  560.       return TRUE;
  561.   }
  562.  
  563.   choice = NULL;
  564.   return FALSE;
  565. }
  566.  
  567.  
  568. PObject * H4501_PartySubaddress::Clone() const
  569. {
  570. #ifndef PASN_LEANANDMEAN
  571.   PAssert(IsClass(H4501_PartySubaddress::Class()), PInvalidCast);
  572. #endif
  573.   return new H4501_PartySubaddress(*this);
  574. }
  575.  
  576.  
  577. //
  578. // NSAPSubaddress
  579. //
  580.  
  581. H4501_NSAPSubaddress::H4501_NSAPSubaddress(unsigned tag, PASN_Object::TagClass tagClass)
  582.   : PASN_OctetString(tag, tagClass)
  583. {
  584.   SetConstraints(PASN_Object::FixedConstraint, 1, 20);
  585. }
  586.  
  587.  
  588. H4501_NSAPSubaddress::H4501_NSAPSubaddress(const char * v)
  589. {
  590.   SetValue(v);
  591. }
  592.  
  593.  
  594. H4501_NSAPSubaddress::H4501_NSAPSubaddress(const PString & v)
  595. {
  596.   SetValue(v);
  597. }
  598.  
  599.  
  600. H4501_NSAPSubaddress::H4501_NSAPSubaddress(const PBYTEArray & v)
  601. {
  602.   SetValue(v);
  603. }
  604.  
  605.  
  606. H4501_NSAPSubaddress & H4501_NSAPSubaddress::operator=(const char * v)
  607. {
  608.   SetValue(v);
  609.   return *this;
  610. }
  611.  
  612.  
  613. H4501_NSAPSubaddress & H4501_NSAPSubaddress::operator=(const PString & v)
  614. {
  615.   SetValue(v);
  616.   return *this;
  617. }
  618.  
  619.  
  620. H4501_NSAPSubaddress & H4501_NSAPSubaddress::operator=(const PBYTEArray & v)
  621. {
  622.   SetValue(v);
  623.   return *this;
  624. }
  625.  
  626.  
  627. PObject * H4501_NSAPSubaddress::Clone() const
  628. {
  629. #ifndef PASN_LEANANDMEAN
  630.   PAssert(IsClass(H4501_NSAPSubaddress::Class()), PInvalidCast);
  631. #endif
  632.   return new H4501_NSAPSubaddress(*this);
  633. }
  634.  
  635.  
  636. //
  637. // SubaddressInformation
  638. //
  639.  
  640. H4501_SubaddressInformation::H4501_SubaddressInformation(unsigned tag, PASN_Object::TagClass tagClass)
  641.   : PASN_OctetString(tag, tagClass)
  642. {
  643.   SetConstraints(PASN_Object::FixedConstraint, 1, 20);
  644. }
  645.  
  646.  
  647. H4501_SubaddressInformation::H4501_SubaddressInformation(const char * v)
  648. {
  649.   SetValue(v);
  650. }
  651.  
  652.  
  653. H4501_SubaddressInformation::H4501_SubaddressInformation(const PString & v)
  654. {
  655.   SetValue(v);
  656. }
  657.  
  658.  
  659. H4501_SubaddressInformation::H4501_SubaddressInformation(const PBYTEArray & v)
  660. {
  661.   SetValue(v);
  662. }
  663.  
  664.  
  665. H4501_SubaddressInformation & H4501_SubaddressInformation::operator=(const char * v)
  666. {
  667.   SetValue(v);
  668.   return *this;
  669. }
  670.  
  671.  
  672. H4501_SubaddressInformation & H4501_SubaddressInformation::operator=(const PString & v)
  673. {
  674.   SetValue(v);
  675.   return *this;
  676. }
  677.  
  678.  
  679. H4501_SubaddressInformation & H4501_SubaddressInformation::operator=(const PBYTEArray & v)
  680. {
  681.   SetValue(v);
  682.   return *this;
  683. }
  684.  
  685.  
  686. PObject * H4501_SubaddressInformation::Clone() const
  687. {
  688. #ifndef PASN_LEANANDMEAN
  689.   PAssert(IsClass(H4501_SubaddressInformation::Class()), PInvalidCast);
  690. #endif
  691.   return new H4501_SubaddressInformation(*this);
  692. }
  693.  
  694.  
  695. //
  696. // ScreeningIndicator
  697. //
  698.  
  699. H4501_ScreeningIndicator::H4501_ScreeningIndicator(unsigned tag, PASN_Object::TagClass tagClass)
  700.   : PASN_Enumeration(tag, tagClass, 3, TRUE
  701. #ifndef PASN_NOPRINTON
  702.       , "userProvidedNotScreened "
  703.         "userProvidedVerifiedAndPassed "
  704.         "userProvidedVerifiedAndFailed "
  705.         "networkProvided "
  706. #endif
  707.     )
  708. {
  709. }
  710.  
  711.  
  712. H4501_ScreeningIndicator & H4501_ScreeningIndicator::operator=(unsigned v)
  713. {
  714.   SetValue(v);
  715.   return *this;
  716. }
  717.  
  718.  
  719. PObject * H4501_ScreeningIndicator::Clone() const
  720. {
  721. #ifndef PASN_LEANANDMEAN
  722.   PAssert(IsClass(H4501_ScreeningIndicator::Class()), PInvalidCast);
  723. #endif
  724.   return new H4501_ScreeningIndicator(*this);
  725. }
  726.  
  727.  
  728. //
  729. // PresentationAllowedIndicator
  730. //
  731.  
  732. H4501_PresentationAllowedIndicator::H4501_PresentationAllowedIndicator(unsigned tag, PASN_Object::TagClass tagClass)
  733.   : PASN_Boolean(tag, tagClass)
  734. {
  735. }
  736.  
  737.  
  738. H4501_PresentationAllowedIndicator & H4501_PresentationAllowedIndicator::operator=(BOOL v)
  739. {
  740.   SetValue(v);
  741.   return *this;
  742. }
  743.  
  744.  
  745. PObject * H4501_PresentationAllowedIndicator::Clone() const
  746. {
  747. #ifndef PASN_LEANANDMEAN
  748.   PAssert(IsClass(H4501_PresentationAllowedIndicator::Class()), PInvalidCast);
  749. #endif
  750.   return new H4501_PresentationAllowedIndicator(*this);
  751. }
  752.  
  753.  
  754. //
  755. // GeneralErrorList
  756. //
  757.  
  758. H4501_GeneralErrorList::H4501_GeneralErrorList(unsigned tag, PASN_Object::TagClass tagClass)
  759.   : PASN_Enumeration(tag, tagClass, 43, FALSE
  760. #ifndef PASN_NOPRINTON
  761.       , "userNotSubscribed "
  762.         "rejectedByNetwork "
  763.         "rejectedByUser "
  764.         "notAvailable "
  765.         "insufficientInformation=5 "
  766.         "invalidServedUserNumber "
  767.         "invalidCallState "
  768.         "basicServiceNotProvided "
  769.         "notIncomingCall "
  770.         "supplementaryServiceInteractionNotAllowed "
  771.         "resourceUnavailable "
  772.         "callFailure=25 "
  773.         "proceduralError=43 "
  774. #endif
  775.     )
  776. {
  777. }
  778.  
  779.  
  780. H4501_GeneralErrorList & H4501_GeneralErrorList::operator=(unsigned v)
  781. {
  782.   SetValue(v);
  783.   return *this;
  784. }
  785.  
  786.  
  787. PObject * H4501_GeneralErrorList::Clone() const
  788. {
  789. #ifndef PASN_LEANANDMEAN
  790.   PAssert(IsClass(H4501_GeneralErrorList::Class()), PInvalidCast);
  791. #endif
  792.   return new H4501_GeneralErrorList(*this);
  793. }
  794.  
  795.  
  796. //
  797. // H225InformationElement
  798. //
  799.  
  800. H4501_H225InformationElement::H4501_H225InformationElement(unsigned tag, PASN_Object::TagClass tagClass)
  801.   : PASN_OctetString(tag, tagClass)
  802. {
  803. }
  804.  
  805.  
  806. H4501_H225InformationElement::H4501_H225InformationElement(const char * v)
  807. {
  808.   SetValue(v);
  809. }
  810.  
  811.  
  812. H4501_H225InformationElement::H4501_H225InformationElement(const PString & v)
  813. {
  814.   SetValue(v);
  815. }
  816.  
  817.  
  818. H4501_H225InformationElement::H4501_H225InformationElement(const PBYTEArray & v)
  819. {
  820.   SetValue(v);
  821. }
  822.  
  823.  
  824. H4501_H225InformationElement & H4501_H225InformationElement::operator=(const char * v)
  825. {
  826.   SetValue(v);
  827.   return *this;
  828. }
  829.  
  830.  
  831. H4501_H225InformationElement & H4501_H225InformationElement::operator=(const PString & v)
  832. {
  833.   SetValue(v);
  834.   return *this;
  835. }
  836.  
  837.  
  838. H4501_H225InformationElement & H4501_H225InformationElement::operator=(const PBYTEArray & v)
  839. {
  840.   SetValue(v);
  841.   return *this;
  842. }
  843.  
  844.  
  845. PObject * H4501_H225InformationElement::Clone() const
  846. {
  847. #ifndef PASN_LEANANDMEAN
  848.   PAssert(IsClass(H4501_H225InformationElement::Class()), PInvalidCast);
  849. #endif
  850.   return new H4501_H225InformationElement(*this);
  851. }
  852.  
  853.  
  854. //
  855. // Extension
  856. //
  857.  
  858. H4501_Extension::H4501_Extension(unsigned tag, PASN_Object::TagClass tagClass)
  859.   : PASN_Sequence(tag, tagClass, 0, FALSE, 0)
  860. {
  861. }
  862.  
  863.  
  864. #ifndef PASN_NOPRINTON
  865. void H4501_Extension::PrintOn(ostream & strm) const
  866. {
  867.   int indent = strm.precision() + 2;
  868.   strm << "{\n";
  869.   strm << setw(indent+14) << "extensionId = " << setprecision(indent) << m_extensionId << '\n';
  870.   strm << setw(indent+20) << "extensionArgument = " << setprecision(indent) << m_extensionArgument << '\n';
  871.   strm << setw(indent-1) << "}";
  872. }
  873. #endif
  874.  
  875.  
  876. PObject::Comparison H4501_Extension::Compare(const PObject & obj) const
  877. {
  878. #ifndef PASN_LEANANDMEAN
  879.   PAssert(IsDescendant(H4501_Extension::Class()), PInvalidCast);
  880. #endif
  881.   const H4501_Extension & other = (const H4501_Extension &)obj;
  882.  
  883.   Comparison result;
  884.  
  885.   if ((result = m_extensionId.Compare(other.m_extensionId)) != EqualTo)
  886.     return result;
  887.   if ((result = m_extensionArgument.Compare(other.m_extensionArgument)) != EqualTo)
  888.     return result;
  889.  
  890.   return PASN_Sequence::Compare(other);
  891. }
  892.  
  893.  
  894. PINDEX H4501_Extension::GetDataLength() const
  895. {
  896.   PINDEX length = 0;
  897.   length += m_extensionId.GetObjectLength();
  898.   length += m_extensionArgument.GetObjectLength();
  899.   return length;
  900. }
  901.  
  902.  
  903. BOOL H4501_Extension::Decode(PASN_Stream & strm)
  904. {
  905.   if (!PreambleDecode(strm))
  906.     return FALSE;
  907.  
  908.   if (!m_extensionId.Decode(strm))
  909.     return FALSE;
  910.   if (!m_extensionArgument.Decode(strm))
  911.     return FALSE;
  912.  
  913.   return UnknownExtensionsDecode(strm);
  914. }
  915.  
  916.  
  917. void H4501_Extension::Encode(PASN_Stream & strm) const
  918. {
  919.   PreambleEncode(strm);
  920.  
  921.   m_extensionId.Encode(strm);
  922.   m_extensionArgument.Encode(strm);
  923.  
  924.   UnknownExtensionsEncode(strm);
  925. }
  926.  
  927.  
  928. PObject * H4501_Extension::Clone() const
  929. {
  930. #ifndef PASN_LEANANDMEAN
  931.   PAssert(IsClass(H4501_Extension::Class()), PInvalidCast);
  932. #endif
  933.   return new H4501_Extension(*this);
  934. }
  935.  
  936.  
  937. //
  938. // ArrayOf_ROS
  939. //
  940.  
  941. H4501_ArrayOf_ROS::H4501_ArrayOf_ROS(unsigned tag, PASN_Object::TagClass tagClass)
  942.   : PASN_Array(tag, tagClass)
  943. {
  944. }
  945.  
  946.  
  947. PASN_Object * H4501_ArrayOf_ROS::CreateObject() const
  948. {
  949.   return new X880_ROS;
  950. }
  951.  
  952.  
  953. X880_ROS & H4501_ArrayOf_ROS::operator[](PINDEX i) const
  954. {
  955.   return (X880_ROS &)array[i];
  956. }
  957.  
  958.  
  959. PObject * H4501_ArrayOf_ROS::Clone() const
  960. {
  961. #ifndef PASN_LEANANDMEAN
  962.   PAssert(IsClass(H4501_ArrayOf_ROS::Class()), PInvalidCast);
  963. #endif
  964.   return new H4501_ArrayOf_ROS(*this);
  965. }
  966.  
  967.  
  968. //
  969. // ArrayOf_AliasAddress
  970. //
  971.  
  972. H4501_ArrayOf_AliasAddress::H4501_ArrayOf_AliasAddress(unsigned tag, PASN_Object::TagClass tagClass)
  973.   : PASN_Array(tag, tagClass)
  974. {
  975. }
  976.  
  977.  
  978. PASN_Object * H4501_ArrayOf_AliasAddress::CreateObject() const
  979. {
  980.   return new H225_AliasAddress;
  981. }
  982.  
  983.  
  984. H225_AliasAddress & H4501_ArrayOf_AliasAddress::operator[](PINDEX i) const
  985. {
  986.   return (H225_AliasAddress &)array[i];
  987. }
  988.  
  989.  
  990. PObject * H4501_ArrayOf_AliasAddress::Clone() const
  991. {
  992. #ifndef PASN_LEANANDMEAN
  993.   PAssert(IsClass(H4501_ArrayOf_AliasAddress::Class()), PInvalidCast);
  994. #endif
  995.   return new H4501_ArrayOf_AliasAddress(*this);
  996. }
  997.  
  998.  
  999. //
  1000. // NetworkFacilityExtension
  1001. //
  1002.  
  1003. H4501_NetworkFacilityExtension::H4501_NetworkFacilityExtension(unsigned tag, PASN_Object::TagClass tagClass)
  1004.   : PASN_Sequence(tag, tagClass, 2, TRUE, 0)
  1005. {
  1006. }
  1007.  
  1008.  
  1009. #ifndef PASN_NOPRINTON
  1010. void H4501_NetworkFacilityExtension::PrintOn(ostream & strm) const
  1011. {
  1012.   int indent = strm.precision() + 2;
  1013.   strm << "{\n";
  1014.   strm << setw(indent+15) << "sourceEntity = " << setprecision(indent) << m_sourceEntity << '\n';
  1015.   if (HasOptionalField(e_sourceEntityAddress))
  1016.     strm << setw(indent+22) << "sourceEntityAddress = " << setprecision(indent) << m_sourceEntityAddress << '\n';
  1017.   strm << setw(indent+20) << "destinationEntity = " << setprecision(indent) << m_destinationEntity << '\n';
  1018.   if (HasOptionalField(e_destinationEntityAddress))
  1019.     strm << setw(indent+27) << "destinationEntityAddress = " << setprecision(indent) << m_destinationEntityAddress << '\n';
  1020.   strm << setw(indent-1) << "}";
  1021. }
  1022. #endif
  1023.  
  1024.  
  1025. PObject::Comparison H4501_NetworkFacilityExtension::Compare(const PObject & obj) const
  1026. {
  1027. #ifndef PASN_LEANANDMEAN
  1028.   PAssert(IsDescendant(H4501_NetworkFacilityExtension::Class()), PInvalidCast);
  1029. #endif
  1030.   const H4501_NetworkFacilityExtension & other = (const H4501_NetworkFacilityExtension &)obj;
  1031.  
  1032.   Comparison result;
  1033.  
  1034.   if ((result = m_sourceEntity.Compare(other.m_sourceEntity)) != EqualTo)
  1035.     return result;
  1036.   if ((result = m_sourceEntityAddress.Compare(other.m_sourceEntityAddress)) != EqualTo)
  1037.     return result;
  1038.   if ((result = m_destinationEntity.Compare(other.m_destinationEntity)) != EqualTo)
  1039.     return result;
  1040.   if ((result = m_destinationEntityAddress.Compare(other.m_destinationEntityAddress)) != EqualTo)
  1041.     return result;
  1042.  
  1043.   return PASN_Sequence::Compare(other);
  1044. }
  1045.  
  1046.  
  1047. PINDEX H4501_NetworkFacilityExtension::GetDataLength() const
  1048. {
  1049.   PINDEX length = 0;
  1050.   length += m_sourceEntity.GetObjectLength();
  1051.   if (HasOptionalField(e_sourceEntityAddress))
  1052.     length += m_sourceEntityAddress.GetObjectLength();
  1053.   length += m_destinationEntity.GetObjectLength();
  1054.   if (HasOptionalField(e_destinationEntityAddress))
  1055.     length += m_destinationEntityAddress.GetObjectLength();
  1056.   return length;
  1057. }
  1058.  
  1059.  
  1060. BOOL H4501_NetworkFacilityExtension::Decode(PASN_Stream & strm)
  1061. {
  1062.   if (!PreambleDecode(strm))
  1063.     return FALSE;
  1064.  
  1065.   if (!m_sourceEntity.Decode(strm))
  1066.     return FALSE;
  1067.   if (HasOptionalField(e_sourceEntityAddress) && !m_sourceEntityAddress.Decode(strm))
  1068.     return FALSE;
  1069.   if (!m_destinationEntity.Decode(strm))
  1070.     return FALSE;
  1071.   if (HasOptionalField(e_destinationEntityAddress) && !m_destinationEntityAddress.Decode(strm))
  1072.     return FALSE;
  1073.  
  1074.   return UnknownExtensionsDecode(strm);
  1075. }
  1076.  
  1077.  
  1078. void H4501_NetworkFacilityExtension::Encode(PASN_Stream & strm) const
  1079. {
  1080.   PreambleEncode(strm);
  1081.  
  1082.   m_sourceEntity.Encode(strm);
  1083.   if (HasOptionalField(e_sourceEntityAddress))
  1084.     m_sourceEntityAddress.Encode(strm);
  1085.   m_destinationEntity.Encode(strm);
  1086.   if (HasOptionalField(e_destinationEntityAddress))
  1087.     m_destinationEntityAddress.Encode(strm);
  1088.  
  1089.   UnknownExtensionsEncode(strm);
  1090. }
  1091.  
  1092.  
  1093. PObject * H4501_NetworkFacilityExtension::Clone() const
  1094. {
  1095. #ifndef PASN_LEANANDMEAN
  1096.   PAssert(IsClass(H4501_NetworkFacilityExtension::Class()), PInvalidCast);
  1097. #endif
  1098.   return new H4501_NetworkFacilityExtension(*this);
  1099. }
  1100.  
  1101.  
  1102. //
  1103. // AddressScreened
  1104. //
  1105.  
  1106. H4501_AddressScreened::H4501_AddressScreened(unsigned tag, PASN_Object::TagClass tagClass)
  1107.   : PASN_Sequence(tag, tagClass, 1, TRUE, 0)
  1108. {
  1109. }
  1110.  
  1111.  
  1112. #ifndef PASN_NOPRINTON
  1113. void H4501_AddressScreened::PrintOn(ostream & strm) const
  1114. {
  1115.   int indent = strm.precision() + 2;
  1116.   strm << "{\n";
  1117.   strm << setw(indent+14) << "partyNumber = " << setprecision(indent) << m_partyNumber << '\n';
  1118.   strm << setw(indent+21) << "screeningIndicator = " << setprecision(indent) << m_screeningIndicator << '\n';
  1119.   if (HasOptionalField(e_partySubaddress))
  1120.     strm << setw(indent+18) << "partySubaddress = " << setprecision(indent) << m_partySubaddress << '\n';
  1121.   strm << setw(indent-1) << "}";
  1122. }
  1123. #endif
  1124.  
  1125.  
  1126. PObject::Comparison H4501_AddressScreened::Compare(const PObject & obj) const
  1127. {
  1128. #ifndef PASN_LEANANDMEAN
  1129.   PAssert(IsDescendant(H4501_AddressScreened::Class()), PInvalidCast);
  1130. #endif
  1131.   const H4501_AddressScreened & other = (const H4501_AddressScreened &)obj;
  1132.  
  1133.   Comparison result;
  1134.  
  1135.   if ((result = m_partyNumber.Compare(other.m_partyNumber)) != EqualTo)
  1136.     return result;
  1137.   if ((result = m_screeningIndicator.Compare(other.m_screeningIndicator)) != EqualTo)
  1138.     return result;
  1139.   if ((result = m_partySubaddress.Compare(other.m_partySubaddress)) != EqualTo)
  1140.     return result;
  1141.  
  1142.   return PASN_Sequence::Compare(other);
  1143. }
  1144.  
  1145.  
  1146. PINDEX H4501_AddressScreened::GetDataLength() const
  1147. {
  1148.   PINDEX length = 0;
  1149.   length += m_partyNumber.GetObjectLength();
  1150.   length += m_screeningIndicator.GetObjectLength();
  1151.   if (HasOptionalField(e_partySubaddress))
  1152.     length += m_partySubaddress.GetObjectLength();
  1153.   return length;
  1154. }
  1155.  
  1156.  
  1157. BOOL H4501_AddressScreened::Decode(PASN_Stream & strm)
  1158. {
  1159.   if (!PreambleDecode(strm))
  1160.     return FALSE;
  1161.  
  1162.   if (!m_partyNumber.Decode(strm))
  1163.     return FALSE;
  1164.   if (!m_screeningIndicator.Decode(strm))
  1165.     return FALSE;
  1166.   if (HasOptionalField(e_partySubaddress) && !m_partySubaddress.Decode(strm))
  1167.     return FALSE;
  1168.  
  1169.   return UnknownExtensionsDecode(strm);
  1170. }
  1171.  
  1172.  
  1173. void H4501_AddressScreened::Encode(PASN_Stream & strm) const
  1174. {
  1175.   PreambleEncode(strm);
  1176.  
  1177.   m_partyNumber.Encode(strm);
  1178.   m_screeningIndicator.Encode(strm);
  1179.   if (HasOptionalField(e_partySubaddress))
  1180.     m_partySubaddress.Encode(strm);
  1181.  
  1182.   UnknownExtensionsEncode(strm);
  1183. }
  1184.  
  1185.  
  1186. PObject * H4501_AddressScreened::Clone() const
  1187. {
  1188. #ifndef PASN_LEANANDMEAN
  1189.   PAssert(IsClass(H4501_AddressScreened::Class()), PInvalidCast);
  1190. #endif
  1191.   return new H4501_AddressScreened(*this);
  1192. }
  1193.  
  1194.  
  1195. //
  1196. // NumberScreened
  1197. //
  1198.  
  1199. H4501_NumberScreened::H4501_NumberScreened(unsigned tag, PASN_Object::TagClass tagClass)
  1200.   : PASN_Sequence(tag, tagClass, 0, TRUE, 0)
  1201. {
  1202. }
  1203.  
  1204.  
  1205. #ifndef PASN_NOPRINTON
  1206. void H4501_NumberScreened::PrintOn(ostream & strm) const
  1207. {
  1208.   int indent = strm.precision() + 2;
  1209.   strm << "{\n";
  1210.   strm << setw(indent+14) << "partyNumber = " << setprecision(indent) << m_partyNumber << '\n';
  1211.   strm << setw(indent+21) << "screeningIndicator = " << setprecision(indent) << m_screeningIndicator << '\n';
  1212.   strm << setw(indent-1) << "}";
  1213. }
  1214. #endif
  1215.  
  1216.  
  1217. PObject::Comparison H4501_NumberScreened::Compare(const PObject & obj) const
  1218. {
  1219. #ifndef PASN_LEANANDMEAN
  1220.   PAssert(IsDescendant(H4501_NumberScreened::Class()), PInvalidCast);
  1221. #endif
  1222.   const H4501_NumberScreened & other = (const H4501_NumberScreened &)obj;
  1223.  
  1224.   Comparison result;
  1225.  
  1226.   if ((result = m_partyNumber.Compare(other.m_partyNumber)) != EqualTo)
  1227.     return result;
  1228.   if ((result = m_screeningIndicator.Compare(other.m_screeningIndicator)) != EqualTo)
  1229.     return result;
  1230.  
  1231.   return PASN_Sequence::Compare(other);
  1232. }
  1233.  
  1234.  
  1235. PINDEX H4501_NumberScreened::GetDataLength() const
  1236. {
  1237.   PINDEX length = 0;
  1238.   length += m_partyNumber.GetObjectLength();
  1239.   length += m_screeningIndicator.GetObjectLength();
  1240.   return length;
  1241. }
  1242.  
  1243.  
  1244. BOOL H4501_NumberScreened::Decode(PASN_Stream & strm)
  1245. {
  1246.   if (!PreambleDecode(strm))
  1247.     return FALSE;
  1248.  
  1249.   if (!m_partyNumber.Decode(strm))
  1250.     return FALSE;
  1251.   if (!m_screeningIndicator.Decode(strm))
  1252.     return FALSE;
  1253.  
  1254.   return UnknownExtensionsDecode(strm);
  1255. }
  1256.  
  1257.  
  1258. void H4501_NumberScreened::Encode(PASN_Stream & strm) const
  1259. {
  1260.   PreambleEncode(strm);
  1261.  
  1262.   m_partyNumber.Encode(strm);
  1263.   m_screeningIndicator.Encode(strm);
  1264.  
  1265.   UnknownExtensionsEncode(strm);
  1266. }
  1267.  
  1268.  
  1269. PObject * H4501_NumberScreened::Clone() const
  1270. {
  1271. #ifndef PASN_LEANANDMEAN
  1272.   PAssert(IsClass(H4501_NumberScreened::Class()), PInvalidCast);
  1273. #endif
  1274.   return new H4501_NumberScreened(*this);
  1275. }
  1276.  
  1277.  
  1278. //
  1279. // Address
  1280. //
  1281.  
  1282. H4501_Address::H4501_Address(unsigned tag, PASN_Object::TagClass tagClass)
  1283.   : PASN_Sequence(tag, tagClass, 1, TRUE, 0)
  1284. {
  1285. }
  1286.  
  1287.  
  1288. #ifndef PASN_NOPRINTON
  1289. void H4501_Address::PrintOn(ostream & strm) const
  1290. {
  1291.   int indent = strm.precision() + 2;
  1292.   strm << "{\n";
  1293.   strm << setw(indent+14) << "partyNumber = " << setprecision(indent) << m_partyNumber << '\n';
  1294.   if (HasOptionalField(e_partySubaddress))
  1295.     strm << setw(indent+18) << "partySubaddress = " << setprecision(indent) << m_partySubaddress << '\n';
  1296.   strm << setw(indent-1) << "}";
  1297. }
  1298. #endif
  1299.  
  1300.  
  1301. PObject::Comparison H4501_Address::Compare(const PObject & obj) const
  1302. {
  1303. #ifndef PASN_LEANANDMEAN
  1304.   PAssert(IsDescendant(H4501_Address::Class()), PInvalidCast);
  1305. #endif
  1306.   const H4501_Address & other = (const H4501_Address &)obj;
  1307.  
  1308.   Comparison result;
  1309.  
  1310.   if ((result = m_partyNumber.Compare(other.m_partyNumber)) != EqualTo)
  1311.     return result;
  1312.   if ((result = m_partySubaddress.Compare(other.m_partySubaddress)) != EqualTo)
  1313.     return result;
  1314.  
  1315.   return PASN_Sequence::Compare(other);
  1316. }
  1317.  
  1318.  
  1319. PINDEX H4501_Address::GetDataLength() const
  1320. {
  1321.   PINDEX length = 0;
  1322.   length += m_partyNumber.GetObjectLength();
  1323.   if (HasOptionalField(e_partySubaddress))
  1324.     length += m_partySubaddress.GetObjectLength();
  1325.   return length;
  1326. }
  1327.  
  1328.  
  1329. BOOL H4501_Address::Decode(PASN_Stream & strm)
  1330. {
  1331.   if (!PreambleDecode(strm))
  1332.     return FALSE;
  1333.  
  1334.   if (!m_partyNumber.Decode(strm))
  1335.     return FALSE;
  1336.   if (HasOptionalField(e_partySubaddress) && !m_partySubaddress.Decode(strm))
  1337.     return FALSE;
  1338.  
  1339.   return UnknownExtensionsDecode(strm);
  1340. }
  1341.  
  1342.  
  1343. void H4501_Address::Encode(PASN_Stream & strm) const
  1344. {
  1345.   PreambleEncode(strm);
  1346.  
  1347.   m_partyNumber.Encode(strm);
  1348.   if (HasOptionalField(e_partySubaddress))
  1349.     m_partySubaddress.Encode(strm);
  1350.  
  1351.   UnknownExtensionsEncode(strm);
  1352. }
  1353.  
  1354.  
  1355. PObject * H4501_Address::Clone() const
  1356. {
  1357. #ifndef PASN_LEANANDMEAN
  1358.   PAssert(IsClass(H4501_Address::Class()), PInvalidCast);
  1359. #endif
  1360.   return new H4501_Address(*this);
  1361. }
  1362.  
  1363.  
  1364. //
  1365. // EndpointAddress
  1366. //
  1367.  
  1368. H4501_EndpointAddress::H4501_EndpointAddress(unsigned tag, PASN_Object::TagClass tagClass)
  1369.   : PASN_Sequence(tag, tagClass, 1, TRUE, 0)
  1370. {
  1371. }
  1372.  
  1373.  
  1374. #ifndef PASN_NOPRINTON
  1375. void H4501_EndpointAddress::PrintOn(ostream & strm) const
  1376. {
  1377.   int indent = strm.precision() + 2;
  1378.   strm << "{\n";
  1379.   strm << setw(indent+21) << "destinationAddress = " << setprecision(indent) << m_destinationAddress << '\n';
  1380.   if (HasOptionalField(e_remoteExtensionAddress))
  1381.     strm << setw(indent+25) << "remoteExtensionAddress = " << setprecision(indent) << m_remoteExtensionAddress << '\n';
  1382.   strm << setw(indent-1) << "}";
  1383. }
  1384. #endif
  1385.  
  1386.  
  1387. PObject::Comparison H4501_EndpointAddress::Compare(const PObject & obj) const
  1388. {
  1389. #ifndef PASN_LEANANDMEAN
  1390.   PAssert(IsDescendant(H4501_EndpointAddress::Class()), PInvalidCast);
  1391. #endif
  1392.   const H4501_EndpointAddress & other = (const H4501_EndpointAddress &)obj;
  1393.  
  1394.   Comparison result;
  1395.  
  1396.   if ((result = m_destinationAddress.Compare(other.m_destinationAddress)) != EqualTo)
  1397.     return result;
  1398.   if ((result = m_remoteExtensionAddress.Compare(other.m_remoteExtensionAddress)) != EqualTo)
  1399.     return result;
  1400.  
  1401.   return PASN_Sequence::Compare(other);
  1402. }
  1403.  
  1404.  
  1405. PINDEX H4501_EndpointAddress::GetDataLength() const
  1406. {
  1407.   PINDEX length = 0;
  1408.   length += m_destinationAddress.GetObjectLength();
  1409.   if (HasOptionalField(e_remoteExtensionAddress))
  1410.     length += m_remoteExtensionAddress.GetObjectLength();
  1411.   return length;
  1412. }
  1413.  
  1414.  
  1415. BOOL H4501_EndpointAddress::Decode(PASN_Stream & strm)
  1416. {
  1417.   if (!PreambleDecode(strm))
  1418.     return FALSE;
  1419.  
  1420.   if (!m_destinationAddress.Decode(strm))
  1421.     return FALSE;
  1422.   if (HasOptionalField(e_remoteExtensionAddress) && !m_remoteExtensionAddress.Decode(strm))
  1423.     return FALSE;
  1424.  
  1425.   return UnknownExtensionsDecode(strm);
  1426. }
  1427.  
  1428.  
  1429. void H4501_EndpointAddress::Encode(PASN_Stream & strm) const
  1430. {
  1431.   PreambleEncode(strm);
  1432.  
  1433.   m_destinationAddress.Encode(strm);
  1434.   if (HasOptionalField(e_remoteExtensionAddress))
  1435.     m_remoteExtensionAddress.Encode(strm);
  1436.  
  1437.   UnknownExtensionsEncode(strm);
  1438. }
  1439.  
  1440.  
  1441. PObject * H4501_EndpointAddress::Clone() const
  1442. {
  1443. #ifndef PASN_LEANANDMEAN
  1444.   PAssert(IsClass(H4501_EndpointAddress::Class()), PInvalidCast);
  1445. #endif
  1446.   return new H4501_EndpointAddress(*this);
  1447. }
  1448.  
  1449.  
  1450. //
  1451. // UserSpecifiedSubaddress
  1452. //
  1453.  
  1454. H4501_UserSpecifiedSubaddress::H4501_UserSpecifiedSubaddress(unsigned tag, PASN_Object::TagClass tagClass)
  1455.   : PASN_Sequence(tag, tagClass, 1, TRUE, 0)
  1456. {
  1457. }
  1458.  
  1459.  
  1460. #ifndef PASN_NOPRINTON
  1461. void H4501_UserSpecifiedSubaddress::PrintOn(ostream & strm) const
  1462. {
  1463.   int indent = strm.precision() + 2;
  1464.   strm << "{\n";
  1465.   strm << setw(indent+24) << "subaddressInformation = " << setprecision(indent) << m_subaddressInformation << '\n';
  1466.   if (HasOptionalField(e_oddCountIndicator))
  1467.     strm << setw(indent+20) << "oddCountIndicator = " << setprecision(indent) << m_oddCountIndicator << '\n';
  1468.   strm << setw(indent-1) << "}";
  1469. }
  1470. #endif
  1471.  
  1472.  
  1473. PObject::Comparison H4501_UserSpecifiedSubaddress::Compare(const PObject & obj) const
  1474. {
  1475. #ifndef PASN_LEANANDMEAN
  1476.   PAssert(IsDescendant(H4501_UserSpecifiedSubaddress::Class()), PInvalidCast);
  1477. #endif
  1478.   const H4501_UserSpecifiedSubaddress & other = (const H4501_UserSpecifiedSubaddress &)obj;
  1479.  
  1480.   Comparison result;
  1481.  
  1482.   if ((result = m_subaddressInformation.Compare(other.m_subaddressInformation)) != EqualTo)
  1483.     return result;
  1484.   if ((result = m_oddCountIndicator.Compare(other.m_oddCountIndicator)) != EqualTo)
  1485.     return result;
  1486.  
  1487.   return PASN_Sequence::Compare(other);
  1488. }
  1489.  
  1490.  
  1491. PINDEX H4501_UserSpecifiedSubaddress::GetDataLength() const
  1492. {
  1493.   PINDEX length = 0;
  1494.   length += m_subaddressInformation.GetObjectLength();
  1495.   if (HasOptionalField(e_oddCountIndicator))
  1496.     length += m_oddCountIndicator.GetObjectLength();
  1497.   return length;
  1498. }
  1499.  
  1500.  
  1501. BOOL H4501_UserSpecifiedSubaddress::Decode(PASN_Stream & strm)
  1502. {
  1503.   if (!PreambleDecode(strm))
  1504.     return FALSE;
  1505.  
  1506.   if (!m_subaddressInformation.Decode(strm))
  1507.     return FALSE;
  1508.   if (HasOptionalField(e_oddCountIndicator) && !m_oddCountIndicator.Decode(strm))
  1509.     return FALSE;
  1510.  
  1511.   return UnknownExtensionsDecode(strm);
  1512. }
  1513.  
  1514.  
  1515. void H4501_UserSpecifiedSubaddress::Encode(PASN_Stream & strm) const
  1516. {
  1517.   PreambleEncode(strm);
  1518.  
  1519.   m_subaddressInformation.Encode(strm);
  1520.   if (HasOptionalField(e_oddCountIndicator))
  1521.     m_oddCountIndicator.Encode(strm);
  1522.  
  1523.   UnknownExtensionsEncode(strm);
  1524. }
  1525.  
  1526.  
  1527. PObject * H4501_UserSpecifiedSubaddress::Clone() const
  1528. {
  1529. #ifndef PASN_LEANANDMEAN
  1530.   PAssert(IsClass(H4501_UserSpecifiedSubaddress::Class()), PInvalidCast);
  1531. #endif
  1532.   return new H4501_UserSpecifiedSubaddress(*this);
  1533. }
  1534.  
  1535.  
  1536. //
  1537. // SupplementaryService
  1538. //
  1539.  
  1540. H4501_SupplementaryService::H4501_SupplementaryService(unsigned tag, PASN_Object::TagClass tagClass)
  1541.   : PASN_Sequence(tag, tagClass, 2, TRUE, 0)
  1542. {
  1543. }
  1544.  
  1545.  
  1546. #ifndef PASN_NOPRINTON
  1547. void H4501_SupplementaryService::PrintOn(ostream & strm) const
  1548. {
  1549.   int indent = strm.precision() + 2;
  1550.   strm << "{\n";
  1551.   if (HasOptionalField(e_networkFacilityExtension))
  1552.     strm << setw(indent+27) << "networkFacilityExtension = " << setprecision(indent) << m_networkFacilityExtension << '\n';
  1553.   if (HasOptionalField(e_interpretationApdu))
  1554.     strm << setw(indent+21) << "interpretationApdu = " << setprecision(indent) << m_interpretationApdu << '\n';
  1555.   strm << setw(indent+14) << "serviceApdu = " << setprecision(indent) << m_serviceApdu << '\n';
  1556.   strm << setw(indent-1) << "}";
  1557. }
  1558. #endif
  1559.  
  1560.  
  1561. PObject::Comparison H4501_SupplementaryService::Compare(const PObject & obj) const
  1562. {
  1563. #ifndef PASN_LEANANDMEAN
  1564.   PAssert(IsDescendant(H4501_SupplementaryService::Class()), PInvalidCast);
  1565. #endif
  1566.   const H4501_SupplementaryService & other = (const H4501_SupplementaryService &)obj;
  1567.  
  1568.   Comparison result;
  1569.  
  1570.   if ((result = m_networkFacilityExtension.Compare(other.m_networkFacilityExtension)) != EqualTo)
  1571.     return result;
  1572.   if ((result = m_interpretationApdu.Compare(other.m_interpretationApdu)) != EqualTo)
  1573.     return result;
  1574.   if ((result = m_serviceApdu.Compare(other.m_serviceApdu)) != EqualTo)
  1575.     return result;
  1576.  
  1577.   return PASN_Sequence::Compare(other);
  1578. }
  1579.  
  1580.  
  1581. PINDEX H4501_SupplementaryService::GetDataLength() const
  1582. {
  1583.   PINDEX length = 0;
  1584.   if (HasOptionalField(e_networkFacilityExtension))
  1585.     length += m_networkFacilityExtension.GetObjectLength();
  1586.   if (HasOptionalField(e_interpretationApdu))
  1587.     length += m_interpretationApdu.GetObjectLength();
  1588.   length += m_serviceApdu.GetObjectLength();
  1589.   return length;
  1590. }
  1591.  
  1592.  
  1593. BOOL H4501_SupplementaryService::Decode(PASN_Stream & strm)
  1594. {
  1595.   if (!PreambleDecode(strm))
  1596.     return FALSE;
  1597.  
  1598.   if (HasOptionalField(e_networkFacilityExtension) && !m_networkFacilityExtension.Decode(strm))
  1599.     return FALSE;
  1600.   if (HasOptionalField(e_interpretationApdu) && !m_interpretationApdu.Decode(strm))
  1601.     return FALSE;
  1602.   if (!m_serviceApdu.Decode(strm))
  1603.     return FALSE;
  1604.  
  1605.   return UnknownExtensionsDecode(strm);
  1606. }
  1607.  
  1608.  
  1609. void H4501_SupplementaryService::Encode(PASN_Stream & strm) const
  1610. {
  1611.   PreambleEncode(strm);
  1612.  
  1613.   if (HasOptionalField(e_networkFacilityExtension))
  1614.     m_networkFacilityExtension.Encode(strm);
  1615.   if (HasOptionalField(e_interpretationApdu))
  1616.     m_interpretationApdu.Encode(strm);
  1617.   m_serviceApdu.Encode(strm);
  1618.  
  1619.   UnknownExtensionsEncode(strm);
  1620. }
  1621.  
  1622.  
  1623. PObject * H4501_SupplementaryService::Clone() const
  1624. {
  1625. #ifndef PASN_LEANANDMEAN
  1626.   PAssert(IsClass(H4501_SupplementaryService::Class()), PInvalidCast);
  1627. #endif
  1628.   return new H4501_SupplementaryService(*this);
  1629. }
  1630.  
  1631.  
  1632. #endif // if ! H323_DISABLE_H4501
  1633.  
  1634.  
  1635. // End of h4501.cxx
  1636.