-
Notifications
You must be signed in to change notification settings - Fork 1
/
Grids.h
81 lines (66 loc) · 2.85 KB
/
Grids.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
71
72
73
74
75
76
77
78
79
80
81
//---------------------------------------------------------------------------
#ifndef GridsH
#define GridsH
#include "ObjectManagerBase.h"
class clGrid;
/**
Grid Manager - Version 1.0
The file names for this unit are TheGrids.x because for some reason "Grids"
were unacceptable to Builder.
The Grid Manager has a job unique among object managers in that the grid
objects are relatively dumb. They are not all unique classes, they are
separate instantiations of the same class. So the Grid Manager takes care
of their construction.
Definitions of grid objects in the parameter or other file are assumed to be
part of the definitions for the behaviors that will work on them, so the grid
manager does not have a data reading routine. If another object wishes to
initialize a grid object with data, it must assign the values itself after
requesting that the grid manager create the grid.
Copyright 2003 Charles D. Canham.
@author Lora E. Murphy
<br>Edit history:
<br>-----------------
<br>April 28, 2004 - Submitted as beta (LEM)
*/
class clGridManager : public clObjectManagerBase {
public:
/**
* Constructor. This constructor structure makes sure that there's no default
* constructor while also saying that this child class doesn't need its own
* constructor to do anything.
* @param p_oSimManager Sim Manager object.
*/
clGridManager(clSimManager *p_oSimManager) :
clObjectManagerBase(p_oSimManager){;};
//~clGridManager(); No destructor needed
/**
* Creates grid objects from input file if there are maps.
* @param p_oDoc DOM tree of parsed input file.
*/
void CreateObjects(xercesc::DOMDocument *p_oDoc);
/**
* This creates a grid object. If there is already a grid object with the passed
* name, it overwrites it.
* @param sGridName The new grid's namestring.
* @param iNumIntVals Number of integer data members in a grid cell record. Can
* be 0.
* @param iNumFloatVals Number of float data members in a grid cell record. Can
* be 0.
* @param iNumStringVals Number of string data members in a grid cell record.
* Can be 0.
* @param iNumBoolVals Number of bool data members in a grid cell record. Can
* be 0.
* @param fXCellLength The length of a grid cell in the X direction, in meters.
* Not required. If ommitted this will default to the plot's cell length.
* @param fYCellLength The length of a grid cell in the Y direction, in meters.
* Not required. If this is ommitted (i.e. = 0), it is assumed the grid cells
* are square and the value for the X length is used.
* @return A pointer to the new grid object.
*/
clGrid* CreateGrid(std::string sGridName, short int iNumIntVals,
short int iNumFloatVals, short int iNumStringVals, short int iNumBoolVals,
float fXCellLength = 0, float fYCellLength = 0);
protected:
};
//---------------------------------------------------------------------------
#endif