Planeshift
Public Member Functions

Note::NoteContext Class Reference

Used to keep track of previous altered notes in the current measure. More...

#include <scoreelements.h>

List of all members.

Public Member Functions

psMusic::Accidental GetPreviousAccidental (const Note &note) const
 Get an eventual accidental that previously appeared in the same measure.
 NoteContext ()
 Constructor.
void ResetContext ()
 Empty the list of previously altered note.
void UpdateContext (const MeasureElement &element)
 Update the list of previous accidental with all the notes in the given measure element.
void UpdateContext (const Note &note)
 Update the list of previous accidental if the given note has any.

Detailed Description

Used to keep track of previous altered notes in the current measure.

Hides the implementation of note context updating to other classes. It must be resetted at every measure and updated at every note.

Definition at line 64 of file scoreelements.h.


Constructor & Destructor Documentation

Note::NoteContext::NoteContext ( )

Constructor.


Member Function Documentation

psMusic::Accidental Note::NoteContext::GetPreviousAccidental ( const Note note) const

Get an eventual accidental that previously appeared in the same measure.

Parameters:
noteThe note that should be checked.
Returns:
The accidental of the previous note within the same measure having the same name and octave as the given one. In case no previous note satisfying the requirements is found, NO_ACCIDENTAL is returned.
void Note::NoteContext::ResetContext ( )

Empty the list of previously altered note.

void Note::NoteContext::UpdateContext ( const MeasureElement element)

Update the list of previous accidental with all the notes in the given measure element.

Parameters:
elementThe current element.
void Note::NoteContext::UpdateContext ( const Note note)

Update the list of previous accidental if the given note has any.

Parameters:
noteThe current played note.

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