This calendar type is used to store object pointers in its buckets. More...
#include <model.h>
Classes | |
class | BucketPointer |
A special type of calendar bucket, designed to hold a pointer to an object. More... | |
class | EventIterator |
A special event iterator, providing also access to the current value. More... | |
Public Member Functions | |
void | beginElement (XMLInput &pIn, const Attribute &pAttr) |
CalendarPointer (const string &n) | |
void | endElement (XMLInput &pIn, const Attribute &pAttr, const DataElement &pElement) |
virtual bool | getBool () const |
virtual T * | getDefault () const |
virtual const MetaClass & | getType () const =0 |
T * | getValue (const Date d) const |
virtual void | setDefault (T *v) |
void | setValue (Date start, Date end, T *v) |
void | writeElement (XMLOutput *o, const Keyword &tag, mode m=DEFAULT) const |
This calendar type is used to store object pointers in its buckets.
The template type must statisfy the following requirements:
Definition at line 547 of file model.h.
frepple::CalendarPointer< T >::CalendarPointer | ( | const string & | n | ) | [inline] |
void frepple::CalendarPointer< 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::Calendar.
void frepple::CalendarPointer< 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::Calendar.
virtual bool frepple::CalendarPointer< T >::getBool | ( | ) | const [inline, virtual] |
Convert the value of the calendar to a boolean value.
Reimplemented from frepple::Calendar.
virtual T* frepple::CalendarPointer< T >::getDefault | ( | ) | const [inline, virtual] |
virtual const MetaClass& frepple::CalendarPointer< T >::getType | ( | ) | const [pure virtual] |
This returns the type information on the object, a bit similar to the standard type_info information.
Reimplemented from frepple::Calendar.
Implemented in frepple::CalendarOperation.
T* frepple::CalendarPointer< T >::getValue | ( | const Date | d | ) | const [inline] |
virtual void frepple::CalendarPointer< T >::setDefault | ( | T * | v | ) | [inline, virtual] |
void frepple::CalendarPointer< T >::setValue | ( | Date | start, | |
Date | end, | |||
T * | v | |||
) | [inline] |
void frepple::CalendarPointer< 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
Reimplemented from frepple::Calendar.