SORTIE Core C++ Documentation
|
Grid Manager - Version 1.0 The file names for this unit are TheGrids.x because for some reason "Grids" were unacceptable to Builder. More...
#include <Grids.h>
Public Member Functions | |
clGridManager (clSimManager *p_oSimManager) | |
Constructor. More... | |
void | CreateObjects (xercesc::DOMDocument *p_oDoc) |
Creates grid objects from input file if there are maps. More... | |
clGrid * | CreateGrid (std::string sGridName, short int iNumIntVals, short int iNumFloatVals, short int iNumStringVals, short int iNumBoolVals, float fXCellLength=0, float fYCellLength=0) |
This creates a grid object. More... | |
Public Member Functions inherited from clObjectManagerBase | |
int | GetObjectVersion () |
Returns the version number of the clObjectManagerBase class. More... | |
clObjectManagerBase (clSimManager *p_oSimManager) | |
Constructor. More... | |
virtual | ~clObjectManagerBase () |
Destructor. More... | |
void | FreeMemory () |
Deletes the managed objects array. More... | |
int | GetNumberOfObjects () |
Returns the number of objects under management for an object manager. More... | |
clWorkerBase * | PassObjectPointer (int iObjectNumber) |
Gets a specified object under management. More... | |
clWorkerBase * | PassObjectPointer (std::string sName) |
Gets a specified object under management. More... | |
void | DoObjectSetup (xercesc::DOMDocument *p_oDoc, fileType iFileType) |
Triggers the setup process for all objects managed by this manager. More... | |
void | TimestepCleanup () |
Completes timestep cleanup tasks both for this object manager and all its managed objects. More... | |
void | EndOfRunCleanup () |
Completes any end-of-run cleanup tasks both for this object manager and all its managed objects. More... | |
Additional Inherited Members | |
Protected Attributes inherited from clObjectManagerBase | |
clWorkerBase ** | mp_oObjectArray |
The array of objects under the control of the object manager. More... | |
int | m_iNumObjects |
The number of objects currently under management. More... | |
clSimManager * | mp_oSimManager |
Pointer to the Simulation Manager. More... | |
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.
Edit history:
--------------—
April 28, 2004 - Submitted as beta (LEM)
|
inline |
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.
p_oSimManager | Sim Manager object. |
clGrid* clGridManager::CreateGrid | ( | std::string | sGridName, |
short int | iNumIntVals, | ||
short int | iNumFloatVals, | ||
short int | iNumStringVals, | ||
short int | iNumBoolVals, | ||
float | fXCellLength = 0 , |
||
float | fYCellLength = 0 |
||
) |
This creates a grid object.
If there is already a grid object with the passed name, it overwrites it.
sGridName | The new grid's namestring. |
iNumIntVals | Number of integer data members in a grid cell record. Can be 0. |
iNumFloatVals | Number of float data members in a grid cell record. Can be 0. |
iNumStringVals | Number of string data members in a grid cell record. Can be 0. |
iNumBoolVals | Number of bool data members in a grid cell record. Can be 0. |
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. |
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. |
|
virtual |
Creates grid objects from input file if there are maps.
p_oDoc | DOM tree of parsed input file. |
Reimplemented from clObjectManagerBase.