[mareframe] Annotation of /trunk/gadget/livesonareas.h
Annotation of /trunk/gadget/livesonareas.h
Parent Directory
| Revision Log
Revision 1 -
(view)
(download)
1 : |
agomez |
1 |
#ifndef livesonareas_h
|
2 : |
|
|
#define livesonareas_h
|
3 : |
|
|
|
4 : |
|
|
#include "intvector.h" |
5 : |
|
|
|
6 : |
|
|
/**
|
7 : |
|
|
* \class LivesOnAreas
|
8 : |
|
|
* \brief This is the class used to store information about the areas an object is defined on for the current model
|
9 : |
|
|
*/
|
10 : |
|
|
class LivesOnAreas {
|
11 : |
|
|
public:
|
12 : |
|
|
/**
|
13 : |
|
|
* \brief This is the default LivesOnAreas constructor
|
14 : |
|
|
*/
|
15 : |
|
|
LivesOnAreas() {};
|
16 : |
|
|
/**
|
17 : |
|
|
* \brief This is the default LivesOnAreas destructor
|
18 : |
|
|
*/
|
19 : |
|
|
virtual ~LivesOnAreas() {};
|
20 : |
|
|
/**
|
21 : |
|
|
* \brief This is the LivesOnAreas constructor for a specified vector of areas
|
22 : |
|
|
* \param Areas is the IntVector of internal areas to be used
|
23 : |
|
|
*/
|
24 : |
|
|
LivesOnAreas(const IntVector& Areas);
|
25 : |
|
|
/**
|
26 : |
|
|
* \brief This function will check whether the object is defined on a specified area
|
27 : |
|
|
* \param area is an integer to denote the internal area of interest
|
28 : |
|
|
* \return 1 if the object is defined on the area, 0 otherwise
|
29 : |
|
|
*/
|
30 : |
|
|
int isInArea(int area) const;
|
31 : |
|
|
/**
|
32 : |
|
|
* \brief This function will return the internal areas that the object is defined on
|
33 : |
|
|
* \return areas
|
34 : |
|
|
*/
|
35 : |
|
|
IntVector& getAreas() { return areas; };
|
36 : |
|
|
/**
|
37 : |
|
|
* \brief This function will return the area associated with an internal area
|
38 : |
|
|
* \param area is an integer to denote the internal area of interest
|
39 : |
|
|
* \return the associated area number
|
40 : |
|
|
*/
|
41 : |
|
|
int areaNum(int area) const;
|
42 : |
|
|
protected:
|
43 : |
|
|
/**
|
44 : |
|
|
* \brief This function will store the internal areas to be used
|
45 : |
|
|
* \param Areas is the IntVector of internal areas to be used
|
46 : |
|
|
*/
|
47 : |
|
|
void storeAreas(const IntVector& Areas);
|
48 : |
|
|
/**
|
49 : |
|
|
* \brief This is the IntVector of internal areas that the object is defined on
|
50 : |
|
|
*/
|
51 : |
|
|
IntVector areas;
|
52 : |
|
|
private:
|
53 : |
|
|
/**
|
54 : |
|
|
* \brief This is the IntVector used to convert to the internal areas
|
55 : |
|
|
*/
|
56 : |
|
|
IntVector areaConvert;
|
57 : |
|
|
};
|
58 : |
|
|
|
59 : |
|
|
#endif
|
|