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

  1. #ifndef _IPTARRAY_
  2. #define _IPTARRAY_
  3. /*******************************************************************************
  4. * FILE NAME: iptarray.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IPointArray                                                              *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18. #include <ibase.hpp>
  19.  
  20. class IPoint;
  21.  
  22. #pragma pack(4)
  23.  
  24.  
  25. class IPointArray : public IBase {
  26. typedef IBase
  27.   Inherited;
  28.  
  29. public:
  30. /*------------------------------- Constructors -------------------------------*/
  31.   IPointArray ( unsigned long dimension = 0,
  32.                 const IPoint* array = 0       );
  33.  
  34.   IPointArray ( const IPointArray& pointArray );
  35.  
  36. IPointArray
  37.   &operator=  ( const IPointArray& pointArray );
  38.  
  39.   ~IPointArray ( );
  40.  
  41.  
  42. /*--------------------------------- Data Access ------------------------------*/
  43. unsigned long
  44.   size             ( ) const;
  45.  
  46. IPointArray
  47.   &resize          ( unsigned long newsize ),
  48.   &reverse         ( ),
  49.    reversed        ( ) const,
  50.   &insert          ( unsigned long index,
  51.                      const IPoint& point   ),
  52.   &add             ( const IPoint& point   ),
  53.   &remove          ( unsigned long index   );
  54.  
  55. IPoint
  56.   &operator []     ( unsigned long index   );
  57. const IPoint
  58.   &operator []     ( unsigned long index   ) const;
  59.  
  60. /*----------------------------- Comparisons ----------------------------------*/
  61. Boolean
  62.   operator== (const IPointArray& pointArray) const;
  63.   operator!= (const IPointArray& pointArray) const;
  64.  
  65.  
  66. private:
  67. /*-------------------------------- Private -----------------------------------*/
  68. IPoint
  69.  *fPtArray;
  70. unsigned long
  71.   fDim;
  72.  
  73. }; // IPointArray
  74.  
  75.  
  76. #pragma pack()
  77.  
  78. #endif // _IPTARRAY_
  79.