#include <Behaviors.h>
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. | |
int | GetObjectVersion () |
Returns the version number of the clBehaviorManager class. | |
void | CreateObjects (DOMDocument *p_oDoc) |
Creates the behavior objects for a run. | |
Protected Member Functions | |
void | CreateBehavior (behaviorData *p_data) |
Creates an individual behavior object. | |
Classes | |
struct | behaviorData |
Holds setup information for a single behavior object. More... |
Copyright 2003 Charles D. Canham.
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.
int clBehaviorManager::GetObjectVersion | ( | ) | [inline] |
Returns the version number of the clBehaviorManager class.
Reimplemented from clObjectManagerBase.
void clBehaviorManager::CreateObjects | ( | DOMDocument * | p_oDoc | ) |
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.
p_oDoc | DOM tree parsed from the XML file. |
ModelErr | if a species or tree type is invalid. |
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.
p_data | A pointer to a behaviorData structure containing the behavior's setup information. |
ModelErr | if the behavior isn't recognized. |