An specific changeover rule in a setup matrix. More...

#include <model.h>

Inheritance diagram for frepple::SetupMatrix::Rule:

List of all members.

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
SetupMatrixgetSetupMatrix () const
size_t getSize () const
const string & getToSetup () const
virtual const MetaClassgetType () 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 ()
- Public Member Functions inherited from frepple::utils::Object
virtual void beginElement (XMLInput &, const Attribute &)
virtual bool getHidden () const
 Object ()
virtual void setHidden (bool b)
virtual ~Object ()
- Public Member Functions inherited from frepple::utils::PythonExtensionBase
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 Public Member Functions inherited from frepple::utils::Object
template<class T >
static PyObject * create (PyTypeObject *pytype, PyObject *args, PyObject *kwds)
template<class T >
static ObjectcreateDefault ()
template<class T >
static ObjectcreateString (const string &n)
static PyObject * toXML (PyObject *, PyObject *)

Static Public Attributes

static const MetaCategorymetadata

Friends

class RuleIterator
class SetupMatrix

Detailed Description

An specific changeover rule in a setup matrix.

Definition at line 3503 of file model.h.


Constructor & Destructor Documentation

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.


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 298 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 313 of file setupmatrix.cpp.

double frepple::SetupMatrix::Rule::getCost ( ) const
inline

Return the conversion cost.

Definition at line 3560 of file model.h.

TimePeriod frepple::SetupMatrix::Rule::getDuration ( ) const
inline

Return the conversion duration.

Definition at line 3554 of file model.h.

const string& frepple::SetupMatrix::Rule::getFromSetup ( ) const
inline

Return the from setup.

Definition at line 3542 of file model.h.

double frepple::SetupMatrix::Rule::getPriority ( ) const
inline

Return the priority.

Definition at line 3536 of file model.h.

SetupMatrix* frepple::SetupMatrix::Rule::getSetupMatrix ( ) const
inline

Return the matrix owning this rule.

Definition at line 3533 of file model.h.

size_t frepple::SetupMatrix::Rule::getSize ( ) const
inlinevirtual

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Definition at line 3523 of file model.h.

const string& frepple::SetupMatrix::Rule::getToSetup ( ) const
inline

Return the from setup.

Definition at line 3548 of file model.h.

virtual const MetaClass& frepple::SetupMatrix::Rule::getType ( ) const
inlinevirtual

This returns the type information on the object, a bit similar to the standard type_info information.

Implements frepple::utils::Object.

Definition at line 3520 of file model.h.

int frepple::SetupMatrix::Rule::initialize ( )
static

Definition at line 47 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 331 of file setupmatrix.cpp.

void frepple::SetupMatrix::Rule::setCost ( const double  p)
inline

Update the conversion cost.

Definition at line 3557 of file model.h.

void frepple::SetupMatrix::Rule::setDuration ( const TimePeriod  p)
inline

Update the conversion duration.

Definition at line 3551 of file model.h.

void frepple::SetupMatrix::Rule::setFromSetup ( const string  f)
inline

Update the from setup.

Definition at line 3539 of file model.h.

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.

void frepple::SetupMatrix::Rule::setToSetup ( const string  f)
inline

Update the from setup.

Definition at line 3545 of file model.h.

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 287 of file setupmatrix.cpp.


Friends And Related Function Documentation

friend class RuleIterator
friend

Definition at line 3505 of file model.h.

friend class SetupMatrix
friend

Definition at line 3506 of file model.h.


Member Data Documentation

const MetaCategory * frepple::SetupMatrix::Rule::metadata
static

Definition at line 3521 of file model.h.


The documentation for this class was generated from the following files: