An specific changeover rule in a setup matrix. More...
#include <model.h>
Public Member Functions | |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
virtual PyObject * | getattro (const Attribute &) |
double | getCost () const |
TimePeriod | getDuration () const |
const string & | getFromSetup () const |
double | getPriority () const |
SetupMatrix * | getSetupMatrix () const |
size_t | getSize () const |
const string & | getToSetup () const |
virtual const MetaClass & | getType () const |
Rule (SetupMatrix *s, int p=0) | |
virtual int | setattro (const Attribute &, const PythonObject &) |
void | setCost (const double p) |
void | setDuration (const TimePeriod p) |
void | setFromSetup (const string f) |
void | setPriority (const int) |
void | setToSetup (const string f) |
virtual void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
~Rule () | |
![]() | |
virtual void | beginElement (XMLInput &, const Attribute &) |
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 () |
![]() | |
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 |
Friends | |
class | RuleIterator |
class | SetupMatrix |
frepple::SetupMatrix::Rule::Rule | ( | SetupMatrix * | s, |
int | p = 0 |
||
) |
Constructor.
Definition at line 247 of file setupmatrix.cpp.
frepple::SetupMatrix::Rule::~Rule | ( | ) |
Destructor.
Definition at line 277 of file setupmatrix.cpp.
|
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 valid.
Implements frepple::utils::Object.
Definition at line 298 of file setupmatrix.cpp.
|
virtual |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 313 of file setupmatrix.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
|
inline |
|
inlinevirtual |
This returns the type information on the object, a bit similar to the standard type_info information.
Implements frepple::utils::Object.
|
static |
Definition at line 47 of file setupmatrix.cpp.
|
virtual |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 331 of file setupmatrix.cpp.
|
inline |
|
inline |
|
inline |
void frepple::SetupMatrix::Rule::setPriority | ( | const int | n | ) |
Update the priority.
The priority value is a key field. If multiple rules have the same priority a data exception is thrown.
Definition at line 349 of file setupmatrix.cpp.
|
inline |
|
virtual |
Called while writing the model into an XML-file. The user class should write itself out, using the IOutStream members for its "simple" members and calling writeElement recursively for any contained objects. Not all classes are expected to implement this method. In instances of such a class can be created but can't be persisted. E.g. Command
Reimplemented from frepple::utils::Object.
Definition at line 287 of file setupmatrix.cpp.
|
friend |
|
friend |
|
static |