hydrobricks
Loading...
Searching...
No Matches
ActionsManager Class Reference
Inheritance diagram for ActionsManager:

Public Member Functions

void Reset ()
 
ModelHydroGetModel ()
 
void SetModel (ModelHydro *model)
 
bool AddAction (Action *action)
 
int GetActionsNb ()
 
int GetSporadicActionItemsNb ()
 
void DateUpdate (double date)
 
HydroUnitGetHydroUnitById (int id)
 
vecDouble GetSporadicActionDates ()
 

Protected Attributes

ModelHydrom_model
 
int m_cursorManager
 
vector< Action * > m_actions
 
vecDouble m_sporadicActionDates
 
vecInt m_sporadicActionIndices
 
vecInt m_recursiveActionIndices
 

Member Function Documentation

◆ AddAction()

bool ActionsManager::AddAction ( Action * action)

Add an action to the manager.

Parameters
actionpointer to the action.
Returns
true if the action was added successfully.

◆ DateUpdate()

void ActionsManager::DateUpdate ( double date)

Update the date during the simulation. Triggers the actions that are scheduled for the current date.

Parameters
datecorresponding date of the simulation.

◆ GetActionsNb()

int ActionsManager::GetActionsNb ( )

Get the number of actions.

Returns
number of actions.

◆ GetHydroUnitById()

HydroUnit * ActionsManager::GetHydroUnitById ( int id)

Get hydro unit by ID.

Parameters
idID of the hydro unit.
Returns
pointer to the hydro unit.

◆ GetModel()

ModelHydro * ActionsManager::GetModel ( )
inline

Get the associated model.

Returns
pointer to the model.

◆ GetSporadicActionDates()

vecDouble ActionsManager::GetSporadicActionDates ( )
inline

Get the list of sporadic action dates (i.e., actions that are not recursive).

Returns
vector of sporadic action dates.

◆ GetSporadicActionItemsNb()

int ActionsManager::GetSporadicActionItemsNb ( )

Get the number of sporadic action items (i.e., actions that are not recursive).

Returns
number of sporadic action items.

◆ Reset()

void ActionsManager::Reset ( )

Reset the actions manager.

◆ SetModel()

void ActionsManager::SetModel ( ModelHydro * model)

Set the associated model.

Parameters
modelpointer to the model.

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