SORTIE Core C++ Documentation
Classes | Public Member Functions | Protected Member Functions | List of all members
clBehaviorManager Class Reference

Behaviors - Version 1.0 Behavior Manager. More...

#include <Behaviors.h>

Inheritance diagram for clBehaviorManager:
clObjectManagerBase

Classes

struct  behaviorData
 Holds setup information for a single behavior object. More...
 

Public Member Functions

 clBehaviorManager (clSimManager *p_oSimManager)
 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. More...
 
void CreateObjects (xercesc::DOMDocument *p_oDoc)
 Creates the behavior objects for a run. 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...
 

Protected Member Functions

void CreateBehavior (behaviorData *p_data)
 Creates an individual behavior object. 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

Behaviors - Version 1.0 Behavior Manager.

Copyright 2003 Charles D. Canham.

Author
Lora E. Murphy


Edit history:
--------------—
October 20, 2011 - Wiped the slate clean for SORTIE 7.0 (LEM)

Constructor & Destructor Documentation

◆ clBehaviorManager()

clBehaviorManager::clBehaviorManager ( clSimManager p_oSimManager)
inline

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.

Member Function Documentation

◆ CreateBehavior()

void clBehaviorManager::CreateBehavior ( behaviorData p_data)
protected

Creates an individual behavior object.

The manager will create the object and add it to the end of the behavior list array. If there is already a behavior present with this name, this will overwrite that behavior. It will also validate the version number from the parameter file.

Parameters
p_dataA pointer to a behaviorData structure containing the behavior's setup information.
Exceptions
ModelErrif the behavior isn't recognized.

◆ CreateObjects()

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

Creates the behavior objects for a run.

The objects are created from the behaviorList tags in the document. If there are currently objects created, they are deleted and the new objects created. This function will validate the species and tree types (if any) to apply to each behavior.

Parameters
p_oDocDOM tree parsed from the XML file.
Exceptions
ModelErrif a species or tree type is invalid.

Reimplemented from clObjectManagerBase.


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