PWLib
1.10.10
|
00001 /* 00002 * array.h 00003 * 00004 * Linear Array Container classes. 00005 * 00006 * Portable Windows Library 00007 * 00008 * Copyright (c) 1993-1998 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Portable Windows Library. 00021 * 00022 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 00023 * 00024 * Portions are Copyright (C) 1993 Free Software Foundation, Inc. 00025 * All Rights Reserved. 00026 * 00027 * Contributor(s): ______________________________________. 00028 * 00029 * $Log: array.h,v $ 00030 * Revision 1.34 2005/11/25 03:43:47 csoutheren 00031 * Fixed function argument comments to be compatible with Doxygen 00032 * 00033 * Revision 1.33 2005/08/08 07:01:58 rjongbloed 00034 * Minor changes to remove possible ambiguity where virtual and non-virtual 00035 * functions are overloaded. 00036 * Removed commented out code. 00037 * 00038 * Revision 1.32 2005/05/02 09:02:35 csoutheren 00039 * Fixed previous fix to contain.cxx which broke PString::MakeUnique 00040 * 00041 * Revision 1.31 2004/05/13 02:07:14 dereksmithies 00042 * Fixes, so it works with doc++ 00043 * 00044 * Revision 1.30 2004/04/09 03:42:34 csoutheren 00045 * Removed all usages of "virtual inline" and "inline virtual" 00046 * 00047 * Revision 1.29 2004/04/03 06:54:21 rjongbloed 00048 * Many and various changes to support new Visual C++ 2003 00049 * 00050 * Revision 1.28 2004/03/02 10:29:59 rjongbloed 00051 * Changed base array declaration macro to be consistent with the 00052 * object array one, thanks Guilhem Tardy 00053 * 00054 * Revision 1.27 2003/04/17 07:24:47 robertj 00055 * Fixed GNU 3.x problem (why no other compiler?) 00056 * 00057 * Revision 1.26 2003/04/15 07:08:36 robertj 00058 * Changed read and write from streams for base array classes so operates in 00059 * the same way for both PIntArray and PArray<int> etc 00060 * 00061 * Revision 1.25 2003/03/31 01:23:56 robertj 00062 * Added ReadFrom functions for standard container classes such as 00063 * PIntArray and PStringList etc 00064 * 00065 * Revision 1.24 2002/09/16 01:08:59 robertj 00066 * Added #define so can select if #pragma interface/implementation is used on 00067 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00068 * 00069 * Revision 1.23 2002/06/20 06:08:59 robertj 00070 * Fixed GNU warning 00071 * 00072 * Revision 1.22 2002/06/14 13:20:37 robertj 00073 * Added PBitArray class. 00074 * 00075 * Revision 1.21 2002/02/14 23:37:53 craigs 00076 * Added fix for optimisation for PArray [] operator, thanks to Vyacheslav Frolov 00077 * 00078 * Revision 1.20 2002/02/14 05:11:50 robertj 00079 * Minor optimisation in the operator[] for arrays of PObjects. 00080 * 00081 * Revision 1.19 1999/11/30 00:22:54 robertj 00082 * Updated documentation for doc++ 00083 * 00084 * Revision 1.18 1999/09/03 15:08:38 robertj 00085 * Fixed typo in ancestor class name 00086 * 00087 * Revision 1.17 1999/08/22 12:13:42 robertj 00088 * Fixed warning when using inlines on older GNU compiler 00089 * 00090 * Revision 1.16 1999/08/20 03:07:44 robertj 00091 * Fixed addded Concatenate function for non-template version. 00092 * 00093 * Revision 1.15 1999/08/18 01:45:12 robertj 00094 * Added concatenation function to "base type" arrays. 00095 * 00096 * Revision 1.14 1999/03/09 02:59:49 robertj 00097 * Changed comments to doc++ compatible documentation. 00098 * 00099 * Revision 1.13 1999/02/16 08:07:11 robertj 00100 * MSVC 6.0 compatibility changes. 00101 * 00102 * Revision 1.12 1998/09/23 06:20:16 robertj 00103 * Added open source copyright license. 00104 * 00105 * Revision 1.11 1998/08/21 05:23:57 robertj 00106 * Added hex dump capability to base array types. 00107 * Added ability to have base arrays of static memory blocks. 00108 * 00109 * Revision 1.10 1997/06/08 04:49:10 robertj 00110 * Fixed non-template class descendent order. 00111 * 00112 * Revision 1.9 1996/08/17 09:54:34 robertj 00113 * Optimised RemoveAll() for object arrays. 00114 * 00115 * Revision 1.8 1996/01/02 11:48:46 robertj 00116 * Removed requirement that PArray elements have parameterless constructor.. 00117 * 00118 * Revision 1.7 1995/10/14 14:52:33 robertj 00119 * Changed arrays to not break references. 00120 * 00121 * Revision 1.6 1995/06/17 11:12:18 robertj 00122 * Documentation update. 00123 * 00124 * Revision 1.5 1995/03/14 12:40:58 robertj 00125 * Updated documentation to use HTML codes. 00126 * 00127 * Revision 1.4 1995/02/22 10:50:26 robertj 00128 * Changes required for compiling release (optimised) version. 00129 * 00130 * Revision 1.3 1995/01/15 04:49:09 robertj 00131 * Fixed errors in template version. 00132 * 00133 * Revision 1.2 1994/12/21 11:52:46 robertj 00134 * Documentation and variable normalisation. 00135 * 00136 * Revision 1.1 1994/12/12 09:59:29 robertj 00137 * Initial revision 00138 * 00139 */ 00140 00141 #ifdef P_USE_PRAGMA 00142 #pragma interface 00143 #endif 00144 00146 // The abstract array class 00147 00169 class PAbstractArray : public PContainer 00170 { 00171 PCONTAINERINFO(PAbstractArray, PContainer); 00172 00173 public: 00185 PAbstractArray( 00186 PINDEX elementSizeInBytes, 00187 00188 PINDEX initialSize = 0 00189 ); 00190 00208 PAbstractArray( 00209 PINDEX elementSizeInBytes, 00210 00211 const void *buffer, 00212 PINDEX bufferSizeInElements, 00213 BOOL dynamicAllocation 00214 ); 00216 00225 virtual void PrintOn( 00226 ostream &strm // Stream to print the object into. 00227 ) const; 00228 00235 virtual void ReadFrom( 00236 istream &strm // Stream to read the objects contents from. 00237 ); 00238 00259 virtual Comparison Compare( 00260 const PObject & obj 00261 ) const; 00263 00274 virtual BOOL SetSize( 00275 PINDEX newSize 00276 ); 00278 00289 void Attach( 00290 const void *buffer, 00291 PINDEX bufferSize 00292 ); 00293 00307 void * GetPointer( 00308 PINDEX minSize = 1 00309 ); 00310 00323 BOOL Concatenate( 00324 const PAbstractArray & array 00325 ); 00327 00328 protected: 00329 BOOL InternalSetSize(PINDEX newSize, BOOL force); 00330 00331 virtual void PrintElementOn( 00332 ostream & stream, 00333 PINDEX index 00334 ) const; 00335 virtual void ReadElementFrom( 00336 istream & stream, 00337 PINDEX index 00338 ); 00339 00341 PINDEX elementSize; 00342 00344 char * theArray; 00345 00347 BOOL allocatedDynamically; 00348 00349 friend class PArrayObjects; 00350 }; 00351 00352 00354 // An array of some base type 00355 00356 #ifdef PHAS_TEMPLATES 00357 00377 template <class T> class PBaseArray : public PAbstractArray 00378 { 00379 PCLASSINFO(PBaseArray, PAbstractArray); 00380 00381 public: 00389 PBaseArray( 00390 PINDEX initialSize = 0 00391 ) : PAbstractArray(sizeof(T), initialSize) { } 00392 00395 PBaseArray( 00396 T const * buffer, 00397 PINDEX length, 00398 BOOL dynamic = TRUE 00399 ) : PAbstractArray(sizeof(T), buffer, length, dynamic) { } 00401 00406 virtual PObject * Clone() const 00407 { 00408 return PNEW PBaseArray<T>(*this, GetSize()); 00409 } 00411 00420 BOOL SetAt( 00421 PINDEX index, 00422 T val 00423 ) { 00424 return SetMinSize(index+1) && val==(((T *)theArray)[index] = val); 00425 } 00426 00433 T GetAt( 00434 PINDEX index 00435 ) const { 00436 PASSERTINDEX(index); 00437 return index < GetSize() ? ((T *)theArray)[index] : (T)0; 00438 } 00439 00448 void Attach( 00449 const T * buffer, 00450 PINDEX bufferSize 00451 ) { 00452 PAbstractArray::Attach(buffer, bufferSize); 00453 } 00454 00468 T * GetPointer( 00469 PINDEX minSize = 0 00470 ) { 00471 return (T *)PAbstractArray::GetPointer(minSize); 00472 } 00474 00486 T operator[]( 00487 PINDEX index 00488 ) const { 00489 return GetAt(index); 00490 } 00491 00502 T & operator[]( 00503 PINDEX index 00504 ) { 00505 PASSERTINDEX(index); 00506 PAssert(SetMinSize(index+1), POutOfMemory); 00507 return ((T *)theArray)[index]; 00508 } 00509 00523 operator T const *() const { 00524 return (T const *)theArray; 00525 } 00526 00538 BOOL Concatenate( 00539 const PBaseArray & array 00540 ) { 00541 return PAbstractArray::Concatenate(array); 00542 } 00544 00545 protected: 00546 virtual void PrintElementOn( 00547 ostream & stream, 00548 PINDEX index 00549 ) const { 00550 stream << GetAt(index); 00551 } 00552 }; 00553 00554 /*Declare a dynamic array base type. 00555 This macro is used to declare a descendent of PAbstractArray class, 00556 customised for a particular element type {\bf T}. This macro closes the 00557 class declaration off so no additional members can be added. 00558 00559 If the compilation is using templates then this macro produces a typedef 00560 of the #PBaseArray# template class. 00561 */ 00562 #define PBASEARRAY(cls, T) typedef PBaseArray<T> cls 00563 00576 #define PDECLARE_BASEARRAY(cls, T) \ 00577 PDECLARE_CLASS(cls, PBaseArray<T>) \ 00578 cls(PINDEX initialSize = 0) \ 00579 : PBaseArray<T>(initialSize) { } \ 00580 cls(T const * buffer, PINDEX length, BOOL dynamic = TRUE) \ 00581 : PBaseArray<T>(buffer, length, dynamic) { } \ 00582 virtual PObject * Clone() const \ 00583 { return PNEW cls(*this, GetSize()); } \ 00584 00585 00604 template <class T> class PScalarArray : public PBaseArray<T> 00605 { 00606 public: 00614 PScalarArray( 00615 PINDEX initialSize = 0 00616 ) : PBaseArray<T>(initialSize) { } 00617 00620 PScalarArray( 00621 T const * buffer, 00622 PINDEX length, 00623 BOOL dynamic = TRUE 00624 ) : PBaseArray<T>(buffer, length, dynamic) { } 00626 00627 protected: 00628 virtual void ReadElementFrom( 00629 istream & stream, 00630 PINDEX index 00631 ) { 00632 T t; 00633 stream >> t; 00634 if (!stream.fail()) 00635 this->SetAt(index, t); 00636 } 00637 }; 00638 00639 00640 /*Declare a dynamic array base type. 00641 This macro is used to declare a descendent of PAbstractArray class, 00642 customised for a particular element type {\bf T}. This macro closes the 00643 class declaration off so no additional members can be added. 00644 00645 If the compilation is using templates then this macro produces a typedef 00646 of the #PBaseArray# template class. 00647 */ 00648 #define PSCALAR_ARRAY(cls, T) typedef PScalarArray<T> cls 00649 00650 #else // PHAS_TEMPLATES 00651 00652 #define PBASEARRAY(cls, T) \ 00653 typedef T P_##cls##_Base_Type; \ 00654 class cls : public PAbstractArray { \ 00655 PCLASSINFO(cls, PAbstractArray) \ 00656 public: \ 00657 inline cls(PINDEX initialSize = 0) \ 00658 : PAbstractArray(sizeof(P_##cls##_Base_Type), initialSize) { } \ 00659 inline cls(P_##cls##_Base_Type const * buffer, PINDEX length, BOOL dynamic = TRUE) \ 00660 : PAbstractArray(sizeof(P_##cls##_Base_Type), buffer, length, dynamic) { } \ 00661 virtual PObject * Clone() const \ 00662 { return PNEW cls(*this, GetSize()); } \ 00663 inline BOOL SetAt(PINDEX index, P_##cls##_Base_Type val) \ 00664 { return SetMinSize(index+1) && \ 00665 val==(((P_##cls##_Base_Type *)theArray)[index] = val); } \ 00666 inline P_##cls##_Base_Type GetAt(PINDEX index) const \ 00667 { PASSERTINDEX(index); return index < GetSize() ? \ 00668 ((P_##cls##_Base_Type*)theArray)[index] : (P_##cls##_Base_Type)0; } \ 00669 inline P_##cls##_Base_Type operator[](PINDEX index) const \ 00670 { PASSERTINDEX(index); return GetAt(index); } \ 00671 inline P_##cls##_Base_Type & operator[](PINDEX index) \ 00672 { PASSERTINDEX(index); PAssert(SetMinSize(index+1), POutOfMemory); \ 00673 return ((P_##cls##_Base_Type *)theArray)[index]; } \ 00674 inline void Attach(const P_##cls##_Base_Type * buffer, PINDEX bufferSize) \ 00675 { PAbstractArray::Attach(buffer, bufferSize); } \ 00676 inline P_##cls##_Base_Type * GetPointer(PINDEX minSize = 0) \ 00677 { return (P_##cls##_Base_Type *)PAbstractArray::GetPointer(minSize); } \ 00678 inline operator P_##cls##_Base_Type const *() const \ 00679 { return (P_##cls##_Base_Type const *)theArray; } \ 00680 inline BOOL Concatenate(cls const & array) \ 00681 { return PAbstractArray::Concatenate(array); } \ 00682 } 00683 00684 #define PDECLARE_BASEARRAY(cls, T) \ 00685 PBASEARRAY(cls##_PTemplate, T); \ 00686 PDECLARE_CLASS(cls, cls##_PTemplate) \ 00687 cls(PINDEX initialSize = 0) \ 00688 : cls##_PTemplate(initialSize) { } \ 00689 cls(T const * buffer, PINDEX length, BOOL dynamic = TRUE) \ 00690 : cls##_PTemplate(buffer, length, dynamic) { } \ 00691 virtual PObject * Clone() const \ 00692 { return PNEW cls(*this, GetSize()); } \ 00693 00694 #define PSCALAR_ARRAY(cls, T) PBASEARRAY(cls, T) 00695 00696 #endif // PHAS_TEMPLATES 00697 00698 00700 #ifdef DOC_PLUS_PLUS 00701 class PCharArray : public PBaseArray { 00702 public: 00708 PCharArray( 00709 PINDEX initialSize = 0 00710 ); 00711 00714 PCharArray( 00715 char const * buffer, 00716 PINDEX length, 00717 BOOL dynamic = TRUE 00718 ); 00720 #endif 00721 PDECLARE_BASEARRAY(PCharArray, char); 00722 public: 00725 00726 virtual void PrintOn( 00727 ostream & strm 00728 ) const; 00730 virtual void ReadFrom( 00731 istream &strm // Stream to read the objects contents from. 00732 ); 00734 }; 00735 00737 #ifdef DOC_PLUS_PLUS 00738 class PShortArray : public PBaseArray { 00739 public: 00745 PShortArray( 00746 PINDEX initialSize = 0 00747 ); 00748 00751 PShortArray( 00752 short const * buffer, 00753 PINDEX length, 00754 BOOL dynamic = TRUE 00755 ); 00757 }; 00758 #endif 00759 PSCALAR_ARRAY(PShortArray, short); 00760 00761 00763 #ifdef DOC_PLUS_PLUS 00764 class PIntArray : public PBaseArray { 00765 public: 00771 PIntArray( 00772 PINDEX initialSize = 0 00773 ); 00774 00777 PIntArray( 00778 int const * buffer, 00779 PINDEX length, 00780 BOOL dynamic = TRUE 00781 ); 00783 }; 00784 #endif 00785 PSCALAR_ARRAY(PIntArray, int); 00786 00787 00789 #ifdef DOC_PLUS_PLUS 00790 class PLongArray : public PBaseArray { 00791 public: 00797 PLongArray( 00798 PINDEX initialSize = 0 00799 ); 00800 00803 PLongArray( 00804 long const * buffer, 00805 PINDEX length, 00806 BOOL dynamic = TRUE 00807 ); 00809 }; 00810 #endif 00811 PSCALAR_ARRAY(PLongArray, long); 00812 00813 00815 #ifdef DOC_PLUS_PLUS 00816 class PBYTEArray : public PBaseArray { 00817 public: 00823 PBYTEArray( 00824 PINDEX initialSize = 0 00825 ); 00826 00829 PBYTEArray( 00830 BYTE const * buffer, 00831 PINDEX length, 00832 BOOL dynamic = TRUE 00833 ); 00835 }; 00836 #endif 00837 PDECLARE_BASEARRAY(PBYTEArray, BYTE); 00838 public: 00841 00842 virtual void PrintOn( 00843 ostream & strm 00844 ) const; 00846 virtual void ReadFrom( 00847 istream &strm 00848 ); 00850 }; 00851 00852 00854 #ifdef DOC_PLUS_PLUS 00855 class PWORDArray : public PBaseArray { 00856 public: 00862 PWORDArray( 00863 PINDEX initialSize = 0 00864 ); 00865 00868 PWORDArray( 00869 WORD const * buffer, 00870 PINDEX length, 00871 BOOL dynamic = TRUE 00872 ); 00874 }; 00875 #endif 00876 PSCALAR_ARRAY(PWORDArray, WORD); 00877 00878 00880 #ifdef DOC_PLUS_PLUS 00881 class PUnsignedArray : public PBaseArray { 00882 public: 00888 PUnsignedArray( 00889 PINDEX initialSize = 0 00890 ); 00891 00894 PUnsignedArray( 00895 unsigned const * buffer, 00896 PINDEX length, 00897 BOOL dynamic = TRUE 00898 ); 00900 }; 00901 #endif 00902 PSCALAR_ARRAY(PUnsignedArray, unsigned); 00903 00904 00906 #ifdef DOC_PLUS_PLUS 00907 class PDWORDArray : public PBaseArray { 00908 public: 00914 PDWORDArray( 00915 PINDEX initialSize = 0 00916 ); 00917 00920 PDWORDArray( 00921 DWORD const * buffer, 00922 PINDEX length, 00923 BOOL dynamic = TRUE 00924 ); 00926 #endif 00927 PSCALAR_ARRAY(PDWORDArray, DWORD); 00928 00929 00931 // Linear array of objects 00932 00954 class PArrayObjects : public PCollection 00955 { 00956 PCONTAINERINFO(PArrayObjects, PCollection); 00957 00958 public: 00967 PINLINE PArrayObjects( 00968 PINDEX initialSize = 0 00969 ); 00971 01004 virtual Comparison Compare( 01005 const PObject & obj 01006 ) const; 01008 01011 01012 virtual PINDEX GetSize() const; 01013 01022 virtual BOOL SetSize( 01023 PINDEX newSize 01024 ); 01026 01035 virtual PINDEX Append( 01036 PObject * obj 01037 ); 01038 01054 virtual PINDEX Insert( 01055 const PObject & before, 01056 PObject * obj 01057 ); 01058 01069 virtual PINDEX InsertAt( 01070 PINDEX index, 01071 PObject * obj 01072 ); 01073 01082 virtual BOOL Remove( 01083 const PObject * obj 01084 ); 01085 01097 virtual PObject * RemoveAt( 01098 PINDEX index 01099 ); 01100 01108 virtual BOOL SetAt( 01109 PINDEX index, 01110 PObject * val 01111 ); 01112 01119 virtual PObject * GetAt( 01120 PINDEX index 01121 ) const; 01122 01130 virtual PINDEX GetObjectsIndex( 01131 const PObject * obj 01132 ) const; 01133 01143 virtual PINDEX GetValuesIndex( 01144 const PObject & obj // Object to find equal of. 01145 ) const; 01146 01153 virtual void RemoveAll(); 01155 01156 protected: 01157 PBASEARRAY(ObjPtrArray, PObject *); 01158 ObjPtrArray * theArray; 01159 }; 01160 01161 01162 #ifdef PHAS_TEMPLATES 01163 01170 template <class T> class PArray : public PArrayObjects 01171 { 01172 PCLASSINFO(PArray, PArrayObjects); 01173 01174 public: 01183 PArray( 01184 PINDEX initialSize = 0 01185 ) : PArrayObjects(initialSize) { } 01187 01193 virtual PObject * Clone() const 01194 { return PNEW PArray(0, this); } 01196 01206 T & operator[]( 01207 PINDEX index 01208 ) const { 01209 PObject * obj = GetAt(index); 01210 PAssert(obj != NULL, PInvalidArrayElement); 01211 return (T &)*obj; 01212 } 01214 01215 protected: 01216 PArray(int dummy, const PArray * c) : PArrayObjects(dummy, c) { } 01217 }; 01218 01219 01231 #define PARRAY(cls, T) typedef PArray<T> cls 01232 01233 01246 #define PDECLARE_ARRAY(cls, T) \ 01247 PARRAY(cls##_PTemplate, T); \ 01248 PDECLARE_CLASS(cls, cls##_PTemplate) \ 01249 protected: \ 01250 inline cls(int dummy, const cls * c) \ 01251 : cls##_PTemplate(dummy, c) { } \ 01252 public: \ 01253 inline cls(PINDEX initialSize = 0) \ 01254 : cls##_PTemplate(initialSize) { } \ 01255 virtual PObject * Clone() const \ 01256 { return PNEW cls(0, this); } \ 01257 01258 #else // PHAS_TEMPLATES 01259 01260 01261 #define PARRAY(cls, T) \ 01262 class cls : public PArrayObjects { \ 01263 PCLASSINFO(cls, PArrayObjects); \ 01264 protected: \ 01265 inline cls(int dummy, const cls * c) \ 01266 : PArrayObjects(dummy, c) { } \ 01267 public: \ 01268 inline cls(PINDEX initialSize = 0) \ 01269 : PArrayObjects(initialSize) { } \ 01270 virtual PObject * Clone() const \ 01271 { return PNEW cls(0, this); } \ 01272 inline T & operator[](PINDEX index) const\ 01273 { PObject * obj = GetAt(index); \ 01274 PAssert(obj != NULL, PInvalidArrayElement); \ 01275 /* want to do to this, but gcc 3.0 complains --> return *(T *)obj; } */ \ 01276 return (T &)*obj; } \ 01277 } 01278 01279 #define PDECLARE_ARRAY(cls, T) \ 01280 PARRAY(cls##_PTemplate, T); \ 01281 PDECLARE_CLASS(cls, cls##_PTemplate) \ 01282 protected: \ 01283 inline cls(int dummy, const cls * c) \ 01284 : cls##_PTemplate(dummy, c) { } \ 01285 public: \ 01286 inline cls(PINDEX initialSize = 0) \ 01287 : cls##_PTemplate(initialSize) { } \ 01288 virtual PObject * Clone() const \ 01289 { return PNEW cls(0, this); } \ 01290 01291 #endif // PHAS_TEMPLATES 01292 01293 01296 class PBitArray : public PBYTEArray 01297 { 01298 PCLASSINFO(PBitArray, PBYTEArray); 01299 01300 public: 01305 PBitArray( 01306 PINDEX initialSize = 0 01307 ); 01308 01311 PBitArray( 01312 const void * buffer, 01313 PINDEX length, 01314 BOOL dynamic = TRUE 01315 ); 01317 01322 virtual PObject * Clone() const; 01324 01333 virtual PINDEX GetSize() const; 01334 01343 virtual BOOL SetSize( 01344 PINDEX newSize 01345 ); 01346 01353 BOOL SetAt( 01354 PINDEX index, 01355 BOOL val 01356 ); 01357 01364 BOOL GetAt( 01365 PINDEX index 01366 ) const; 01367 01376 void Attach( 01377 const void * buffer, 01378 PINDEX bufferSize 01379 ); 01380 01394 BYTE * GetPointer( 01395 PINDEX minSize = 0 01396 ); 01398 01410 BOOL operator[]( 01411 PINDEX index 01412 ) const { return GetAt(index); } 01413 01419 PBitArray & operator+=( 01420 PINDEX index 01421 ) { SetAt(index, TRUE); return *this; } 01422 01428 PBitArray & operator-=( 01429 PINDEX index 01430 ) { SetAt(index, FALSE); return *this; } 01431 01443 BOOL Concatenate( 01444 const PBitArray & array 01445 ); 01447 }; 01448 01449 // End Of File ///////////////////////////////////////////////////////////////