source: branches/stable/GDE/MUSCLE/src/dpregionlist.h

Last change on this file was 10390, checked in by aboeckma, 11 years ago

added muscle sourcles amd makefile

File size: 1018 bytes
Line 
1#ifndef DPRegionList_h
2#define DPRegionList_h
3
4#include "diaglist.h"
5
6enum DPREGIONTYPE
7        {
8        DPREGIONTYPE_Unknown,
9        DPREGIONTYPE_Diag,
10        DPREGIONTYPE_Rect
11        };
12
13struct DPRegion
14        {
15        DPREGIONTYPE m_Type;
16        union
17                {
18                Diag m_Diag;
19                Rect m_Rect;
20                };
21        };
22
23const unsigned MAX_DPREGIONS = 1024;
24
25class DPRegionList
26        {
27public:
28        DPRegionList()
29                {
30                m_uCount = 0;
31                }
32        ~DPRegionList()
33                {
34                Free();
35                }
36
37public:
38// Creation
39        void Clear()
40                {
41                Free();
42                }
43        void Add(const DPRegion &r);
44
45// Accessors
46        unsigned GetCount() const
47                {
48                return m_uCount;
49                }
50        const DPRegion &Get(unsigned uIndex) const
51                {
52                assert(uIndex < m_uCount);
53                return m_DPRegions[uIndex];
54                }
55
56// Diagnostics
57        void LogMe() const;
58
59private:
60        void Free()
61                {
62                m_uCount = 0;
63                }
64
65private:
66        unsigned m_uCount;
67        DPRegion m_DPRegions[MAX_DPREGIONS];
68        };
69
70void DiagListToDPRegionList(const DiagList &DL, DPRegionList &RL,
71  unsigned uLengthA, unsigned uLengthB);
72
73#endif  // DPRegionList_h
Note: See TracBrowser for help on using the repository browser.