frepple::CommandMoveOperationPlan Class Reference

This class represents the command of moving an operationplan to a new date and/or resizing it. More...

#include <model.h>

Inheritance diagram for frepple::CommandMoveOperationPlan:

List of all members.

Public Member Functions

 CommandMoveOperationPlan (OperationPlan *opplanptr, Date newStart, Date newEnd, double newQty=-1.0)
 CommandMoveOperationPlan (OperationPlan *)
virtual void commit ()
DateRange getDates () const
OperationPlangetOperationPlan () const
double getQuantity () const
virtual void redo ()
void restore (bool=false)
virtual void rollback ()
void setEnd (Date d)
void setParameters (Date s, Date e, double q, bool b)
void setQuantity (double q)
void setStart (Date d)
virtual void undo ()
virtual ~CommandMoveOperationPlan ()
- Public Member Functions inherited from frepple::utils::Command
 Command ()
virtual ~Command ()

Detailed Description

This class represents the command of moving an operationplan to a new date and/or resizing it.

Definition at line 5309 of file model.h.


Constructor & Destructor Documentation

frepple::CommandMoveOperationPlan::CommandMoveOperationPlan ( OperationPlan opplanptr,
Date  newStart,
Date  newEnd,
double  newQty = -1.0 
)

Constructor.
Unlike most other commands the constructor already executes the change.

Parameters:
opplanptrPointer to the operationplan being moved.
newStartNew start date of the operationplan.
newEndNew end date of the operationplan.
newQtyNew quantity of the operationplan.The default is -1, which indicates to leave the quantity unchanged.

Definition at line 320 of file model/actions.cpp.

frepple::CommandMoveOperationPlan::CommandMoveOperationPlan ( OperationPlan o)

Default constructor.

Definition at line 293 of file model/actions.cpp.

virtual frepple::CommandMoveOperationPlan::~CommandMoveOperationPlan ( )
inlinevirtual

Destructor.

Definition at line 5340 of file model.h.


Member Function Documentation

virtual void frepple::CommandMoveOperationPlan::commit ( )
inlinevirtual

Commit the changes.

Reimplemented from frepple::utils::Command.

Definition at line 5327 of file model.h.

DateRange frepple::CommandMoveOperationPlan::getDates ( ) const
inline

Return the dates of the original operationplan.

Definition at line 5366 of file model.h.

OperationPlan* frepple::CommandMoveOperationPlan::getOperationPlan ( ) const
inline

Returns the operationplan being manipulated.

Definition at line 5343 of file model.h.

double frepple::CommandMoveOperationPlan::getQuantity ( ) const
inline

Return the quantity of the original operationplan.

Definition at line 5363 of file model.h.

void frepple::CommandMoveOperationPlan::redo ( )
virtual

This method reproduces a previously undone change.
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.

Reimplemented from frepple::utils::Command.

Definition at line 352 of file model/actions.cpp.

void frepple::CommandMoveOperationPlan::restore ( bool  del = false)

Undo the changes.
When the argument is true, subcommands for suboperationplans are deleted.

Definition at line 357 of file model/actions.cpp.

virtual void frepple::CommandMoveOperationPlan::rollback ( )
inlinevirtual

Undo the changes.

Reimplemented from frepple::utils::Command.

Definition at line 5330 of file model.h.

void frepple::CommandMoveOperationPlan::setEnd ( Date  d)
inline

Set another start date for the operationplan.

Definition at line 5357 of file model.h.

void frepple::CommandMoveOperationPlan::setParameters ( Date  s,
Date  e,
double  q,
bool  b 
)
inline

Set another start date, end date and quantity for the operationplan.

Definition at line 5349 of file model.h.

void frepple::CommandMoveOperationPlan::setQuantity ( double  q)
inline

Set another quantity for the operationplan.

Definition at line 5360 of file model.h.

void frepple::CommandMoveOperationPlan::setStart ( Date  d)
inline

Set another start date for the operationplan.

Definition at line 5346 of file model.h.

virtual void frepple::CommandMoveOperationPlan::undo ( )
inlinevirtual

This method temporarily undoes the change. The concrete subclasses most maintain information that enables redoing the changes efficiently.
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.

Reimplemented from frepple::utils::Command.

Definition at line 5332 of file model.h.


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