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:

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

List of all members.


Public Member Functions

 CommandErase (bool staticAlso=false)
void endElement (XMLInput &, const Attribute &, const DataElement &)
void execute ()
bool getDeleteStaticModel () const
string getDescription () const
virtual size_t getSize () const
virtual const MetaClassgetType () const
void setDeleteStaticModel (bool b)

Static Public Member Functions

static PyObject * executePython (PyObject *, PyObject *)

Static Public Attributes

static const MetaClass metadata

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


Constructor & Destructor Documentation

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

Definition at line 3835 of file model.h.


Member Function Documentation

void frepple::CommandErase::endElement ( XMLInput ,
const Attribute ,
const DataElement  
) [virtual]

Called while restoring the model from an XML-file. This is called when the corresponding close element tag is encountered, and the Data() member of pElement is also valid. NOTE: each object receives both its own beginElement so it can process its own element tag attributes, and its own endElement so it can process its own character data.

Reimplemented from frepple::utils::Command.

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

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 638 of file model/actions.cpp.

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

Python interface to this command.

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

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

Definition at line 3847 of file model.h.

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

Reimplemented from frepple::utils::Command.

Definition at line 3843 of file model.h.

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

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Definition at line 3850 of file model.h.

virtual const MetaClass& frepple::CommandErase::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 3849 of file model.h.

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

Definition at line 3848 of file model.h.


Member Data Documentation

Reimplemented from frepple::utils::Command.

Definition at line 3851 of file model.h.


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

Documentation generated by  doxygen