An item defines the products being planned, sold, stored and/or manufactured. Buffers and demands have a reference an item. More...
#include <model.h>

Public Member Functions | |
void | beginElement (XMLInput &, const Attribute &) |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
virtual PyObject * | getattro (const Attribute &) |
Operation * | getOperation () const |
double | getPrice () const |
virtual const MetaClass & | getType () const |
Item (const string &str) | |
virtual int | setattro (const Attribute &, const PythonObject &) |
void | setOperation (Operation *o) |
void | setPrice (const double c) |
virtual void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
virtual | ~Item () |
Static Public Member Functions | |
static int | initialize () |
Static Public Attributes | |
static const MetaCategory * | metadata |
Detailed Description
An item defines the products being planned, sold, stored and/or manufactured. Buffers and demands have a reference an item.
This is an abstract class.
Constructor & Destructor Documentation
frepple::Item::Item | ( | const string & | str | ) | [inline, explicit] |
Member Function Documentation
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::HasHierarchy< Item >.
void frepple::Item::endElement | ( | XMLInput & | pIn, |
const Attribute & | pAttr, | ||
const DataElement & | pElement | ||
) |
Reimplemented from frepple::utils::HasDescription.
PyObject * frepple::Item::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.
Operation* frepple::Item::getOperation | ( | ) | const [inline] |
double frepple::Item::getPrice | ( | ) | const [inline] |
virtual const MetaClass& frepple::Item::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.
Reimplemented in frepple::ItemDefault.
int frepple::Item::initialize | ( | ) | [static] |
Reimplemented in frepple::ItemDefault.
int frepple::Item::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.
void frepple::Item::setOperation | ( | Operation * | o | ) | [inline] |
void frepple::Item::setPrice | ( | const double | c | ) | [inline] |
void frepple::Item::writeElement | ( | XMLOutput * | o, |
const Keyword & | tag, | ||
mode | m = DEFAULT |
||
) | const [virtual] |
Reimplemented from frepple::utils::HasDescription.
Member Data Documentation
const MetaCategory * frepple::Item::metadata [static] |
Reimplemented in frepple::ItemDefault.
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
