frepple::CommandPlanSize Class Reference
This command prints a summary of the dynamically allocated memory to the standard output. This is useful for understanding better the size of your model. More...
#include <model.h>

Public Member Functions | |
| CommandPlanSize () | |
| void | execute () |
| string | getDescription () const |
| virtual size_t | getSize () const |
| virtual const MetaClass & | getType () const |
| void | undo () |
| bool | undoable () const |
Static Public Attributes | |
| static const MetaClass | metadata |
Detailed Description
This command prints a summary of the dynamically allocated memory to the standard output. This is useful for understanding better the size of your model.The numbers reported by this function won't match the memory size as reported by the operating system, since the dynamically allocated memory is only a part of the total memory used by a program.
Definition at line 3803 of file model.h.
Constructor & Destructor Documentation
Member Function Documentation
| void frepple::CommandPlanSize::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 457 of file model/library.cpp.
| string frepple::CommandPlanSize::getDescription | ( | ) | const [inline, virtual] |
| virtual size_t frepple::CommandPlanSize::getSize | ( | ) | const [inline, virtual] |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
| virtual const MetaClass& frepple::CommandPlanSize::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::CommandPlanSize::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.
| bool frepple::CommandPlanSize::undoable | ( | ) | const [inline, virtual] |
Returns true if the execution of this command can be undone.
Reimplemented from frepple::utils::Command.
Member Data Documentation
const MetaClass frepple::CommandPlanSize::metadata [static] |
The documentation for this class was generated from the following files:
Documentation generated by
