-
Notifications
You must be signed in to change notification settings - Fork 0
/
DataProperties.h
70 lines (60 loc) · 1.26 KB
/
DataProperties.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
* @file DataProperties.h
* @author Dan R. Lipsa
* @ingroup data model
* @brief Basic properties of the simulation data such as dimensions
* and if edges are quadratic or not.
*/
#ifndef __DATA_PROPERTIES_H__
#define __DATA_PROPERTIES_H__
#include "Enums.h"
/**
* @brief Basic properties of the simulation data such as dimensions
* and if it is quadratic or not.
*/
class DataProperties
{
public:
DataProperties () :
m_dimension (Dimension::D3D),
m_quadratic (false)
{
}
Dimension::Enum GetDimension () const
{
return m_dimension;
}
bool Is2D () const
{
return m_dimension == Dimension::D2D;
}
bool Is3D () const
{
return ! Is2D ();
}
bool IsQuadratic () const
{
return m_quadratic;
}
void SetQuadratic (bool quadratic)
{
m_quadratic = quadratic;
}
void SetDimension (size_t dimension);
bool operator== (const DataProperties& other)
{
return m_dimension == other.m_dimension &&
m_quadratic == other.m_quadratic;
}
bool operator!= (const DataProperties& other)
{
return ! operator== (other);
}
private:
Dimension::Enum m_dimension;
bool m_quadratic;
};
#endif //__DATA_PROPERTIES_H__
// Local Variables:
// mode: c++
// End: