This class represents a time bucket as a part of a calendar. More...
#include <model.h>

Public Member Functions | |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
virtual PyObject * | getattro (const Attribute &) |
virtual bool | getBool () const |
Calendar * | getCalendar () const |
short | getDays () const |
Date | getEnd () const |
TimePeriod | getEndTime () const |
int | getId () const |
int | getPriority () const |
virtual size_t | getSize () const |
Date | getStart () const |
TimePeriod | getStartTime () const |
virtual const MetaClass & | getType () const |
virtual int | setattro (const Attribute &, const PythonObject &) |
void | setDays (short p) |
void | setEnd (const Date d) |
void | setEndTime (TimePeriod t) |
void | setId (int ident=INT_MIN) |
void | setPriority (int f) |
void | setStart (const Date d) |
void | setStartTime (TimePeriod t) |
virtual void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
Static Public Member Functions | |
static int | initialize () |
Static Public Attributes | |
static const MetaCategory * | metadata |
Protected Member Functions | |
Bucket (Calendar *c, Date start, Date end, int ident=INT_MIN, int priority=0) | |
void | writeHeader (XMLOutput *, const Keyword &) const |
Friends | |
class | BucketIterator |
class | Calendar |
class | EventIterator |
Detailed Description
This class represents a time bucket as a part of a calendar.
Manipulation of instances of this class need to be handled with the methods on the friend class Calendar.
- See also:
- Calendar
Constructor & Destructor Documentation
Member Function Documentation
void frepple::Calendar::Bucket::endElement | ( | XMLInput & | pIn, |
const Attribute & | pAttr, | ||
const DataElement & | pElement | ||
) | [virtual] |
Reads the bucket information from the input. Only the fields "name" and "start" are read in. Other fields as also written out but these are information-only fields.
Implements frepple::utils::Object.
Reimplemented in frepple::CalendarDouble::BucketDouble.
Definition at line 493 of file calendar.cpp.
PyObject * frepple::Calendar::Bucket::getattro | ( | const Attribute & | attr | ) | [virtual] |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 908 of file calendar.cpp.
virtual bool frepple::Calendar::Bucket::getBool | ( | ) | const [inline, virtual] |
Convert the value of the bucket to a boolean value.
Reimplemented in frepple::CalendarDouble::BucketDouble.
Calendar* frepple::Calendar::Bucket::getCalendar | ( | ) | const [inline] |
short frepple::Calendar::Bucket::getDays | ( | ) | const [inline] |
Date frepple::Calendar::Bucket::getEnd | ( | ) | const [inline] |
TimePeriod frepple::Calendar::Bucket::getEndTime | ( | ) | const [inline] |
int frepple::Calendar::Bucket::getId | ( | ) | const [inline] |
int frepple::Calendar::Bucket::getPriority | ( | ) | const [inline] |
virtual size_t frepple::Calendar::Bucket::getSize | ( | ) | const [inline, virtual] |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
Reimplemented in frepple::CalendarDouble::BucketDouble.
Date frepple::Calendar::Bucket::getStart | ( | ) | const [inline] |
TimePeriod frepple::Calendar::Bucket::getStartTime | ( | ) | const [inline] |
virtual const MetaClass& frepple::Calendar::Bucket::getType | ( | ) | const [inline, virtual] |
This returns the type information on the object, a bit similar to the standard type_info information.
Implements frepple::utils::Object.
Reimplemented in frepple::CalendarDouble::BucketDouble.
int frepple::Calendar::Bucket::initialize | ( | ) | [static] |
Reimplemented in frepple::CalendarDouble::BucketDouble.
Definition at line 56 of file calendar.cpp.
int frepple::Calendar::Bucket::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::utils::PythonExtensionBase.
Definition at line 937 of file calendar.cpp.
void frepple::Calendar::Bucket::setDays | ( | short | p | ) | [inline] |
void frepple::Calendar::Bucket::setEnd | ( | const Date | d | ) |
Updates the end date of the bucket.
Definition at line 232 of file calendar.cpp.
void frepple::Calendar::Bucket::setEndTime | ( | TimePeriod | t | ) | [inline] |
void frepple::Calendar::Bucket::setId | ( | int | ident = INT_MIN | ) |
Generate the identfier.
If a bucket with the given identifier already exists a unique number is generated instead. This is done by incrementing the value passed until it is unique.
Definition at line 506 of file calendar.cpp.
void frepple::Calendar::Bucket::setPriority | ( | int | f | ) | [inline] |
void frepple::Calendar::Bucket::setStart | ( | const Date | d | ) |
Updates the start date of the bucket.
Definition at line 243 of file calendar.cpp.
void frepple::Calendar::Bucket::setStartTime | ( | TimePeriod | t | ) | [inline] |
void frepple::Calendar::Bucket::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::utils::Object.
Reimplemented in frepple::CalendarDouble::BucketDouble.
Definition at line 479 of file calendar.cpp.
void frepple::Calendar::Bucket::writeHeader | ( | XMLOutput * | o, |
const Keyword & | tag | ||
) | const [protected] |
Auxilary function to write out the start of the XML.
Definition at line 458 of file calendar.cpp.
Friends And Related Function Documentation
friend class BucketIterator [friend] |
friend class EventIterator [friend] |
Member Data Documentation
const MetaCategory * frepple::Calendar::Bucket::metadata [static] |
Reimplemented in frepple::CalendarDouble::BucketDouble.
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
