Logo Search packages:      
Sourcecode: rosegarden version File versions  Download package

Rosegarden::Event Class Reference

#include <Event.h>

Inheritance diagram for Rosegarden::Event:
Collaboration diagram for Rosegarden::Event:

List of all members.


class  BadType
struct  EventCmp
struct  EventData
struct  EventEndCmp
class  NoData

Public Types

typedef std::vector< PropertyNamePropertyNames

Public Member Functions

void clearNonPersistentProperties ()
EventcopyMoving (timeT offset) const
void dump (std::ostream &) const
 Event (const std::string &type, timeT absoluteTime, timeT duration=0, short subOrdering=0)
 Event (const std::string &type, timeT absoluteTime, timeT duration, short subOrdering, timeT notationAbsoluteTime, timeT notationDuration)
 Event (const Event &e)
 Event (const Event &e, timeT absoluteTime)
 Event (const Event &e, timeT absoluteTime, timeT duration)
 Event (const Event &e, timeT absoluteTime, timeT duration, short subOrdering)
 Event (const Event &e, timeT absoluteTime, timeT duration, short subOrdering, timeT notationAbsoluteTime)
 Event (const Event &e, timeT absoluteTime, timeT duration, short subOrdering, timeT notationAbsoluteTime, timeT notationDuration)
template<PropertyType P>
PropertyDefn< P >::basic_type get (const PropertyName &name) const
template<PropertyType P>
bool get (const PropertyName &name, typename PropertyDefn< P >::basic_type &val) const
timeT getAbsoluteTime () const
std::string getAsString (const PropertyName &name) const
timeT getDuration () const
PropertyNames getNonPersistentPropertyNames () const
timeT getNotationAbsoluteTime () const
timeT getNotationDuration () const
PropertyNames getPersistentPropertyNames () const
PropertyNames getPropertyNames () const
PropertyType getPropertyType (const PropertyName &name) const
std::string getPropertyTypeAsString (const PropertyName &name) const
size_t getStorageSize () const
short getSubOrdering () const
const std::string & getType () const
bool has (const PropertyName &name) const
bool isa (const std::string &t) const
template<PropertyType P>
bool isPersistent (const PropertyName &name) const
Eventoperator= (const Event &e)
template<PropertyType P>
void set (const PropertyName &name, typename PropertyDefn< P >::basic_type value, bool persistent=true)
template<PropertyType P>
void setFromString (const PropertyName &name, std::string value, bool persistent=true)
template<PropertyType P>
void setMaybe (const PropertyName &name, typename PropertyDefn< P >::basic_type value)
template<PropertyType P>
void setPersistence (const PropertyName &name, bool persistent)
std::string toXmlString ()
std::string toXmlString (timeT expectedTime)
void unset (const PropertyName &name)

Static Public Member Functions

static bool compareEvent2Time (const Event *e, timeT t)
static bool compareTime2Event (timeT t, const Event *e)
static void dumpStats (std::ostream &)

Protected Member Functions

void setAbsoluteTime (timeT t)
void setDuration (timeT d)
void setNotationAbsoluteTime (timeT t)
void setNotationDuration (timeT d)
void setSubOrdering (short o)
void setType (const std::string &t)

Private Member Functions

PropertyMapfind (const PropertyName &name, PropertyMap::iterator &i)
const PropertyMapfind (const PropertyName &name, PropertyMap::const_iterator &i) const
PropertyMap::iterator insert (const PropertyPair &pair, bool persistent)
void lose ()
bool operator== (const Event &)
void share (const Event &e)
bool unshare ()

Private Attributes


Static Private Attributes

static int m_getCount = 0
static int m_hasCount = 0
static clock_t m_lastStats = clock()
static int m_setCount = 0
static int m_setMaybeCount = 0
static int m_unsetCount = 0


bool operator< (const Event &, const Event &)

Detailed Description

The Event class represents an event with some basic attributes and an arbitrary number of properties of dynamically-determined name and type.

An Event has a type; a duration, often zero for events other than notes; an absolute time, the time at which the event begins, which is used to order events within a Segment; and a "sub-ordering", used to determine an order for events that have the same absolute time (for example to ensure that the clef always appears before the key signature at the start of a piece). Besides these, an event can have any number of properties, which are typed values stored and retrieved by name. Properties may be persistent or non-persistent, depending on whether they are saved to file with the rest of the event data or are considered to be only cached values that can be recomputed at will if necessary.

Definition at line 54 of file Event.h.

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

Generated by  Doxygen 1.6.0   Back to index