-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdataObject.hpp
67 lines (56 loc) · 1.54 KB
/
dataObject.hpp
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
/******************************************************************************
* GRIDGEN: Grid Generating Compiler
* By: Andy Stone (aistone@gmail.com)
* (C) Copyright 2011 Colorado State University
*****************************************************************************/
#ifndef DATA_OBJECT_HPP__
#define DATA_OBJECT_HPP__
#include <string>
#include <vector>
#include "iprintable.hpp"
#include "iserializable.hpp"
#include "ienvironmental.hpp"
#include "schedule.hpp"
#include "grid.hpp"
#include "distribution.hpp"
using namespace std;
class DataObject : public virtual IPrintable,
public virtual IEnvironmental
{
public:
DataObject(string name)
:
mName(name),
mGrid(NULL),
mSchedule(NULL),
mDistribution(NULL)
{}
DataObject(string name,
Grid *grid,
Schedule *schedule,
Distribution *distribution)
:
mName(name),
mGrid(grid),
mSchedule(schedule),
mDistribution(distribution)
{}
void setGrid(Grid *grid) {
mGrid = grid;
}
void setSchedule(Schedule *schedule) {
mSchedule = schedule;
}
void setDistribution(Distribution *distribution) {
mDistribution = distribution;
}
virtual void print(ostream &out) const;
virtual void printSimp(ostream &out) const;
virtual string getID() const { return mName; }
private:
string mName;
Grid *mGrid;
Schedule *mSchedule;
Distribution *mDistribution;
};
#endif