frepple::CommandErase Class Reference
This command deletes part of the model or the plan from memory. More...
#include <model.h>

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 MetaClass & | getType () 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] |
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] |
| string frepple::CommandErase::getDescription | ( | ) | const [inline, virtual] |
| virtual size_t frepple::CommandErase::getSize | ( | ) | const [inline, virtual] |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
| 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.
| void frepple::CommandErase::setDeleteStaticModel | ( | bool | b | ) | [inline] |
Member Data Documentation
const MetaClass frepple::CommandErase::metadata [static] |
The documentation for this class was generated from the following files:
Documentation generated by
