home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 2.ddi / CLASSINC.ZIP / SORTARRY.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  2.9 KB  |  99 lines

  1. /*------------------------------------------------------------------------*/
  2. /*                                                                        */
  3. /*  SORTARRY.H                                                            */
  4. /*                                                                        */
  5. /*  Copyright Borland International 1991, 1992                            */
  6. /*  All Rights Reserved                                                   */
  7. /*                                                                        */
  8. /*------------------------------------------------------------------------*/
  9.  
  10. #if !defined( __SORTARRY_H )
  11. #define __SORTARRY_H
  12.  
  13. #if defined( TEMPLATES )
  14.  
  15.     #if !defined( __ARRAYS_H )
  16.     #include <Arrays.h>
  17.     #endif  // __ARRAYS_H
  18.  
  19.     #pragma option -Vo-
  20.     #if defined( __BCOPT__ ) && !defined( _ALLOW_po )
  21.     #pragma option -po-
  22.     #endif
  23.  
  24.     #define SortedArray   BI_TCSArrayAsVector
  25.     #define PSortedArray  PBI_TCSArrayAsVector
  26.     #define RSortedArray  RBI_TCSArrayAsVector
  27.     #define RPSortedArray RPBI_TCSArrayAsVector
  28.     #define PCSortedArray PCBI_TCSArrayAsVector
  29.     #define RCSortedArray RCBI_TCSArrayAsVector
  30.  
  31.     _CLASSDEF( BI_TCSArrayAsVector )
  32.  
  33.     #define SortedArrayIterator   BI_TCSArrayAsVectorIterator
  34.     #define PSortedArrayIterator  PBI_TCSArrayAsVectorIterator
  35.     #define RSortedArrayIterator  RBI_TCSArrayAsVectorIterator
  36.     #define RPSortedArrayIterator RPBI_TCSArrayAsVectorIterator
  37.     #define PCSortedArrayIterator PCBI_TCSArrayAsVectorIterator
  38.     #define RCSortedArrayIterator RCBI_TCSArrayAsVectorIterator
  39.  
  40.     _CLASSDEF( BI_TCSArrayAsVectorIterator )
  41.  
  42. #else   // TEMPLATES
  43.  
  44.     #if !defined( __CLSTYPES_H )
  45.     #include <ClsTypes.h>
  46.     #endif  // __CLSTYPES_H
  47.  
  48.     #if !defined( __SORTABLE_H )
  49.     #include <Sortable.h>
  50.     #endif  // __SORTABLE_H
  51.  
  52.     #if !defined( __ABSTARRY_H )
  53.     #include <AbstArry.h>
  54.     #endif  // __ABSTARRY_H
  55.  
  56.     #pragma option -Vo-
  57.     #if defined( __BCOPT__ ) && !defined( _ALLOW_po )
  58.     #pragma option -po-
  59.     #endif
  60.  
  61.     _CLASSDEF(SortedArray)
  62.  
  63.     class _CLASSTYPE SortedArray : public AbstractArray
  64.     {
  65.  
  66.     public:
  67.  
  68.         SortedArray( int upper, int lower = 0, sizeType aDelta = 0 );
  69.  
  70.         virtual void add( Object _FAR & );
  71.         virtual void detach( Object _FAR &, DeleteType = NoDelete );
  72.  
  73.         virtual classType isA() const
  74.             {
  75.             return sortedArrayClass;
  76.             }
  77.  
  78.         virtual char _FAR *nameOf() const
  79.             {
  80.             return "SortedArray";
  81.             }
  82.  
  83.     };
  84.  
  85.     inline SortedArray::SortedArray( int upper, int lower, sizeType aDelta ) :
  86.         AbstractArray( upper, lower, aDelta )
  87.     {
  88.     }
  89.  
  90. #endif  // TEMPLATES
  91.  
  92. #if defined( __BCOPT__ ) && !defined( _ALLOW_po )
  93. #pragma option -po.
  94. #endif
  95. #pragma option -Vo.
  96.  
  97. #endif  // __SORTARRY_H
  98.  
  99.