hydrobricks
Loading...
Searching...
No Matches
Action Class Reference
Inheritance diagram for Action:
ActionGlacierEvolutionAreaScaling ActionGlacierEvolutionDeltaH ActionLandCoverChange

Public Member Functions

virtual bool Init ()
 
virtual void Reset ()
 
void ResetCursor ()
 
virtual bool Apply (double date=0)
 
virtual bool ApplyIfRecursive (const Time date)
 
int GetIndexForInsertion (double date)
 
double CheckLandCoverAreaFraction (const string &name, int id, double fraction, double unitArea, double lcArea)
 
void SetManager (ActionsManager *manager)
 
vecDouble GetSporadicDates ()
 
int GetSporadicItemsNb ()
 
void IncrementCursor ()
 
bool IsRecursive ()
 

Protected Attributes

ActionsManager_manager
 
int _cursor
 
vecDouble _sporadicDates
 
bool _recursive
 
vecInt _recursiveMonths
 
vecInt _recursiveDays
 

Member Function Documentation

◆ Apply()

bool Action::Apply ( double date = 0)
virtual

Apply the action for a specific date.

Parameters
datethe date of the action.
Returns
true if the action was applied successfully.

Reimplemented in ActionGlacierEvolutionAreaScaling, ActionGlacierEvolutionDeltaH, and ActionLandCoverChange.

◆ ApplyIfRecursive()

bool Action::ApplyIfRecursive ( const Time date)
virtual

Apply the recursive action, for a specific date.

Parameters
datethe date of the action.
Returns
true if the action was applied successfully.

◆ CheckLandCoverAreaFraction()

double Action::CheckLandCoverAreaFraction ( const string & name,
int id,
double fraction,
double unitArea,
double lcArea )

Check if the land cover area fraction is valid.

Parameters
namethe name of the land cover.
idthe ID of the hydro unit.
fractionthe area fraction to check.
unitAreathe area of the hydro unit.
lcAreathe area of the land cover.
Returns
the corrected area fraction if it was invalid, or the original fraction if it was valid.

◆ GetIndexForInsertion()

int Action::GetIndexForInsertion ( double date)

Get the index for insertion in the sporadic dates vector.

Parameters
datethe date to insert.
Returns
the index for insertion.

◆ GetSporadicDates()

vecDouble Action::GetSporadicDates ( )
inline

Get the sporadic dates vector.

Returns
the sporadic dates vector.

◆ GetSporadicItemsNb()

int Action::GetSporadicItemsNb ( )
inline

Get the number of sporadic items.

Returns
the number of sporadic items.

◆ IncrementCursor()

void Action::IncrementCursor ( )
inline

Increment the cursor.

◆ Init()

bool Action::Init ( )
virtual

Initialize the action.

Returns
true if the initialization was successful.

Reimplemented in ActionGlacierEvolutionAreaScaling, and ActionGlacierEvolutionDeltaH.

◆ IsRecursive()

bool Action::IsRecursive ( )
inline

Check if the action is recursive.

Returns
true if the action is recursive.

◆ Reset()

void Action::Reset ( )
virtual

Reset the action to its initial state.

Reimplemented in ActionGlacierEvolutionAreaScaling, ActionGlacierEvolutionDeltaH, and ActionLandCoverChange.

◆ ResetCursor()

void Action::ResetCursor ( )

Reset the action cursor.

◆ SetManager()

void Action::SetManager ( ActionsManager * manager)
inline

Set the manager of the action.

Parameters
managerthe manager to set.

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