home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / MFCINC.PAK / AFXCOLL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  33.8 KB  |  1,441 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1995 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. #ifndef __AFXCOLL_H__
  12. #define __AFXCOLL_H__
  13.  
  14. #ifndef __AFX_H__
  15.     #include <afx.h>
  16. #endif
  17.  
  18. #ifdef _AFX_MINREBUILD
  19. #pragma component(minrebuild, off)
  20. #endif
  21. #ifndef _AFX_FULLTYPEINFO
  22. #pragma component(mintypeinfo, on)
  23. #endif
  24.  
  25. #ifdef _AFX_PACKING
  26. #pragma pack(push, _AFX_PACKING)
  27. #endif
  28.  
  29. /////////////////////////////////////////////////////////////////////////////
  30. // Classes declared in this file
  31.  
  32. //CObject
  33.     // Arrays
  34.     class CByteArray;           // array of BYTE
  35.     class CWordArray;           // array of WORD
  36.     class CDWordArray;          // array of DWORD
  37.     class CUIntArray;           // array of UINT
  38.     class CPtrArray;            // array of void*
  39.     class CObArray;             // array of CObject*
  40.  
  41.     // Lists
  42.     class CPtrList;             // list of void*
  43.     class CObList;              // list of CObject*
  44.  
  45.     // Maps (aka Dictionaries)
  46.     class CMapWordToOb;         // map from WORD to CObject*
  47.     class CMapWordToPtr;        // map from WORD to void*
  48.     class CMapPtrToWord;        // map from void* to WORD
  49.     class CMapPtrToPtr;         // map from void* to void*
  50.  
  51.     // Special String variants
  52.     class CStringArray;         // array of CStrings
  53.     class CStringList;          // list of CStrings
  54.     class CMapStringToPtr;      // map from CString to void*
  55.     class CMapStringToOb;       // map from CString to CObject*
  56.     class CMapStringToString;   // map from CString to CString
  57.  
  58. /////////////////////////////////////////////////////////////////////////////
  59.  
  60. #undef AFX_DATA
  61. #define AFX_DATA AFX_CORE_DATA
  62.  
  63. ////////////////////////////////////////////////////////////////////////////
  64.  
  65. class CByteArray : public CObject
  66. {
  67.  
  68.     DECLARE_SERIAL(CByteArray)
  69. public:
  70.  
  71. // Construction
  72.     CByteArray();
  73.  
  74. // Attributes
  75.     int GetSize() const;
  76.     int GetUpperBound() const;
  77.     void SetSize(int nNewSize, int nGrowBy = -1);
  78.  
  79. // Operations
  80.     // Clean up
  81.     void FreeExtra();
  82.     void RemoveAll();
  83.  
  84.     // Accessing elements
  85.     BYTE GetAt(int nIndex) const;
  86.     void SetAt(int nIndex, BYTE newElement);
  87.     BYTE& ElementAt(int nIndex);
  88.  
  89.     // Direct Access to the element data (may return NULL)
  90.     const BYTE* GetData() const;
  91.     BYTE* GetData();
  92.  
  93.     // Potentially growing the array
  94.     void SetAtGrow(int nIndex, BYTE newElement);
  95.     int Add(BYTE newElement);
  96.     int Append(const CByteArray& src);
  97.     void Copy(const CByteArray& src);
  98.  
  99.     // overloaded operator helpers
  100.     BYTE operator[](int nIndex) const;
  101.     BYTE& operator[](int nIndex);
  102.  
  103.     // Operations that move elements around
  104.     void InsertAt(int nIndex, BYTE newElement, int nCount = 1);
  105.     void RemoveAt(int nIndex, int nCount = 1);
  106.     void InsertAt(int nStartIndex, CByteArray* pNewArray);
  107.  
  108. // Implementation
  109. protected:
  110.     BYTE* m_pData;   // the actual array of data
  111.     int m_nSize;     // # of elements (upperBound - 1)
  112.     int m_nMaxSize;  // max allocated
  113.     int m_nGrowBy;   // grow amount
  114.  
  115. public:
  116.     ~CByteArray();
  117.  
  118.     void Serialize(CArchive&);
  119. #ifdef _DEBUG
  120.     void Dump(CDumpContext&) const;
  121.     void AssertValid() const;
  122. #endif
  123.  
  124. protected:
  125.     // local typedefs for class templates
  126.     typedef BYTE BASE_TYPE;
  127.     typedef BYTE BASE_ARG_TYPE;
  128. };
  129.  
  130.  
  131. ////////////////////////////////////////////////////////////////////////////
  132.  
  133. class CWordArray : public CObject
  134. {
  135.  
  136.     DECLARE_SERIAL(CWordArray)
  137. public:
  138.  
  139. // Construction
  140.     CWordArray();
  141.  
  142. // Attributes
  143.     int GetSize() const;
  144.     int GetUpperBound() const;
  145.     void SetSize(int nNewSize, int nGrowBy = -1);
  146.  
  147. // Operations
  148.     // Clean up
  149.     void FreeExtra();
  150.     void RemoveAll();
  151.  
  152.     // Accessing elements
  153.     WORD GetAt(int nIndex) const;
  154.     void SetAt(int nIndex, WORD newElement);
  155.     WORD& ElementAt(int nIndex);
  156.  
  157.     // Direct Access to the element data (may return NULL)
  158.     const WORD* GetData() const;
  159.     WORD* GetData();
  160.  
  161.     // Potentially growing the array
  162.     void SetAtGrow(int nIndex, WORD newElement);
  163.     int Add(WORD newElement);
  164.     int Append(const CWordArray& src);
  165.     void Copy(const CWordArray& src);
  166.  
  167.     // overloaded operator helpers
  168.     WORD operator[](int nIndex) const;
  169.     WORD& operator[](int nIndex);
  170.  
  171.     // Operations that move elements around
  172.     void InsertAt(int nIndex, WORD newElement, int nCount = 1);
  173.     void RemoveAt(int nIndex, int nCount = 1);
  174.     void InsertAt(int nStartIndex, CWordArray* pNewArray);
  175.  
  176. // Implementation
  177. protected:
  178.     WORD* m_pData;   // the actual array of data
  179.     int m_nSize;     // # of elements (upperBound - 1)
  180.     int m_nMaxSize;  // max allocated
  181.     int m_nGrowBy;   // grow amount
  182.  
  183. public:
  184.     ~CWordArray();
  185.  
  186.     void Serialize(CArchive&);
  187. #ifdef _DEBUG
  188.     void Dump(CDumpContext&) const;
  189.     void AssertValid() const;
  190. #endif
  191.  
  192. protected:
  193.     // local typedefs for class templates
  194.     typedef WORD BASE_TYPE;
  195.     typedef WORD BASE_ARG_TYPE;
  196. };
  197.  
  198.  
  199. ////////////////////////////////////////////////////////////////////////////
  200.  
  201. class CDWordArray : public CObject
  202. {
  203.  
  204.     DECLARE_SERIAL(CDWordArray)
  205. public:
  206.  
  207. // Construction
  208.     CDWordArray();
  209.  
  210. // Attributes
  211.     int GetSize() const;
  212.     int GetUpperBound() const;
  213.     void SetSize(int nNewSize, int nGrowBy = -1);
  214.  
  215. // Operations
  216.     // Clean up
  217.     void FreeExtra();
  218.     void RemoveAll();
  219.  
  220.     // Accessing elements
  221.     DWORD GetAt(int nIndex) const;
  222.     void SetAt(int nIndex, DWORD newElement);
  223.     DWORD& ElementAt(int nIndex);
  224.  
  225.     // Direct Access to the element data (may return NULL)
  226.     const DWORD* GetData() const;
  227.     DWORD* GetData();
  228.  
  229.     // Potentially growing the array
  230.     void SetAtGrow(int nIndex, DWORD newElement);
  231.     int Add(DWORD newElement);
  232.     int Append(const CDWordArray& src);
  233.     void Copy(const CDWordArray& src);
  234.  
  235.     // overloaded operator helpers
  236.     DWORD operator[](int nIndex) const;
  237.     DWORD& operator[](int nIndex);
  238.  
  239.     // Operations that move elements around
  240.     void InsertAt(int nIndex, DWORD newElement, int nCount = 1);
  241.     void RemoveAt(int nIndex, int nCount = 1);
  242.     void InsertAt(int nStartIndex, CDWordArray* pNewArray);
  243.  
  244. // Implementation
  245. protected:
  246.     DWORD* m_pData;   // the actual array of data
  247.     int m_nSize;     // # of elements (upperBound - 1)
  248.     int m_nMaxSize;  // max allocated
  249.     int m_nGrowBy;   // grow amount
  250.  
  251. public:
  252.     ~CDWordArray();
  253.  
  254.     void Serialize(CArchive&);
  255. #ifdef _DEBUG
  256.     void Dump(CDumpContext&) const;
  257.     void AssertValid() const;
  258. #endif
  259.  
  260. protected:
  261.     // local typedefs for class templates
  262.     typedef DWORD BASE_TYPE;
  263.     typedef DWORD BASE_ARG_TYPE;
  264. };
  265.  
  266.  
  267. ////////////////////////////////////////////////////////////////////////////
  268.  
  269. class CUIntArray : public CObject
  270. {
  271.  
  272.     DECLARE_DYNAMIC(CUIntArray)
  273. public:
  274.  
  275. // Construction
  276.     CUIntArray();
  277.  
  278. // Attributes
  279.     int GetSize() const;
  280.     int GetUpperBound() const;
  281.     void SetSize(int nNewSize, int nGrowBy = -1);
  282.  
  283. // Operations
  284.     // Clean up
  285.     void FreeExtra();
  286.     void RemoveAll();
  287.  
  288.     // Accessing elements
  289.     UINT GetAt(int nIndex) const;
  290.     void SetAt(int nIndex, UINT newElement);
  291.     UINT& ElementAt(int nIndex);
  292.  
  293.     // Direct Access to the element data (may return NULL)
  294.     const UINT* GetData() const;
  295.     UINT* GetData();
  296.  
  297.     // Potentially growing the array
  298.     void SetAtGrow(int nIndex, UINT newElement);
  299.     int Add(UINT newElement);
  300.     int Append(const CUIntArray& src);
  301.     void Copy(const CUIntArray& src);
  302.  
  303.     // overloaded operator helpers
  304.     UINT operator[](int nIndex) const;
  305.     UINT& operator[](int nIndex);
  306.  
  307.     // Operations that move elements around
  308.     void InsertAt(int nIndex, UINT newElement, int nCount = 1);
  309.     void RemoveAt(int nIndex, int nCount = 1);
  310.     void InsertAt(int nStartIndex, CUIntArray* pNewArray);
  311.  
  312. // Implementation
  313. protected:
  314.     UINT* m_pData;   // the actual array of data
  315.     int m_nSize;     // # of elements (upperBound - 1)
  316.     int m_nMaxSize;  // max allocated
  317.     int m_nGrowBy;   // grow amount
  318.  
  319. public:
  320.     ~CUIntArray();
  321. #ifdef _DEBUG
  322.     void Dump(CDumpContext&) const;
  323.     void AssertValid() const;
  324. #endif
  325.  
  326. protected:
  327.     // local typedefs for class templates
  328.     typedef UINT BASE_TYPE;
  329.     typedef UINT BASE_ARG_TYPE;
  330. };
  331.  
  332.  
  333. ////////////////////////////////////////////////////////////////////////////
  334.  
  335. class CPtrArray : public CObject
  336. {
  337.  
  338.     DECLARE_DYNAMIC(CPtrArray)
  339. public:
  340.  
  341. // Construction
  342.     CPtrArray();
  343.  
  344. // Attributes
  345.     int GetSize() const;
  346.     int GetUpperBound() const;
  347.     void SetSize(int nNewSize, int nGrowBy = -1);
  348.  
  349. // Operations
  350.     // Clean up
  351.     void FreeExtra();
  352.     void RemoveAll();
  353.  
  354.     // Accessing elements
  355.     void* GetAt(int nIndex) const;
  356.     void SetAt(int nIndex, void* newElement);
  357.     void*& ElementAt(int nIndex);
  358.  
  359.     // Direct Access to the element data (may return NULL)
  360.     const void** GetData() const;
  361.     void** GetData();
  362.  
  363.     // Potentially growing the array
  364.     void SetAtGrow(int nIndex, void* newElement);
  365.     int Add(void* newElement);
  366.     int Append(const CPtrArray& src);
  367.     void Copy(const CPtrArray& src);
  368.  
  369.     // overloaded operator helpers
  370.     void* operator[](int nIndex) const;
  371.     void*& operator[](int nIndex);
  372.  
  373.     // Operations that move elements around
  374.     void InsertAt(int nIndex, void* newElement, int nCount = 1);
  375.     void RemoveAt(int nIndex, int nCount = 1);
  376.     void InsertAt(int nStartIndex, CPtrArray* pNewArray);
  377.  
  378. // Implementation
  379. protected:
  380.     void** m_pData;   // the actual array of data
  381.     int m_nSize;     // # of elements (upperBound - 1)
  382.     int m_nMaxSize;  // max allocated
  383.     int m_nGrowBy;   // grow amount
  384.  
  385. public:
  386.     ~CPtrArray();
  387. #ifdef _DEBUG
  388.     void Dump(CDumpContext&) const;
  389.     void AssertValid() const;
  390. #endif
  391.  
  392. protected:
  393.     // local typedefs for class templates
  394.     typedef void* BASE_TYPE;
  395.     typedef void* BASE_ARG_TYPE;
  396. };
  397.  
  398.  
  399. ////////////////////////////////////////////////////////////////////////////
  400.  
  401. class CObArray : public CObject
  402. {
  403.  
  404.     DECLARE_SERIAL(CObArray)
  405. public:
  406.  
  407. // Construction
  408.     CObArray();
  409.  
  410. // Attributes
  411.     int GetSize() const;
  412.     int GetUpperBound() const;
  413.     void SetSize(int nNewSize, int nGrowBy = -1);
  414.  
  415. // Operations
  416.     // Clean up
  417.     void FreeExtra();
  418.     void RemoveAll();
  419.  
  420.     // Accessing elements
  421.     CObject* GetAt(int nIndex) const;
  422.     void SetAt(int nIndex, CObject* newElement);
  423.     CObject*& ElementAt(int nIndex);
  424.  
  425.     // Direct Access to the element data (may return NULL)
  426.     const CObject** GetData() const;
  427.     CObject** GetData();
  428.  
  429.     // Potentially growing the array
  430.     void SetAtGrow(int nIndex, CObject* newElement);
  431.     int Add(CObject* newElement);
  432.     int Append(const CObArray& src);
  433.     void Copy(const CObArray& src);
  434.  
  435.     // overloaded operator helpers
  436.     CObject* operator[](int nIndex) const;
  437.     CObject*& operator[](int nIndex);
  438.  
  439.     // Operations that move elements around
  440.     void InsertAt(int nIndex, CObject* newElement, int nCount = 1);
  441.     void RemoveAt(int nIndex, int nCount = 1);
  442.     void InsertAt(int nStartIndex, CObArray* pNewArray);
  443.  
  444. // Implementation
  445. protected:
  446.     CObject** m_pData;   // the actual array of data
  447.     int m_nSize;     // # of elements (upperBound - 1)
  448.     int m_nMaxSize;  // max allocated
  449.     int m_nGrowBy;   // grow amount
  450.  
  451. public:
  452.     ~CObArray();
  453.  
  454.     void Serialize(CArchive&);
  455. #ifdef _DEBUG
  456.     void Dump(CDumpContext&) const;
  457.     void AssertValid() const;
  458. #endif
  459.  
  460. protected:
  461.     // local typedefs for class templates
  462.     typedef CObject* BASE_TYPE;
  463.     typedef CObject* BASE_ARG_TYPE;
  464. };
  465.  
  466.  
  467. ////////////////////////////////////////////////////////////////////////////
  468.  
  469. class CStringArray : public CObject
  470. {
  471.  
  472.     DECLARE_SERIAL(CStringArray)
  473. public:
  474.  
  475. // Construction
  476.     CStringArray();
  477.  
  478. // Attributes
  479.     int GetSize() const;
  480.     int GetUpperBound() const;
  481.     void SetSize(int nNewSize, int nGrowBy = -1);
  482.  
  483. // Operations
  484.     // Clean up
  485.     void FreeExtra();
  486.     void RemoveAll();
  487.  
  488.     // Accessing elements
  489.     CString GetAt(int nIndex) const;
  490.     void SetAt(int nIndex, LPCTSTR newElement);
  491.     CString& ElementAt(int nIndex);
  492.  
  493.     // Direct Access to the element data (may return NULL)
  494.     const CString* GetData() const;
  495.     CString* GetData();
  496.  
  497.     // Potentially growing the array
  498.     void SetAtGrow(int nIndex, LPCTSTR newElement);
  499.     int Add(LPCTSTR newElement);
  500.     int Append(const CStringArray& src);
  501.     void Copy(const CStringArray& src);
  502.  
  503.     // overloaded operator helpers
  504.     CString operator[](int nIndex) const;
  505.     CString& operator[](int nIndex);
  506.  
  507.     // Operations that move elements around
  508.     void InsertAt(int nIndex, LPCTSTR newElement, int nCount = 1);
  509.     void RemoveAt(int nIndex, int nCount = 1);
  510.     void InsertAt(int nStartIndex, CStringArray* pNewArray);
  511.  
  512. // Implementation
  513. protected:
  514.     CString* m_pData;   // the actual array of data
  515.     int m_nSize;     // # of elements (upperBound - 1)
  516.     int m_nMaxSize;  // max allocated
  517.     int m_nGrowBy;   // grow amount
  518.  
  519. public:
  520.     ~CStringArray();
  521.  
  522.     void Serialize(CArchive&);
  523. #ifdef _DEBUG
  524.     void Dump(CDumpContext&) const;
  525.     void AssertValid() const;
  526. #endif
  527.  
  528. protected:
  529.     // local typedefs for class templates
  530.     typedef CString BASE_TYPE;
  531.     typedef LPCTSTR BASE_ARG_TYPE;
  532. };
  533.  
  534.  
  535. /////////////////////////////////////////////////////////////////////////////
  536.  
  537. class CPtrList : public CObject
  538. {
  539.  
  540.     DECLARE_DYNAMIC(CPtrList)
  541.  
  542. protected:
  543.     struct CNode
  544.     {
  545.         CNode* pNext;
  546.         CNode* pPrev;
  547.         void* data;
  548.     };
  549. public:
  550.  
  551. // Construction
  552.     CPtrList(int nBlockSize = 10);
  553.  
  554. // Attributes (head and tail)
  555.     // count of elements
  556.     int GetCount() const;
  557.     BOOL IsEmpty() const;
  558.  
  559.     // peek at head or tail
  560.     void*& GetHead();
  561.     void* GetHead() const;
  562.     void*& GetTail();
  563.     void* GetTail() const;
  564.  
  565. // Operations
  566.     // get head or tail (and remove it) - don't call on empty list!
  567.     void* RemoveHead();
  568.     void* RemoveTail();
  569.  
  570.     // add before head or after tail
  571.     POSITION AddHead(void* newElement);
  572.     POSITION AddTail(void* newElement);
  573.  
  574.     // add another list of elements before head or after tail
  575.     void AddHead(CPtrList* pNewList);
  576.     void AddTail(CPtrList* pNewList);
  577.  
  578.     // remove all elements
  579.     void RemoveAll();
  580.  
  581.     // iteration
  582.     POSITION GetHeadPosition() const;
  583.     POSITION GetTailPosition() const;
  584.     void*& GetNext(POSITION& rPosition); // return *Position++
  585.     void* GetNext(POSITION& rPosition) const; // return *Position++
  586.     void*& GetPrev(POSITION& rPosition); // return *Position--
  587.     void* GetPrev(POSITION& rPosition) const; // return *Position--
  588.  
  589.     // getting/modifying an element at a given position
  590.     void*& GetAt(POSITION position);
  591.     void* GetAt(POSITION position) const;
  592.     void SetAt(POSITION pos, void* newElement);
  593.     void RemoveAt(POSITION position);
  594.  
  595.     // inserting before or after a given position
  596.     POSITION InsertBefore(POSITION position, void* newElement);
  597.     POSITION InsertAfter(POSITION position, void* newElement);
  598.  
  599.     // helper functions (note: O(n) speed)
  600.     POSITION Find(void* searchValue, POSITION startAfter = NULL) const;
  601.                         // defaults to starting at the HEAD
  602.                         // return NULL if not found
  603.     POSITION FindIndex(int nIndex) const;
  604.                         // get the 'nIndex'th element (may return NULL)
  605.  
  606. // Implementation
  607. protected:
  608.     CNode* m_pNodeHead;
  609.     CNode* m_pNodeTail;
  610.     int m_nCount;
  611.     CNode* m_pNodeFree;
  612.     struct CPlex* m_pBlocks;
  613.     int m_nBlockSize;
  614.  
  615.     CNode* NewNode(CNode*, CNode*);
  616.     void FreeNode(CNode*);
  617.  
  618. public:
  619.     ~CPtrList();
  620. #ifdef _DEBUG
  621.     void Dump(CDumpContext&) const;
  622.     void AssertValid() const;
  623. #endif
  624.     // local typedefs for class templates
  625.     typedef void* BASE_TYPE;
  626.     typedef void* BASE_ARG_TYPE;
  627. };
  628.  
  629.  
  630. /////////////////////////////////////////////////////////////////////////////
  631.  
  632. class CObList : public CObject
  633. {
  634.  
  635.     DECLARE_SERIAL(CObList)
  636.  
  637. protected:
  638.     struct CNode
  639.     {
  640.         CNode* pNext;
  641.         CNode* pPrev;
  642.         CObject* data;
  643.     };
  644. public:
  645.  
  646. // Construction
  647.     CObList(int nBlockSize = 10);
  648.  
  649. // Attributes (head and tail)
  650.     // count of elements
  651.     int GetCount() const;
  652.     BOOL IsEmpty() const;
  653.  
  654.     // peek at head or tail
  655.     CObject*& GetHead();
  656.     CObject* GetHead() const;
  657.     CObject*& GetTail();
  658.     CObject* GetTail() const;
  659.  
  660. // Operations
  661.     // get head or tail (and remove it) - don't call on empty list!
  662.     CObject* RemoveHead();
  663.     CObject* RemoveTail();
  664.  
  665.     // add before head or after tail
  666.     POSITION AddHead(CObject* newElement);
  667.     POSITION AddTail(CObject* newElement);
  668.  
  669.     // add another list of elements before head or after tail
  670.     void AddHead(CObList* pNewList);
  671.     void AddTail(CObList* pNewList);
  672.  
  673.     // remove all elements
  674.     void RemoveAll();
  675.  
  676.     // iteration
  677.     POSITION GetHeadPosition() const;
  678.     POSITION GetTailPosition() const;
  679.     CObject*& GetNext(POSITION& rPosition); // return *Position++
  680.     CObject* GetNext(POSITION& rPosition) const; // return *Position++
  681.     CObject*& GetPrev(POSITION& rPosition); // return *Position--
  682.     CObject* GetPrev(POSITION& rPosition) const; // return *Position--
  683.  
  684.     // getting/modifying an element at a given position
  685.     CObject*& GetAt(POSITION position);
  686.     CObject* GetAt(POSITION position) const;
  687.     void SetAt(POSITION pos, CObject* newElement);
  688.     void RemoveAt(POSITION position);
  689.  
  690.     // inserting before or after a given position
  691.     POSITION InsertBefore(POSITION position, CObject* newElement);
  692.     POSITION InsertAfter(POSITION position, CObject* newElement);
  693.  
  694.     // helper functions (note: O(n) speed)
  695.     POSITION Find(CObject* searchValue, POSITION startAfter = NULL) const;
  696.                         // defaults to starting at the HEAD
  697.                         // return NULL if not found
  698.     POSITION FindIndex(int nIndex) const;
  699.                         // get the 'nIndex'th element (may return NULL)
  700.  
  701. // Implementation
  702. protected:
  703.     CNode* m_pNodeHead;
  704.     CNode* m_pNodeTail;
  705.     int m_nCount;
  706.     CNode* m_pNodeFree;
  707.     struct CPlex* m_pBlocks;
  708.     int m_nBlockSize;
  709.  
  710.     CNode* NewNode(CNode*, CNode*);
  711.     void FreeNode(CNode*);
  712.  
  713. public:
  714.     ~CObList();
  715.  
  716.     void Serialize(CArchive&);
  717. #ifdef _DEBUG
  718.     void Dump(CDumpContext&) const;
  719.     void AssertValid() const;
  720. #endif
  721.     // local typedefs for class templates
  722.     typedef CObject* BASE_TYPE;
  723.     typedef CObject* BASE_ARG_TYPE;
  724. };
  725.  
  726.  
  727. /////////////////////////////////////////////////////////////////////////////
  728.  
  729. class CStringList : public CObject
  730. {
  731.  
  732.     DECLARE_SERIAL(CStringList)
  733.  
  734. protected:
  735.     struct CNode
  736.     {
  737.         CNode* pNext;
  738.         CNode* pPrev;
  739.         CString data;
  740.     };
  741. public:
  742.  
  743. // Construction
  744.     CStringList(int nBlockSize = 10);
  745.  
  746. // Attributes (head and tail)
  747.     // count of elements
  748.     int GetCount() const;
  749.     BOOL IsEmpty() const;
  750.  
  751.     // peek at head or tail
  752.     CString& GetHead();
  753.     CString GetHead() const;
  754.     CString& GetTail();
  755.     CString GetTail() const;
  756.  
  757. // Operations
  758.     // get head or tail (and remove it) - don't call on empty list!
  759.     CString RemoveHead();
  760.     CString RemoveTail();
  761.  
  762.     // add before head or after tail
  763.     POSITION AddHead(LPCTSTR newElement);
  764.     POSITION AddTail(LPCTSTR newElement);
  765.  
  766.     // add another list of elements before head or after tail
  767.     void AddHead(CStringList* pNewList);
  768.     void AddTail(CStringList* pNewList);
  769.  
  770.     // remove all elements
  771.     void RemoveAll();
  772.  
  773.     // iteration
  774.     POSITION GetHeadPosition() const;
  775.     POSITION GetTailPosition() const;
  776.     CString& GetNext(POSITION& rPosition); // return *Position++
  777.     CString GetNext(POSITION& rPosition) const; // return *Position++
  778.     CString& GetPrev(POSITION& rPosition); // return *Position--
  779.     CString GetPrev(POSITION& rPosition) const; // return *Position--
  780.  
  781.     // getting/modifying an element at a given position
  782.     CString& GetAt(POSITION position);
  783.     CString GetAt(POSITION position) const;
  784.     void SetAt(POSITION pos, LPCTSTR newElement);
  785.     void RemoveAt(POSITION position);
  786.  
  787.     // inserting before or after a given position
  788.     POSITION InsertBefore(POSITION position, LPCTSTR newElement);
  789.     POSITION InsertAfter(POSITION position, LPCTSTR newElement);
  790.  
  791.     // helper functions (note: O(n) speed)
  792.     POSITION Find(LPCTSTR searchValue, POSITION startAfter = NULL) const;
  793.                         // defaults to starting at the HEAD
  794.                         // return NULL if not found
  795.     POSITION FindIndex(int nIndex) const;
  796.                         // get the 'nIndex'th element (may return NULL)
  797.  
  798. // Implementation
  799. protected:
  800.     CNode* m_pNodeHead;
  801.     CNode* m_pNodeTail;
  802.     int m_nCount;
  803.     CNode* m_pNodeFree;
  804.     struct CPlex* m_pBlocks;
  805.     int m_nBlockSize;
  806.  
  807.     CNode* NewNode(CNode*, CNode*);
  808.     void FreeNode(CNode*);
  809.  
  810. public:
  811.     ~CStringList();
  812.  
  813.     void Serialize(CArchive&);
  814. #ifdef _DEBUG
  815.     void Dump(CDumpContext&) const;
  816.     void AssertValid() const;
  817. #endif
  818.     // local typedefs for class templates
  819.     typedef CString BASE_TYPE;
  820.     typedef LPCTSTR BASE_ARG_TYPE;
  821. };
  822.  
  823.  
  824. /////////////////////////////////////////////////////////////////////////////
  825.  
  826. class CMapWordToPtr : public CObject
  827. {
  828.  
  829.     DECLARE_DYNAMIC(CMapWordToPtr)
  830. protected:
  831.     // Association
  832.     struct CAssoc
  833.     {
  834.         CAssoc* pNext;
  835.         UINT nHashValue;  // needed for efficient iteration
  836.         WORD key;
  837.         void* value;
  838.     };
  839.  
  840. public:
  841.  
  842. // Construction
  843.     CMapWordToPtr(int nBlockSize = 10);
  844.  
  845. // Attributes
  846.     // number of elements
  847.     int GetCount() const;
  848.     BOOL IsEmpty() const;
  849.  
  850.     // Lookup
  851.     BOOL Lookup(WORD key, void*& rValue) const;
  852.  
  853. // Operations
  854.     // Lookup and add if not there
  855.     void*& operator[](WORD key);
  856.  
  857.     // add a new (key, value) pair
  858.     void SetAt(WORD key, void* newValue);
  859.  
  860.     // removing existing (key, ?) pair
  861.     BOOL RemoveKey(WORD key);
  862.     void RemoveAll();
  863.  
  864.     // iterating all (key, value) pairs
  865.     POSITION GetStartPosition() const;
  866.     void GetNextAssoc(POSITION& rNextPosition, WORD& rKey, void*& rValue) const;
  867.  
  868.     // advanced features for derived classes
  869.     UINT GetHashTableSize() const;
  870.     void InitHashTable(UINT hashSize, BOOL bAllocNow = TRUE);
  871.  
  872. // Overridables: special non-virtual (see map implementation for details)
  873.     // Routine used to user-provided hash keys
  874.     UINT HashKey(WORD key) const;
  875.  
  876. // Implementation
  877. protected:
  878.     CAssoc** m_pHashTable;
  879.     UINT m_nHashTableSize;
  880.     int m_nCount;
  881.     CAssoc* m_pFreeList;
  882.     struct CPlex* m_pBlocks;
  883.     int m_nBlockSize;
  884.  
  885.     CAssoc* NewAssoc();
  886.     void FreeAssoc(CAssoc*);
  887.     CAssoc* GetAssocAt(WORD, UINT&) const;
  888.  
  889. public:
  890.     ~CMapWordToPtr();
  891. #ifdef _DEBUG
  892.     void Dump(CDumpContext&) const;
  893.     void AssertValid() const;
  894. #endif
  895.  
  896. protected:
  897.     // local typedefs for CTypedPtrMap class template
  898.     typedef WORD BASE_KEY;
  899.     typedef WORD BASE_ARG_KEY;
  900.     typedef void* BASE_VALUE;
  901.     typedef void* BASE_ARG_VALUE;
  902. };
  903.  
  904.  
  905. /////////////////////////////////////////////////////////////////////////////
  906.  
  907. class CMapPtrToWord : public CObject
  908. {
  909.  
  910.     DECLARE_DYNAMIC(CMapPtrToWord)
  911. protected:
  912.     // Association
  913.     struct CAssoc
  914.     {
  915.         CAssoc* pNext;
  916.         UINT nHashValue;  // needed for efficient iteration
  917.         void* key;
  918.         WORD value;
  919.     };
  920.  
  921. public:
  922.  
  923. // Construction
  924.     CMapPtrToWord(int nBlockSize = 10);
  925.  
  926. // Attributes
  927.     // number of elements
  928.     int GetCount() const;
  929.     BOOL IsEmpty() const;
  930.  
  931.     // Lookup
  932.     BOOL Lookup(void* key, WORD& rValue) const;
  933.  
  934. // Operations
  935.     // Lookup and add if not there
  936.     WORD& operator[](void* key);
  937.  
  938.     // add a new (key, value) pair
  939.     void SetAt(void* key, WORD newValue);
  940.  
  941.     // removing existing (key, ?) pair
  942.     BOOL RemoveKey(void* key);
  943.     void RemoveAll();
  944.  
  945.     // iterating all (key, value) pairs
  946.     POSITION GetStartPosition() const;
  947.     void GetNextAssoc(POSITION& rNextPosition, void*& rKey, WORD& rValue) const;
  948.  
  949.     // advanced features for derived classes
  950.     UINT GetHashTableSize() const;
  951.     void InitHashTable(UINT hashSize, BOOL bAllocNow = TRUE);
  952.  
  953. // Overridables: special non-virtual (see map implementation for details)
  954.     // Routine used to user-provided hash keys
  955.     UINT HashKey(void* key) const;
  956.  
  957. // Implementation
  958. protected:
  959.     CAssoc** m_pHashTable;
  960.     UINT m_nHashTableSize;
  961.     int m_nCount;
  962.     CAssoc* m_pFreeList;
  963.     struct CPlex* m_pBlocks;
  964.     int m_nBlockSize;
  965.  
  966.     CAssoc* NewAssoc();
  967.     void FreeAssoc(CAssoc*);
  968.     CAssoc* GetAssocAt(void*, UINT&) const;
  969.  
  970. public:
  971.     ~CMapPtrToWord();
  972. #ifdef _DEBUG
  973.     void Dump(CDumpContext&) const;
  974.     void AssertValid() const;
  975. #endif
  976.  
  977. protected:
  978.     // local typedefs for CTypedPtrMap class template
  979.     typedef void* BASE_KEY;
  980.     typedef void* BASE_ARG_KEY;
  981.     typedef WORD BASE_VALUE;
  982.     typedef WORD BASE_ARG_VALUE;
  983. };
  984.  
  985.  
  986. /////////////////////////////////////////////////////////////////////////////
  987.  
  988. class CMapPtrToPtr : public CObject
  989. {
  990.  
  991.     DECLARE_DYNAMIC(CMapPtrToPtr)
  992. protected:
  993.     // Association
  994.     struct CAssoc
  995.     {
  996.         CAssoc* pNext;
  997.         UINT nHashValue;  // needed for efficient iteration
  998.         void* key;
  999.         void* value;
  1000.     };
  1001.  
  1002. public:
  1003.  
  1004. // Construction
  1005.     CMapPtrToPtr(int nBlockSize = 10);
  1006.  
  1007. // Attributes
  1008.     // number of elements
  1009.     int GetCount() const;
  1010.     BOOL IsEmpty() const;
  1011.  
  1012.     // Lookup
  1013.     BOOL Lookup(void* key, void*& rValue) const;
  1014.  
  1015. // Operations
  1016.     // Lookup and add if not there
  1017.     void*& operator[](void* key);
  1018.  
  1019.     // add a new (key, value) pair
  1020.     void SetAt(void* key, void* newValue);
  1021.  
  1022.     // removing existing (key, ?) pair
  1023.     BOOL RemoveKey(void* key);
  1024.     void RemoveAll();
  1025.  
  1026.     // iterating all (key, value) pairs
  1027.     POSITION GetStartPosition() const;
  1028.     void GetNextAssoc(POSITION& rNextPosition, void*& rKey, void*& rValue) const;
  1029.  
  1030.     // advanced features for derived classes
  1031.     UINT GetHashTableSize() const;
  1032.     void InitHashTable(UINT hashSize, BOOL bAllocNow = TRUE);
  1033.  
  1034. // Overridables: special non-virtual (see map implementation for details)
  1035.     // Routine used to user-provided hash keys
  1036.     UINT HashKey(void* key) const;
  1037.  
  1038. // Implementation
  1039. protected:
  1040.     CAssoc** m_pHashTable;
  1041.     UINT m_nHashTableSize;
  1042.     int m_nCount;
  1043.     CAssoc* m_pFreeList;
  1044.     struct CPlex* m_pBlocks;
  1045.     int m_nBlockSize;
  1046.  
  1047.     CAssoc* NewAssoc();
  1048.     void FreeAssoc(CAssoc*);
  1049.     CAssoc* GetAssocAt(void*, UINT&) const;
  1050.  
  1051. public:
  1052.     ~CMapPtrToPtr();
  1053. #ifdef _DEBUG
  1054.     void Dump(CDumpContext&) const;
  1055.     void AssertValid() const;
  1056. #endif
  1057.  
  1058. protected:
  1059.     // local typedefs for CTypedPtrMap class template
  1060.     typedef void* BASE_KEY;
  1061.     typedef void* BASE_ARG_KEY;
  1062.     typedef void* BASE_VALUE;
  1063.     typedef void* BASE_ARG_VALUE;
  1064. };
  1065.  
  1066.  
  1067. /////////////////////////////////////////////////////////////////////////////
  1068.  
  1069. class CMapWordToOb : public CObject
  1070. {
  1071.  
  1072.     DECLARE_SERIAL(CMapWordToOb)
  1073. protected:
  1074.     // Association
  1075.     struct CAssoc
  1076.     {
  1077.         CAssoc* pNext;
  1078.         UINT nHashValue;  // needed for efficient iteration
  1079.         WORD key;
  1080.         CObject* value;
  1081.     };
  1082.  
  1083. public:
  1084.  
  1085. // Construction
  1086.     CMapWordToOb(int nBlockSize = 10);
  1087.  
  1088. // Attributes
  1089.     // number of elements
  1090.     int GetCount() const;
  1091.     BOOL IsEmpty() const;
  1092.  
  1093.     // Lookup
  1094.     BOOL Lookup(WORD key, CObject*& rValue) const;
  1095.  
  1096. // Operations
  1097.     // Lookup and add if not there
  1098.     CObject*& operator[](WORD key);
  1099.  
  1100.     // add a new (key, value) pair
  1101.     void SetAt(WORD key, CObject* newValue);
  1102.  
  1103.     // removing existing (key, ?) pair
  1104.     BOOL RemoveKey(WORD key);
  1105.     void RemoveAll();
  1106.  
  1107.     // iterating all (key, value) pairs
  1108.     POSITION GetStartPosition() const;
  1109.     void GetNextAssoc(POSITION& rNextPosition, WORD& rKey, CObject*& rValue) const;
  1110.  
  1111.     // advanced features for derived classes
  1112.     UINT GetHashTableSize() const;
  1113.     void InitHashTable(UINT hashSize, BOOL bAllocNow = TRUE);
  1114.  
  1115. // Overridables: special non-virtual (see map implementation for details)
  1116.     // Routine used to user-provided hash keys
  1117.     UINT HashKey(WORD key) const;
  1118.  
  1119. // Implementation
  1120. protected:
  1121.     CAssoc** m_pHashTable;
  1122.     UINT m_nHashTableSize;
  1123.     int m_nCount;
  1124.     CAssoc* m_pFreeList;
  1125.     struct CPlex* m_pBlocks;
  1126.     int m_nBlockSize;
  1127.  
  1128.     CAssoc* NewAssoc();
  1129.     void FreeAssoc(CAssoc*);
  1130.     CAssoc* GetAssocAt(WORD, UINT&) const;
  1131.  
  1132. public:
  1133.     ~CMapWordToOb();
  1134.  
  1135.     void Serialize(CArchive&);
  1136. #ifdef _DEBUG
  1137.     void Dump(CDumpContext&) const;
  1138.     void AssertValid() const;
  1139. #endif
  1140.  
  1141. protected:
  1142.     // local typedefs for CTypedPtrMap class template
  1143.     typedef WORD BASE_KEY;
  1144.     typedef WORD BASE_ARG_KEY;
  1145.     typedef CObject* BASE_VALUE;
  1146.     typedef CObject* BASE_ARG_VALUE;
  1147. };
  1148.  
  1149.  
  1150. /////////////////////////////////////////////////////////////////////////////
  1151.  
  1152. class CMapStringToPtr : public CObject
  1153. {
  1154.  
  1155.     DECLARE_DYNAMIC(CMapStringToPtr)
  1156. protected:
  1157.     // Association
  1158.     struct CAssoc
  1159.     {
  1160.         CAssoc* pNext;
  1161.         UINT nHashValue;  // needed for efficient iteration
  1162.         CString key;
  1163.         void* value;
  1164.     };
  1165.  
  1166. public:
  1167.  
  1168. // Construction
  1169.     CMapStringToPtr(int nBlockSize = 10);
  1170.  
  1171. // Attributes
  1172.     // number of elements
  1173.     int GetCount() const;
  1174.     BOOL IsEmpty() const;
  1175.  
  1176.     // Lookup
  1177.     BOOL Lookup(LPCTSTR key, void*& rValue) const;
  1178.     BOOL LookupKey(LPCTSTR key, LPCTSTR& rKey) const;
  1179.  
  1180. // Operations
  1181.     // Lookup and add if not there
  1182.     void*& operator[](LPCTSTR key);
  1183.  
  1184.     // add a new (key, value) pair
  1185.     void SetAt(LPCTSTR key, void* newValue);
  1186.  
  1187.     // removing existing (key, ?) pair
  1188.     BOOL RemoveKey(LPCTSTR key);
  1189.     void RemoveAll();
  1190.  
  1191.     // iterating all (key, value) pairs
  1192.     POSITION GetStartPosition() const;
  1193.     void GetNextAssoc(POSITION& rNextPosition, CString& rKey, void*& rValue) const;
  1194.  
  1195.     // advanced features for derived classes
  1196.     UINT GetHashTableSize() const;
  1197.     void InitHashTable(UINT hashSize, BOOL bAllocNow = TRUE);
  1198.  
  1199. // Overridables: special non-virtual (see map implementation for details)
  1200.     // Routine used to user-provided hash keys
  1201.     UINT HashKey(LPCTSTR key) const;
  1202.  
  1203. // Implementation
  1204. protected:
  1205.     CAssoc** m_pHashTable;
  1206.     UINT m_nHashTableSize;
  1207.     int m_nCount;
  1208.     CAssoc* m_pFreeList;
  1209.     struct CPlex* m_pBlocks;
  1210.     int m_nBlockSize;
  1211.  
  1212.     CAssoc* NewAssoc();
  1213.     void FreeAssoc(CAssoc*);
  1214.     CAssoc* GetAssocAt(LPCTSTR, UINT&) const;
  1215.  
  1216. public:
  1217.     ~CMapStringToPtr();
  1218. #ifdef _DEBUG
  1219.     void Dump(CDumpContext&) const;
  1220.     void AssertValid() const;
  1221. #endif
  1222.  
  1223. protected:
  1224.     // local typedefs for CTypedPtrMap class template
  1225.     typedef CString BASE_KEY;
  1226.     typedef LPCTSTR BASE_ARG_KEY;
  1227.     typedef void* BASE_VALUE;
  1228.     typedef void* BASE_ARG_VALUE;
  1229. };
  1230.  
  1231.  
  1232. /////////////////////////////////////////////////////////////////////////////
  1233.  
  1234. class CMapStringToOb : public CObject
  1235. {
  1236.  
  1237.     DECLARE_SERIAL(CMapStringToOb)
  1238. protected:
  1239.     // Association
  1240.     struct CAssoc
  1241.     {
  1242.         CAssoc* pNext;
  1243.         UINT nHashValue;  // needed for efficient iteration
  1244.         CString key;
  1245.         CObject* value;
  1246.     };
  1247.  
  1248. public:
  1249.  
  1250. // Construction
  1251.     CMapStringToOb(int nBlockSize = 10);
  1252.  
  1253. // Attributes
  1254.     // number of elements
  1255.     int GetCount() const;
  1256.     BOOL IsEmpty() const;
  1257.  
  1258.     // Lookup
  1259.     BOOL Lookup(LPCTSTR key, CObject*& rValue) const;
  1260.     BOOL LookupKey(LPCTSTR key, LPCTSTR& rKey) const;
  1261.  
  1262. // Operations
  1263.     // Lookup and add if not there
  1264.     CObject*& operator[](LPCTSTR key);
  1265.  
  1266.     // add a new (key, value) pair
  1267.     void SetAt(LPCTSTR key, CObject* newValue);
  1268.  
  1269.     // removing existing (key, ?) pair
  1270.     BOOL RemoveKey(LPCTSTR key);
  1271.     void RemoveAll();
  1272.  
  1273.     // iterating all (key, value) pairs
  1274.     POSITION GetStartPosition() const;
  1275.     void GetNextAssoc(POSITION& rNextPosition, CString& rKey, CObject*& rValue) const;
  1276.  
  1277.     // advanced features for derived classes
  1278.     UINT GetHashTableSize() const;
  1279.     void InitHashTable(UINT hashSize, BOOL bAllocNow = TRUE);
  1280.  
  1281. // Overridables: special non-virtual (see map implementation for details)
  1282.     // Routine used to user-provided hash keys
  1283.     UINT HashKey(LPCTSTR key) const;
  1284.  
  1285. // Implementation
  1286. protected:
  1287.     CAssoc** m_pHashTable;
  1288.     UINT m_nHashTableSize;
  1289.     int m_nCount;
  1290.     CAssoc* m_pFreeList;
  1291.     struct CPlex* m_pBlocks;
  1292.     int m_nBlockSize;
  1293.  
  1294.     CAssoc* NewAssoc();
  1295.     void FreeAssoc(CAssoc*);
  1296.     CAssoc* GetAssocAt(LPCTSTR, UINT&) const;
  1297.  
  1298. public:
  1299.     ~CMapStringToOb();
  1300.  
  1301.     void Serialize(CArchive&);
  1302. #ifdef _DEBUG
  1303.     void Dump(CDumpContext&) const;
  1304.     void AssertValid() const;
  1305. #endif
  1306.  
  1307. protected:
  1308.     // local typedefs for CTypedPtrMap class template
  1309.     typedef CString BASE_KEY;
  1310.     typedef LPCTSTR BASE_ARG_KEY;
  1311.     typedef CObject* BASE_VALUE;
  1312.     typedef CObject* BASE_ARG_VALUE;
  1313. };
  1314.  
  1315.  
  1316. /////////////////////////////////////////////////////////////////////////////
  1317.  
  1318. class CMapStringToString : public CObject
  1319. {
  1320.  
  1321.     DECLARE_SERIAL(CMapStringToString)
  1322. protected:
  1323.     // Association
  1324.     struct CAssoc
  1325.     {
  1326.         CAssoc* pNext;
  1327.         UINT nHashValue;  // needed for efficient iteration
  1328.         CString key;
  1329.         CString value;
  1330.     };
  1331.  
  1332. public:
  1333.  
  1334. // Construction
  1335.     CMapStringToString(int nBlockSize = 10);
  1336.  
  1337. // Attributes
  1338.     // number of elements
  1339.     int GetCount() const;
  1340.     BOOL IsEmpty() const;
  1341.  
  1342.     // Lookup
  1343.     BOOL Lookup(LPCTSTR key, CString& rValue) const;
  1344.     BOOL LookupKey(LPCTSTR key, LPCTSTR& rKey) const;
  1345.  
  1346. // Operations
  1347.     // Lookup and add if not there
  1348.     CString& operator[](LPCTSTR key);
  1349.  
  1350.     // add a new (key, value) pair
  1351.     void SetAt(LPCTSTR key, LPCTSTR newValue);
  1352.  
  1353.     // removing existing (key, ?) pair
  1354.     BOOL RemoveKey(LPCTSTR key);
  1355.     void RemoveAll();
  1356.  
  1357.     // iterating all (key, value) pairs
  1358.     POSITION GetStartPosition() const;
  1359.     void GetNextAssoc(POSITION& rNextPosition, CString& rKey, CString& rValue) const;
  1360.  
  1361.     // advanced features for derived classes
  1362.     UINT GetHashTableSize() const;
  1363.     void InitHashTable(UINT hashSize, BOOL bAllocNow = TRUE);
  1364.  
  1365. // Overridables: special non-virtual (see map implementation for details)
  1366.     // Routine used to user-provided hash keys
  1367.     UINT HashKey(LPCTSTR key) const;
  1368.  
  1369. // Implementation
  1370. protected:
  1371.     CAssoc** m_pHashTable;
  1372.     UINT m_nHashTableSize;
  1373.     int m_nCount;
  1374.     CAssoc* m_pFreeList;
  1375.     struct CPlex* m_pBlocks;
  1376.     int m_nBlockSize;
  1377.  
  1378.     CAssoc* NewAssoc();
  1379.     void FreeAssoc(CAssoc*);
  1380.     CAssoc* GetAssocAt(LPCTSTR, UINT&) const;
  1381.  
  1382. public:
  1383.     ~CMapStringToString();
  1384.  
  1385.     void Serialize(CArchive&);
  1386. #ifdef _DEBUG
  1387.     void Dump(CDumpContext&) const;
  1388.     void AssertValid() const;
  1389. #endif
  1390.  
  1391. protected:
  1392.     // local typedefs for CTypedPtrMap class template
  1393.     typedef CString BASE_KEY;
  1394.     typedef LPCTSTR BASE_ARG_KEY;
  1395.     typedef CString BASE_VALUE;
  1396.     typedef LPCTSTR BASE_ARG_VALUE;
  1397. };
  1398.  
  1399. /////////////////////////////////////////////////////////////////////////////
  1400. // Special include for Win32s compatibility
  1401. //
  1402. // This is a part of the Microsoft Foundation Classes C++ library.
  1403. // Copyright (C) 1992-1995 Microsoft Corporation
  1404. // All rights reserved.
  1405. //
  1406. // This source code is only intended as a supplement to the
  1407. // Microsoft Foundation Classes Reference and related
  1408. // electronic documentation provided with the library.
  1409. // See these sources for detailed information regarding the
  1410. // Microsoft Foundation Classes product.
  1411.  
  1412. #ifdef _AFX_PACKING
  1413. #pragma pack(pop)
  1414. #endif
  1415.  
  1416. #ifndef __AFXSTATE_H__
  1417.     #include <afxstat_.h>   // for MFC private state structures
  1418. #endif
  1419.  
  1420. /////////////////////////////////////////////////////////////////////////////
  1421. // Inline function declarations
  1422.  
  1423. #ifdef _AFX_ENABLE_INLINES
  1424. #define _AFXCOLL_INLINE inline
  1425. #include <afxcoll.inl>
  1426. #endif
  1427.  
  1428. #undef AFX_DATA
  1429. #define AFX_DATA
  1430.  
  1431. #ifdef _AFX_MINREBUILD
  1432. #pragma component(minrebuild, on)
  1433. #endif
  1434. #ifndef _AFX_FULLTYPEINFO
  1435. #pragma component(mintypeinfo, off)
  1436. #endif
  1437.  
  1438. #endif //!__AFXCOLL_H__
  1439.  
  1440. /////////////////////////////////////////////////////////////////////////////
  1441.