Mac binaries
[jabaws.git] / website / archive / binaries / mac / src / muscle / dpregionlist.h
diff --git a/website/archive/binaries/mac/src/muscle/dpregionlist.h b/website/archive/binaries/mac/src/muscle/dpregionlist.h
new file mode 100644 (file)
index 0000000..a83e110
--- /dev/null
@@ -0,0 +1,73 @@
+#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