frepple::CalendarPointer< T > Class Template Reference

This calendar type is used to store object pointers in its buckets. More...

#include <model.h>

Inheritance diagram for frepple::CalendarPointer< T >:
frepple::Calendar frepple::utils::HasName< Calendar > frepple::utils::NonCopyable frepple::utils::Tree::TreeNode frepple::utils::Object frepple::utils::PythonExtensionBase

List of all members.

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

Detailed Description

template<typename T>
class frepple::CalendarPointer< T >

This calendar type is used to store object pointers in its buckets.

The template type must statisfy the following requirements:

Definition at line 563 of file model.h.


Constructor & Destructor Documentation

template<typename T>
frepple::CalendarPointer< T >::CalendarPointer ( const string &  n  )  [inline]

Default constructor.

Definition at line 653 of file model.h.


Member Function Documentation

template<typename T>
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.

Definition at line 717 of file model.h.

template<typename T>
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.

Definition at line 725 of file model.h.

template<typename T>
virtual bool frepple::CalendarPointer< T >::getBool (  )  const [inline, virtual]

Convert the value of the calendar to a boolean value.

Reimplemented from frepple::Calendar.

Definition at line 663 of file model.h.

template<typename T>
virtual T* frepple::CalendarPointer< T >::getDefault (  )  const [inline, virtual]

Returns the default calendar value when no entry is matching.

Definition at line 682 of file model.h.

template<typename T>
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.

template<typename T>
T* frepple::CalendarPointer< T >::getValue ( const Date  d  )  const [inline]

Returns the value on the specified date.

Definition at line 656 of file model.h.

template<typename T>
virtual void frepple::CalendarPointer< T >::setDefault ( T *  v  )  [inline, virtual]

Update the default calendar value when no entry is matching.

Definition at line 685 of file model.h.

template<typename T>
void frepple::CalendarPointer< T >::setValue ( Date  start,
Date  end,
T *  v 
) [inline]

Updates the value in a certain date range.
This will create a new bucket if required.

Definition at line 667 of file model.h.

template<typename T>
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.

Definition at line 689 of file model.h.


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

Generated on 21 Mar 2010 for frePPLe by  doxygen 1.6.1