frepple::CommandCreateOperationPlan Class Reference

This command is used to create an operationplan. More...

#include <model.h>

Inheritance diagram for frepple::CommandCreateOperationPlan:

frepple::utils::Command frepple::utils::Object

List of all members.


Public Member Functions

 CommandCreateOperationPlan (const Operation *o, double q, Date d1, Date d2, Demand *l, OperationPlan *ow=NULL, bool makeflowsloads=true)
void execute ()
string getDescription () const
OperationPlangetOperationPlan () const
virtual size_t getSize () const
virtual const MetaClassgetType () const
void undo ()
bool undoable () const
 ~CommandCreateOperationPlan ()

Static Public Attributes

static const MetaClass metadata

Detailed Description

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 4679 of file model.h.


Constructor & Destructor Documentation

frepple::CommandCreateOperationPlan::CommandCreateOperationPlan ( const Operation o,
double  q,
Date  d1,
Date  d2,
Demand l,
OperationPlan ow = NULL,
bool  makeflowsloads = true 
) [inline]

Constructor.

Definition at line 4684 of file model.h.

frepple::CommandCreateOperationPlan::~CommandCreateOperationPlan (  )  [inline]

Definition at line 4701 of file model.h.


Member Function Documentation

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:

  • Calling the method multiple times is harmless and results in the same state change as calling it only once.

Implements frepple::utils::Command.

Definition at line 4691 of file model.h.

string frepple::CommandCreateOperationPlan::getDescription (  )  const [inline, virtual]

Reimplemented from frepple::utils::Command.

Definition at line 4706 of file model.h.

OperationPlan* frepple::CommandCreateOperationPlan::getOperationPlan (  )  const [inline]

Definition at line 4702 of file model.h.

virtual size_t frepple::CommandCreateOperationPlan::getSize (  )  const [inline, virtual]

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Definition at line 4705 of file model.h.

virtual const MetaClass& frepple::CommandCreateOperationPlan::getType (  )  const [inline, virtual]

This returns the type information on the object, a bit similar to the standard type_info information.

Implements frepple::utils::Object.

Definition at line 4703 of file model.h.

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:

  • Calling the undo() method is harmless if the execute() hasn't been called yet.
  • Calling the undo() method multiple times is harmless and results in the same state change as calling it only once.

Reimplemented from frepple::utils::Command.

Definition at line 4699 of file model.h.

bool frepple::CommandCreateOperationPlan::undoable (  )  const [inline, virtual]

Returns true if the execution of this command can be undone.

Reimplemented from frepple::utils::Command.

Definition at line 4700 of file model.h.


Member Data Documentation

Reimplemented from frepple::utils::Command.

Definition at line 4704 of file model.h.


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

Documentation generated by  doxygen