frepple::SetupMatrix::Rule Class Reference

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

#include <model.h>

Inheritance diagram for frepple::SetupMatrix::Rule:
frepple::utils::Object frepple::utils::PythonExtensionBase

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
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 ()

Static Public Member Functions

static int initialize ()

Static Public Attributes

static const MetaCategorymetadata

Friends

class RuleIterator
class SetupMatrix

Detailed Description

An specific changeover rule in a setup matrix.

Definition at line 3599 of file model.h.


Constructor & Destructor Documentation

frepple::SetupMatrix::Rule::Rule ( SetupMatrix s,
int  p = 0 
)

Constructor.

Definition at line 251 of file setupmatrix.cpp.

frepple::SetupMatrix::Rule::~Rule (  ) 

Destructor.

Definition at line 281 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 302 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 317 of file setupmatrix.cpp.

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

Return the conversion cost.

Definition at line 3653 of file model.h.

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

Return the conversion duration.

Definition at line 3647 of file model.h.

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

Return the from setup.

Definition at line 3635 of file model.h.

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

Return the priority.

Definition at line 3629 of file model.h.

size_t frepple::SetupMatrix::Rule::getSize (  )  const [inline, virtual]

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Definition at line 3619 of file model.h.

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

Return the from setup.

Definition at line 3641 of file model.h.

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.

Definition at line 3616 of file model.h.

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

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

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

Update the conversion cost.

Definition at line 3650 of file model.h.

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

Update the conversion duration.

Definition at line 3644 of file model.h.

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

Update the from setup.

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

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

Update the from setup.

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


Friends And Related Function Documentation

friend class RuleIterator [friend]

Definition at line 3601 of file model.h.

friend class SetupMatrix [friend]

Definition at line 3602 of file model.h.


Member Data Documentation

Definition at line 3617 of file model.h.


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208