This is a base class for the main objects. More...
#include <utils.h>
Classes | |
class | memberIterator |
This class models an STL-like iterator that allows us to iterate over the members. More... | |
Public Member Functions | |
void | beginElement (XMLInput &, const Attribute &) |
memberIterator | beginMember () const |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
memberIterator | endMember () const |
unsigned short | getHierarchyLevel () const |
T * | getOwner () const |
HasHierarchy (const string &n) | |
bool | hasOwner () const |
bool | isGroup () const |
void | setOwner (T *f) |
void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
~HasHierarchy () | |
Friends | |
class | memberIterator |
This is a base class for the main objects.
Instances of this class have the following properties:
Definition at line 4657 of file utils.h.
frepple::utils::HasHierarchy< T >::HasHierarchy | ( | const string & | n | ) | [inline] |
frepple::utils::HasHierarchy< T >::~HasHierarchy | ( | ) | [inline] |
void frepple::utils::HasHierarchy< T >::beginElement | ( | XMLInput & | , | |
const Attribute & | ||||
) | [inline, 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.
Reimplemented in frepple::Location, frepple::Customer, frepple::Item, frepple::Buffer, frepple::Resource, frepple::Demand, and module_forecast::Forecast.
memberIterator frepple::utils::HasHierarchy< T >::beginMember | ( | ) | const [inline] |
void frepple::utils::HasHierarchy< T >::endElement | ( | XMLInput & | , | |
const Attribute & | , | |||
const DataElement & | ||||
) | [inline, 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.
Reimplemented from frepple::utils::HasName< T >.
Reimplemented in frepple::Location, frepple::Customer, frepple::Item, frepple::Buffer, frepple::BufferProcure, frepple::Resource, frepple::Demand, and module_forecast::Forecast.
memberIterator frepple::utils::HasHierarchy< T >::endMember | ( | ) | const [inline] |
unsigned short frepple::utils::HasHierarchy< T >::getHierarchyLevel | ( | ) | const [inline] |
T* frepple::utils::HasHierarchy< T >::getOwner | ( | ) | const [inline] |
bool frepple::utils::HasHierarchy< T >::hasOwner | ( | ) | const [inline] |
bool frepple::utils::HasHierarchy< T >::isGroup | ( | ) | const [inline] |
void frepple::utils::HasHierarchy< T >::setOwner | ( | T * | f | ) | [inline] |
void frepple::utils::HasHierarchy< T >::writeElement | ( | XMLOutput * | , | |
const Keyword & | , | |||
mode | = DEFAULT | |||
) | const [inline, 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
Note that this function is never called on its own. It is always called from the writeElement() method of a subclass. Therefore we don't need to worry about the refOnly or incHeader parameters.
Reimplemented from frepple::utils::Object.
Reimplemented in frepple::Location, frepple::Customer, frepple::Item, frepple::Buffer, frepple::BufferInfinite, frepple::BufferProcure, frepple::Resource, frepple::ResourceInfinite, frepple::Demand, and module_forecast::Forecast.
friend class memberIterator [friend] |