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 () | |
Static Public Member Functions | |
static int | initialize () |
Static Public Attributes | |
static const MetaCategory * | metadata |
Friends | |
class | RuleIterator |
class | SetupMatrix |
Detailed Description
Constructor & Destructor Documentation
frepple::SetupMatrix::Rule::Rule | ( | SetupMatrix * | s, |
int | p = 0 |
||
) |
Constructor.
Definition at line 252 of file setupmatrix.cpp.
frepple::SetupMatrix::Rule::~Rule | ( | ) |
Destructor.
Definition at line 282 of file setupmatrix.cpp.
Member Function Documentation
void frepple::SetupMatrix::Rule::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 valid.
Implements frepple::utils::Object.
Definition at line 303 of file setupmatrix.cpp.
PyObject * frepple::SetupMatrix::Rule::getattro | ( | const Attribute & | attr | ) | [virtual] |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 318 of file setupmatrix.cpp.
double frepple::SetupMatrix::Rule::getCost | ( | ) | const [inline] |
TimePeriod frepple::SetupMatrix::Rule::getDuration | ( | ) | const [inline] |
const string& frepple::SetupMatrix::Rule::getFromSetup | ( | ) | const [inline] |
double frepple::SetupMatrix::Rule::getPriority | ( | ) | const [inline] |
SetupMatrix* frepple::SetupMatrix::Rule::getSetupMatrix | ( | ) | const [inline] |
size_t frepple::SetupMatrix::Rule::getSize | ( | ) | const [inline, virtual] |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
const string& frepple::SetupMatrix::Rule::getToSetup | ( | ) | const [inline] |
virtual const MetaClass& frepple::SetupMatrix::Rule::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.
int frepple::SetupMatrix::Rule::initialize | ( | ) | [static] |
Definition at line 52 of file setupmatrix.cpp.
int frepple::SetupMatrix::Rule::setattro | ( | const Attribute & | attr, |
const PythonObject & | field | ||
) | [virtual] |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 336 of file setupmatrix.cpp.
void frepple::SetupMatrix::Rule::setCost | ( | const double | p | ) | [inline] |
void frepple::SetupMatrix::Rule::setDuration | ( | const TimePeriod | p | ) | [inline] |
void frepple::SetupMatrix::Rule::setFromSetup | ( | const string | f | ) | [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 354 of file setupmatrix.cpp.
void frepple::SetupMatrix::Rule::setToSetup | ( | const string | f | ) | [inline] |
void frepple::SetupMatrix::Rule::writeElement | ( | XMLOutput * | , |
const Keyword & | , | ||
mode | = DEFAULT |
||
) | const [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 292 of file setupmatrix.cpp.
Friends And Related Function Documentation
friend class RuleIterator [friend] |
friend class SetupMatrix [friend] |
Member Data Documentation
const MetaCategory * frepple::SetupMatrix::Rule::metadata [static] |
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
