00001 // 00002 // CDPA Class. 00003 // Based on DPA's from the shell 00004 // 00005 // FelixA 00006 // 00007 00008 #ifndef __LISTH 00009 #define __LISTH 00010 00011 class CDPA 00012 { 00013 public: 00014 int GetCount(); 00015 CDPA(); 00016 ~CDPA(); 00017 00018 BOOL Append(LPVOID); 00019 LPVOID GetPointer(int iItem) const; 00020 void Remove(int iItem); 00021 00022 protected: 00023 int GetNextFree() const { return m_iCurrentTop; } 00024 00025 private: 00026 int GetAllocated() const {return m_iAllocated;} 00027 void SetAllocated(int i) { m_iAllocated=i; } 00028 00029 void SetNextFree(int i) { m_iCurrentTop=i; } 00030 00031 void FAR * FAR * GetData() const { return m_pData; }; 00032 void SetData(void FAR * FAR * pD) { m_pData=pD; } 00033 00034 HANDLE GetHeap() const { return m_Heap; } 00035 void SetHeap( HANDLE h) { m_Heap = h; } 00036 00037 int m_iAllocated; // Number of items in the list. 00038 int m_iCurrentTop;// Next item to use. 00039 void FAR * FAR * m_pData; // Pointer to the pointer array. 00040 HANDLE m_Heap; // Handle for the heap we're using. 00041 }; 00042 00043 #endif