SORTIE Core C++ Documentation
Public Member Functions | List of all members
clGridManager Class Reference

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>

Inheritance diagram for clGridManager:
clObjectManagerBase

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...
 
clGridCreateGrid (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...
 
clWorkerBasePassObjectPointer (int iObjectNumber)
 Gets a specified object under management. More...
 
clWorkerBasePassObjectPointer (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...
 
clSimManagermp_oSimManager
 Pointer to the Simulation Manager. More...
 

Detailed Description

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


Edit history:
--------------—
April 28, 2004 - Submitted as beta (LEM)

Constructor & Destructor Documentation

◆ clGridManager()

clGridManager::clGridManager ( clSimManager p_oSimManager)
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.

Parameters
p_oSimManagerSim Manager object.

Member Function Documentation

◆ CreateGrid()

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.

Parameters
sGridNameThe new grid's namestring.
iNumIntValsNumber of integer data members in a grid cell record. Can be 0.
iNumFloatValsNumber of float data members in a grid cell record. Can be 0.
iNumStringValsNumber of string data members in a grid cell record. Can be 0.
iNumBoolValsNumber of bool data members in a grid cell record. Can be 0.
fXCellLengthThe length of a grid cell in the X direction, in meters. Not required. If ommitted this will default to the plot's cell length.
fYCellLengthThe 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.
Returns
A pointer to the new grid object.

◆ CreateObjects()

void clGridManager::CreateObjects ( xercesc::DOMDocument *  p_oDoc)
virtual

Creates grid objects from input file if there are maps.

Parameters
p_oDocDOM tree of parsed input file.

Reimplemented from clObjectManagerBase.


The documentation for this class was generated from the following file: