+++ /dev/null
-#ifndef DPRegionList_h\r
-#define DPRegionList_h\r
-\r
-#include "diaglist.h"\r
-\r
-enum DPREGIONTYPE\r
- {\r
- DPREGIONTYPE_Unknown,\r
- DPREGIONTYPE_Diag,\r
- DPREGIONTYPE_Rect\r
- };\r
-\r
-struct DPRegion\r
- {\r
- DPREGIONTYPE m_Type;\r
- union\r
- {\r
- Diag m_Diag;\r
- Rect m_Rect;\r
- };\r
- };\r
-\r
-const unsigned MAX_DPREGIONS = 1024;\r
-\r
-class DPRegionList\r
- {\r
-public:\r
- DPRegionList()\r
- {\r
- m_uCount = 0;\r
- }\r
- ~DPRegionList()\r
- {\r
- Free();\r
- }\r
-\r
-public:\r
-// Creation\r
- void Clear()\r
- {\r
- Free();\r
- }\r
- void Add(const DPRegion &r);\r
-\r
-// Accessors\r
- unsigned GetCount() const\r
- {\r
- return m_uCount;\r
- }\r
- const DPRegion &Get(unsigned uIndex) const\r
- {\r
- assert(uIndex < m_uCount);\r
- return m_DPRegions[uIndex];\r
- }\r
-\r
-// Diagnostics\r
- void LogMe() const;\r
-\r
-private:\r
- void Free()\r
- {\r
- m_uCount = 0;\r
- }\r
-\r
-private:\r
- unsigned m_uCount;\r
- DPRegion m_DPRegions[MAX_DPREGIONS];\r
- };\r
-\r
-void DiagListToDPRegionList(const DiagList &DL, DPRegionList &RL,\r
- unsigned uLengthA, unsigned uLengthB);\r
-\r
-#endif // DPRegionList_h\r