frepple::Item Class Reference

An item defines the products being planned, sold, stored and/or manufactured. Buffers and demands have a reference an item. More...

#include <model.h>

Inheritance diagram for frepple::Item:
frepple::utils::HasHierarchy< Item > frepple::utils::HasDescription frepple::utils::Object frepple::utils::HasName< Item > frepple::utils::NonCopyable frepple::utils::Tree::TreeNode frepple::ItemDefault

List of all members.

Public Member Functions

void beginElement (XMLInput &, const Attribute &)
void endElement (XMLInput &, const Attribute &, const DataElement &)
OperationgetOperation () const
double getPrice () const
virtual const MetaClassgetType () const
 Item (const string &str)
void setOperation (Operation *o)
void setPrice (const double c)
virtual void writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const
virtual ~Item ()

Static Public Attributes

static const MetaCategorymetadata

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.

Definition at line 2623 of file model.h.


Constructor & Destructor Documentation

frepple::Item::Item ( const string &  str  )  [inline, explicit]

Constructor. Don't use this directly!

Definition at line 2628 of file model.h.

frepple::Item::~Item (  )  [virtual]

Destructor.

Definition at line 36 of file item.cpp.


Member Function Documentation

void frepple::Item::beginElement ( XMLInput ,
const Attribute  
) [virtual]

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::Object.

Definition at line 69 of file item.cpp.

void frepple::Item::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 78 of file item.cpp.

Operation* frepple::Item::getOperation (  )  const [inline]

Returns the delivery operation.
This field is inherited from a parent item, if it hasn't been specified.

Definition at line 2635 of file model.h.

double frepple::Item::getPrice (  )  const [inline]

Return the selling price of the item.
The default value is 0.0.

Definition at line 2657 of file model.h.

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.

Definition at line 2673 of file model.h.

void frepple::Item::setOperation ( Operation o  )  [inline]

Updates the delivery operation.
If some demands have already been planned using the old delivery operation they are left untouched and won't be replanned.

Definition at line 2652 of file model.h.

void frepple::Item::setPrice ( const double  c  )  [inline]

Update the selling price of the item.

Definition at line 2660 of file model.h.

void frepple::Item::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 48 of file item.cpp.


Member Data Documentation

Reimplemented in frepple::ItemDefault.

Definition at line 2674 of file model.h.


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

Generated on 25 Feb 2010 for frePPLe by  doxygen 1.6.1