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

Rosegarden::GenericChord< Element, Container, singleStaff > Class Template Reference

#include <Sets.h>

Inheritance diagram for Rosegarden::GenericChord< Element, Container, singleStaff >:

Rosegarden::AbstractSet< Element, Container >

List of all members.

Detailed Description

template<class Element, class Container, bool singleStaff>
class Rosegarden::GenericChord< Element, Container, singleStaff >

Chord is subclassed from a vector of iterators; this vector contains iterators pointing at all the notes in the chord, in ascending order of pitch. You can also track through all the events in the chord by iterating from getInitialElement() to getFinalElement(), but this will only get them in the order in which they appear in the original container.

However, the notes in a chord might not be contiguous events in the container, as there could be other zero-duration events such as controllers (or even conceivably some short rests) between notes in the same chord, depending on the quantization settings. The Chord itself only contains iterators pointing at the notes, so if you want to iterate through all events spanned by the Chord, iterate from getInitialElement() to getFinalElement() instead.

This class can tell you various things about the chord it describes, but not everything. It can't tell you whether the chord has a stem, for example, because that depends on the notation style and system in use. See gui/notationsets.h for a NotationChord class (subclassed from this) that can.

Definition at line 152 of file Sets.h.

Public Types

typedef Container::iterator Iterator

Public Member Functions

virtual bool contains (const Iterator &) const
 GenericChord (Container &c, Iterator elementInChord, const Quantizer *quantizer, PropertyName stemUpProperty=PropertyName::EmptyPropertyName)
EventgetAsEvent (const NotationElementList::iterator &i)
EventgetAsEvent (const CompositionTimeSliceAdapter::iterator &i)
EventgetAsEvent (const Segment::iterator &i)
Iterator getFinalElement () const
Iterator getFinalNote () const
virtual Iterator getFirstElementNotInChord ()
Iterator getHighestNote () const
 these will return end() if there are no note elements in the set
Iterator getInitialElement () const
Iterator getInitialNote () const
 only return note elements; will return end() if there are none
Iterator getLongestElement () const
Iterator getLowestNote () const
virtual int getMarkCountForChord () const
virtual std::vector< MarkgetMarksForChord () const
virtual Iterator getNextNote ()
virtual std::vector< int > getPitches () const
virtual Iterator getPreviousNote ()
Iterator getShortestElement () const
virtual int getSubOrdering ()

Static Public Member Functions

static EventgetAsEvent (const Iterator &i)
 Return the pointed-to element, in Event form (public to work around gcc-2.95 bug).

Protected Member Functions

void copyGroupProperties (Event *e0, Event *e1) const
Container & getContainer () const
const QuantizergetQuantizer () const
void initialise ()
virtual bool sample (const Iterator &, bool goingForwards)
 Return true if this element, known to test() true, is a set member.
virtual bool test (const Iterator &)
 Return true if this element is not definitely beyond bounds of set.

Protected Attributes

Iterator m_baseIterator
Container & m_container
Iterator m_final
Iterator m_finalNote
Iterator m_firstReject
Iterator m_highest
Iterator m_initial
Iterator m_initialNote
Iterator m_longest
Iterator m_lowest
const Quantizerm_quantizer
Iterator m_shortest
PropertyName m_stemUpProperty
int m_subordering
timeT m_time


class  PitchGreater

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

Generated by  Doxygen 1.6.0   Back to index