This command is used to create an operationplan. More...
#include <model.h>
Public Member Functions | |
CommandCreateOperationPlan (const Operation *o, double q, Date d1, Date d2, Demand *l, OperationPlan *ow=NULL, bool makeflowsloads=true) | |
void | execute () |
OperationPlan * | getOperationPlan () const |
void | undo () |
bool | undoable () const |
~CommandCreateOperationPlan () |
This command is used to create an operationplan.
The operationplan will have its load and loadplans created when the command is created. It is assigned an id and added to the list of all operationplans when the command is committed.
Definition at line 5273 of file model.h.
frepple::CommandCreateOperationPlan::CommandCreateOperationPlan | ( | const Operation * | o, | |
double | q, | |||
Date | d1, | |||
Date | d2, | |||
Demand * | l, | |||
OperationPlan * | ow = NULL , |
|||
bool | makeflowsloads = true | |||
) | [inline] |
frepple::CommandCreateOperationPlan::~CommandCreateOperationPlan | ( | ) | [inline] |
void frepple::CommandCreateOperationPlan::execute | ( | ) | [inline, virtual] |
This method is used to actually execute the action.
A couple of notes on how this method should be implemented by the subclasses:
Implements frepple::utils::Command.
OperationPlan* frepple::CommandCreateOperationPlan::getOperationPlan | ( | ) | const [inline] |
void frepple::CommandCreateOperationPlan::undo | ( | ) | [inline, virtual] |
This method is undoing the state change of the execute() method.
Reversing the action is not possible for all commands. Command subclasses should override the undo() and undoable() method in case they are reversible.
A couple of notes on how this method should be implemented by the subclasses:
Reimplemented from frepple::utils::Command.
bool frepple::CommandCreateOperationPlan::undoable | ( | ) | const [inline, virtual] |
Returns true if the execution of this command can be undone.
Reimplemented from frepple::utils::Command.