A calendar storing double values in its buckets. More...
#include <model.h>

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 MetaClass & | getType () 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 MetaClass * | metadata |
Detailed Description
Constructor & Destructor Documentation
frepple::CalendarDouble::CalendarDouble | ( | const string & | n | ) | [inline] |
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.
double frepple::CalendarDouble::getDefault | ( | ) | const [inline] |
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.
double frepple::CalendarDouble::getValue | ( | const Date | d | ) | const [inline] |
double frepple::CalendarDouble::getValue | ( | Calendar::BucketIterator & | i | ) | const [inline] |
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] |
PyObject * frepple::CalendarDouble::setPythonValue | ( | PyObject * | self, |
PyObject * | args, | ||
PyObject * | kwdict | ||
) | [static] |
Definition at line 832 of file calendar.cpp.
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
const MetaClass * frepple::CalendarDouble::metadata [static] |
Reimplemented from frepple::Calendar.
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
