This is the (logical) top class of the complete model. More...
#include <model.h>
Public Member Functions | |
void | beginElement (XMLInput &, const Attribute &) |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
PyObject * | getattro (const Attribute &) |
const Date & | getCurrent () const |
const string & | getDescription () const |
const string & | getName () const |
virtual size_t | getSize () const |
const MetaClass & | getType () const |
int | setattro (const Attribute &, const PythonObject &) |
void | setCurrent (Date) |
void | setDescription (const string &str) |
void | setName (const string &s) |
virtual void | solve (Solver &s, void *v=NULL) const |
virtual void | updateProblems () |
virtual void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
~Plan () | |
![]() | |
bool | getChanged () const |
bool | getDetectProblems () const |
Plannable * | getEntity () const |
Plannable () | |
void | setChanged (bool b=true) |
void | setDetectProblems (bool b) |
![]() | |
HasProblems () | |
virtual | ~HasProblems () |
![]() | |
virtual | ~Solvable () |
![]() | |
virtual bool | getHidden () const |
Object () | |
virtual void | setHidden (bool b) |
virtual | ~Object () |
![]() | |
virtual PyObject * | call (const PythonObject &args, const PythonObject &kwds) |
virtual int | compare (const PyObject *other) const |
Py_ssize_t | getReferenceCount () const |
void | initType (const MetaClass *t) |
void | initType (PyTypeObject *t) |
virtual PyObject * | iternext () |
PythonExtensionBase () | |
void | resetReferenceCount () |
virtual PyObject * | str () const |
virtual | ~PythonExtensionBase () |
Static Public Member Functions | |
static int | initialize () |
static Plan & | instance () |
![]() | |
static void | computeProblems () |
![]() | |
static EntityIterator | beginEntity () |
static EntityIterator | endEntity () |
![]() | |
template<class T > | |
static PyObject * | create (PyTypeObject *pytype, PyObject *args, PyObject *kwds) |
template<class T > | |
static Object * | createDefault () |
template<class T > | |
static Object * | createString (const string &n) |
static PyObject * | toXML (PyObject *, PyObject *) |
Static Public Attributes | |
static const MetaCategory * | metadata |
This is the (logical) top class of the complete model.
This is a singleton class: only a single instance can be created. The data model has other limitations that make it not obvious to support building multiple models/plans in memory of the same application: e.g. the operations, resources, problems, operationplans... etc are all implemented in static, global lists. An entity can't be simply linked with a particular plan if multiple ones would exist.
frepple::Plan::~Plan | ( | ) |
Called while restoring the model from an XML-file.
This is called for each element within the "this" element, for which the "this" element is immediate parent.
It is called when the open element tag is encountered.
Reimplemented from frepple::utils::Object.
|
virtual |
Reimplemented from frepple::Plannable.
|
virtual |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::utils::PythonExtensionBase.
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
|
inlinevirtual |
This returns the type information on the object, a bit similar to the standard type_info information.
Implements frepple::utils::Object.
|
static |
|
inlinestatic |
|
virtual |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::utils::PythonExtensionBase.
void frepple::Plan::setCurrent | ( | Date | l | ) |
|
inline |
|
inline |
|
inlinevirtual |
This method basically solves the whole planning problem.
Reimplemented from frepple::Solvable.
|
inlinevirtual |
Called to update the list of problems. The function will only be called when:
Implements frepple::HasProblems.
|
virtual |
This method writes out the model information. Depending on a flag in the XMLOutput object a complete model is written, or only the dynamic plan information.
Reimplemented from frepple::Plannable.
|
static |