A calendar storing double values in its buckets. More...

#include <model.h>

Inheritance diagram for frepple::CalendarDouble:

List of all members.

Classes

class  BucketDouble
 A special type of calendar bucket, designed to hold a a value. More...
class  EventIterator
 A special event iterator, providing also access to the current value. More...

Public Member Functions

 CalendarDouble (const string &n)
void endElement (XMLInput &, const Attribute &, const DataElement &)
virtual PyObject * getattro (const Attribute &)
virtual bool getBool () const
double getDefault () const
virtual const MetaClassgetType () const
double getValue (const Date d) const
double getValue (Calendar::BucketIterator &i) const
virtual int setattro (const Attribute &, const PythonObject &)
virtual void setDefault (const double v)
void setValue (Date start, Date end, const double v)
void writeElement (XMLOutput *, const Keyword &, mode m=DEFAULT) const
 ~CalendarDouble ()

Static Public Member Functions

static int initialize ()
static PyObject * setPythonValue (PyObject *, PyObject *, PyObject *)

Static Public Attributes

static const MetaClassmetadata

Detailed Description

A calendar storing double values in its buckets.

Definition at line 449 of file model.h.


Constructor & Destructor Documentation

frepple::CalendarDouble::CalendarDouble ( const string &  n) [inline]

Default constructor.

Definition at line 524 of file model.h.

frepple::CalendarDouble::~CalendarDouble ( )

Destructor.

Definition at line 179 of file calendar.cpp.


Member Function Documentation

void frepple::CalendarDouble::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.

Reimplemented from frepple::Calendar.

Definition at line 151 of file calendar.cpp.

PyObject * frepple::CalendarDouble::getattro ( const Attribute attr) [virtual]

Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.

Reimplemented from frepple::Calendar.

Definition at line 814 of file calendar.cpp.

virtual bool frepple::CalendarDouble::getBool ( ) const [inline, virtual]

Convert the value of the calendar to a boolean value.

Reimplemented from frepple::Calendar.

Definition at line 562 of file model.h.

double frepple::CalendarDouble::getDefault ( ) const [inline]

Returns the default calendar value when no entry is matching.

Definition at line 559 of file model.h.

virtual const MetaClass& frepple::CalendarDouble::getType ( ) const [inline, virtual]

This returns the type information on the object, a bit similar to the standard type_info information.

Reimplemented from frepple::Calendar.

Definition at line 530 of file model.h.

double frepple::CalendarDouble::getValue ( const Date  d) const [inline]

Returns the value on the specified date.

Definition at line 542 of file model.h.

double frepple::CalendarDouble::getValue ( Calendar::BucketIterator i) const [inline]

Definition at line 553 of file model.h.

int frepple::CalendarDouble::initialize ( ) [static]

Reimplemented from frepple::Calendar.

Definition at line 74 of file calendar.cpp.

int frepple::CalendarDouble::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::Calendar.

Definition at line 822 of file calendar.cpp.

virtual void frepple::CalendarDouble::setDefault ( const double  v) [inline, virtual]

Update the default calendar value when no entry is matching.

Definition at line 565 of file model.h.

PyObject * frepple::CalendarDouble::setPythonValue ( PyObject *  self,
PyObject *  args,
PyObject *  kwdict 
) [static]

Definition at line 832 of file calendar.cpp.

void frepple::CalendarDouble::setValue ( Date  start,
Date  end,
const double  v 
)

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

Definition at line 109 of file calendar.cpp.

void frepple::CalendarDouble::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::Calendar.

Definition at line 124 of file calendar.cpp.


Member Data Documentation

Reimplemented from frepple::Calendar.

Definition at line 531 of file model.h.


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

Documentation generated for frePPLe by  doxygen