clObjectManagerBase Class Reference

OBJECT MANAGER - Version 1.0. More...

#include <ObjectManagerBase.h>

Inheritance diagram for clObjectManagerBase:

clBehaviorManager clGridManager clPopulationManager List of all members.

Public Member Functions

int GetObjectVersion ()
 Returns the version number of the clObjectManagerBase class.
 clObjectManagerBase (clSimManager *p_oSimManager)
 Constructor.
virtual ~clObjectManagerBase ()
 Destructor.
void FreeMemory ()
 Deletes the managed objects array.
int GetNumberOfObjects ()
 Returns the number of objects under management for an object manager.
clWorkerBasePassObjectPointer (int iObjectNumber)
 Gets a specified object under management.
clWorkerBasePassObjectPointer (char *cName)
 Gets a specified object under management.
void DoObjectSetup (xercesc::DOMDocument *p_oDoc, fileType iFileType)
 Triggers the setup process for all objects managed by this manager.
void TimestepCleanup ()
 Completes timestep cleanup tasks both for this object manager and all its managed objects.
void EndOfRunCleanup ()
 Completes any end-of-run cleanup tasks both for this object manager and all its managed objects.

Protected Member Functions

virtual void CreateObjects (xercesc::DOMDocument *p_oDoc)
 Creates the managed objects for a run.

Protected Attributes

clWorkerBase ** mp_oObjectArray
 The array of objects under the control of the object manager.
int m_iNumObjects
 The number of objects currently under management.

Static Protected Attributes

static clSimManagermp_oSimManager
 Pointer to the Simulation Manager.

Detailed Description

OBJECT MANAGER - Version 1.0.

This class is a virtual base class for the various types of object managers - those which handle behaviors, populations, and grids. An object manager controls all of the objects of a given type. It creates and destroys them, triggers their management functions, and controls access to them. The Simulation Manager directs the object managers so that they trigger the correct functioning at the proper time within a run.

This class should not be instantiated as an object but used only as a base class for the other manager classes. It serves as a common interface for the Simulation Manager to work with the various object managers.

Copyright 2003 Charles D. Canham.

Author:
Lora E. Murphy

Changes:
-----------------
April 28, 2004 - Submitted as beta (LEM)


Constructor & Destructor Documentation

clObjectManagerBase::clObjectManagerBase ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Pointer to the Simulation Manager object


Member Function Documentation

virtual void clObjectManagerBase::CreateObjects ( xercesc::DOMDocument *  p_oDoc  )  [inline, protected, virtual]

Creates the managed objects for a run.

Which objects are created is controlled by the file that is passed; each object manager must know what to do with the file. The objects are created only - they are not given the opportunity to do any setup at this point other than what is in their constructors.

Parameters:
p_oDoc Pointer to the DOM tree created from the parsed XML file.

Reimplemented in clPopulationManager, and clGridManager.

void clObjectManagerBase::DoObjectSetup ( xercesc::DOMDocument *  p_oDoc,
fileType  iFileType 
)

Triggers the setup process for all objects managed by this manager.

To trigger setup, each managed object's DoSetup function is called.

Parameters:
p_oDoc Pointer to parsed and validated DOM tree. This function assumes that the file is of a type that it knows how to read.
iFileType What type of file is being passed.

void clObjectManagerBase::EndOfRunCleanup (  ) 

Completes any end-of-run cleanup tasks both for this object manager and all its managed objects.

Each managed object's EndOfRunCleanup function is called.

int clObjectManagerBase::GetObjectVersion (  )  [inline]

Returns the version number of the clObjectManagerBase class.

Returns:
clObjectManagerBase class version number.

Reimplemented in clBehaviorManager, clPopulationManager, and clGridManager.

clWorkerBase* clObjectManagerBase::PassObjectPointer ( char *  cName  ) 

Gets a specified object under management.

Parameters:
cName Object's namestring.
Returns:
The requested object, or NULL if there is no such object.

clWorkerBase* clObjectManagerBase::PassObjectPointer ( int  iObjectNumber  ) 

Gets a specified object under management.

Parameters:
iObjectNumber Object's zero-based index number in the object manager's object array.
Returns:
The requested object, or NULL if there is no such object index.

void clObjectManagerBase::TimestepCleanup (  ) 

Completes timestep cleanup tasks both for this object manager and all its managed objects.

Each managed object's TimestepCleanup function is called.


The documentation for this class was generated from the following file:
Generated on Wed Nov 29 08:42:23 2006 for SORTIE Core C++ Documentation by  doxygen 1.4.7