frepple::CommandErase Class Reference

This command deletes part of the model or the plan from memory. More...

#include <model.h>

Inheritance diagram for frepple::CommandErase:

List of all members.

Public Member Functions

 CommandErase (bool staticAlso=false)
void execute ()
bool getDeleteStaticModel () const
void setDeleteStaticModel (bool b)

Static Public Member Functions

static PyObject * executePython (PyObject *, PyObject *)

Detailed Description

This command deletes part of the model or the plan from memory.

The class allows the following modes to control what to delete:

  • plan:
    Deletes the dynamic modelling constructs, such as operationplans, loadplans and flowplans only. Locked operationplans are not deleted.
    The static model is left intact.
    This is the default mode.
  • model:
    The dynamic as well as the static objects are removed. You'll end up with a completely empty model. Due to the logic required in the object destructors this mode doesn't scale linear with the model size.

Definition at line 4547 of file model.h.


Constructor & Destructor Documentation

frepple::CommandErase::CommandErase ( bool  staticAlso = false  )  [inline]

Definition at line 4550 of file model.h.


Member Function Documentation

void frepple::CommandErase::execute (  )  [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 497 of file model/actions.cpp.

PyObject * frepple::CommandErase::executePython ( PyObject *  self,
PyObject *  args 
) [static]

Python interface to this command.

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

bool frepple::CommandErase::getDeleteStaticModel (  )  const [inline]

Definition at line 4557 of file model.h.

void frepple::CommandErase::setDeleteStaticModel ( bool  b  )  [inline]

Definition at line 4558 of file model.h.


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

Documentation generated for frePPLe by  doxygen