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 |
![]() | |
virtual void | beginElement (XMLInput &, const Attribute &) |
virtual bool | getHidden () const |
Object () | |
virtual void | setHidden (bool b) |
virtual | ~Object () |
![]() | |
virtual PyObject * | call (const PythonObject &args, const PythonObject &kwds) |
virtual int | compare (const PyObject *other) const |
Py_ssize_t | getReferenceCount () const |
void | initType (const MetaClass *t) |
void | initType (PyTypeObject *t) |
virtual PyObject * | iternext () |
PythonExtensionBase () | |
void | resetReferenceCount () |
virtual PyObject * | str () const |
virtual | ~PythonExtensionBase () |
Static Public Member Functions | |
static int | initialize () |
![]() | |
template<class T > | |
static PyObject * | create (PyTypeObject *pytype, PyObject *args, PyObject *kwds) |
template<class T > | |
static Object * | createDefault () |
template<class T > | |
static Object * | createString (const string &n) |
static PyObject * | toXML (PyObject *, PyObject *) |
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 |
![]() | |
NonCopyable () | |
~NonCopyable () |
Friends | |
class | BucketIterator |
class | Calendar |
class | EventIterator |
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.
|
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 489 of file calendar.cpp.
|
virtual |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 912 of file calendar.cpp.
|
inlinevirtual |
Convert the value of the bucket to a boolean value.
Reimplemented in frepple::CalendarDouble::BucketDouble.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
Reimplemented in frepple::CalendarDouble::BucketDouble.
|
inline |
|
inline |
|
inlinevirtual |
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.
|
static |
Reimplemented in frepple::CalendarDouble::BucketDouble.
Definition at line 50 of file calendar.cpp.
|
virtual |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 941 of file calendar.cpp.
|
inline |
void frepple::Calendar::Bucket::setEnd | ( | const Date | d | ) |
Updates the end date of the bucket.
Definition at line 228 of file calendar.cpp.
|
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 502 of file calendar.cpp.
|
inline |
void frepple::Calendar::Bucket::setStart | ( | const Date | d | ) |
Updates the start date of the bucket.
Definition at line 239 of file calendar.cpp.
|
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::utils::Object.
Reimplemented in frepple::CalendarDouble::BucketDouble.
Definition at line 475 of file calendar.cpp.
Auxilary function to write out the start of the XML.
Definition at line 454 of file calendar.cpp.
|
friend |
|
friend |
|
static |
Reimplemented in frepple::CalendarDouble::BucketDouble.