home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iibagtab.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.0 KB  |  84 lines

  1. /**********************************************************************
  2. *                                                                     *
  3. *  IBM(R) VisualAge(TM) for C++ for Windows(R), Version 3.5           *
  4. *                                                                     *
  5. *  PID: 5622-880                                                      *
  6. *  - Licensed Material - Program-Property of IBM                      *
  7. *  (C) Copyright IBM Corp. 1991, 1995 - All Right Reserved.           *
  8. *                                                                     *
  9. *  US Government Users Restricted Rights - Use, duplication or        *
  10. *  disclosure restricted by GSA ADP Schedule Contract with IBM Corp.  *
  11. *                                                                     *
  12. *  VisualAge, and IBM are trademarks or registered trademarks of      *
  13. *  International Business Machines Corporation.                       *
  14. *  Windows is a registered trademark of Microsoft Corporation.        *
  15. *                                                                     *
  16. **********************************************************************/
  17.  
  18. #pragma info (nocls, nocnd, nocns, nocnv, noext, nognr, novft)
  19. #pragma pack (4)
  20.  
  21. // ---
  22. // IBagAsTableOps
  23. // ---
  24.  
  25. // public members
  26.  
  27. template <class Element, class ElementOps, class Implementation>
  28. IBagAsTableOps <Element, ElementOps, Implementation>::
  29. IBagAsTableOps (INumber numberOfElements)
  30. : Inherited (__isDTSClass (Element)),
  31.   ivBase (numberOfElements),
  32.   ivImpl (*this, numberOfElements)
  33. {
  34. }
  35.  
  36. template <class Element, class ElementOps, class Implementation>
  37. IBagAsTableOps <Element, ElementOps, Implementation>::
  38. IBagAsTableOps (INumber numberOfElements, void* opsArg)
  39. : Inherited (__isDTSClass (Element)),
  40.   ivBase (numberOfElements, opsArg),
  41.   ivImpl (*this, numberOfElements)
  42. {
  43. }
  44.  
  45. template <class Element, class ElementOps, class Implementation>
  46. IBagAsTableOps <Element, ElementOps, Implementation>::
  47. IBagAsTableOps
  48.   (IBagAsTableOps
  49.     <Element, ElementOps, Implementation> const& collection)
  50. : Inherited (__isDTSClass (Element)),
  51.   ivBase (collection.ivBase),
  52.   ivImpl (*this, collection.ivImpl)
  53. {
  54. }
  55.  
  56. template <class Element, class ElementOps, class Implementation>
  57. IBagAsTableOps <Element, ElementOps, Implementation>::
  58. ~IBagAsTableOps ()
  59. {
  60. }
  61.  
  62. template <class Element, class ElementOps, class Implementation>
  63. IACollectionImpl*
  64. IBagAsTableOps <Element, ElementOps, Implementation>::
  65. Clone () const
  66. { return (Implementation*) *new Self (*this);
  67. }
  68.  
  69. template <class Element, class ElementOps, class Implementation>
  70. IBagAsTableOps <Element, ElementOps, Implementation>::
  71. operator IKeyBagAsTableImpl& ()
  72. { return *(IKeyBagAsTableImpl*)ivBase;
  73. }
  74.  
  75. template <class Element, class ElementOps, class Implementation>
  76. IBagAsTableOps <Element, ElementOps, Implementation>::
  77. operator Implementation* ()
  78. { ivImpl.CheckPointer (this);
  79.   return &ivImpl;
  80. }
  81.  
  82. #pragma info (restore)
  83. #pragma pack ()
  84.