Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TSE3::Phrase Class Reference

A list of MidiEvents with unique reference name. More...

#include <Phrase.h>

Inheritance diagram for TSE3::Phrase:

Inheritance graph
[legend]
Collaboration diagram for TSE3::Phrase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~Phrase ()
PhraseListparent () const
const std::string & title () const
void setTitle (const std::string &title)
DisplayParamsdisplayParams ()
int operator< (const Phrase &p) const
int operator== (const Phrase &p) const
virtual void save (std::ostream &o, int i) const
virtual void DisplayParams_Altered (DisplayParams *)

Friends

class PhraseEdit
class PhraseList

Detailed Description

A list of MidiEvents with unique reference name.

The Phrase class is a MidiData object with a unique reference name.

Phrases are held in a PhraseList. This PhraseList is the context of the unique name - there can be two Song objects which have Phrases with the same name, but you can't have two Phrases with the same name in one PhraseList.

Phrases are only generated by PhraseEdit objects (see PhraseEdit::createPhrase() for details).

Phrases are used in a Part to produce MIDI data in the Song.

The Phrase has a object associated with it which may be used by an application to redraw the Phrase in any Part on screen (this use is optional). If you use this, a Part DisplayParams should superceed any Phrase DisplayParams.

Command classes
Use the following command classes to manipute this object in a undo/redo environment.

Author:
Pete Goodliffe
Version:
3.00
See also:
MidiData

PhraseList


Constructor & Destructor Documentation

virtual TSE3::Phrase::~Phrase  )  [virtual]
 


Member Function Documentation

PhraseList* TSE3::Phrase::parent  )  const [inline]
 

Returns a pointer to the parent PhraseList that this Phrase has been inserted into. If this Phrase has not been inserted in a PhraseList, this method returns zero.

Returns:
PhraseList this Phrase is inserted in

const std::string& TSE3::Phrase::title  )  const [inline]
 

Returns the unique title of this Phrase.

Returns:
Phrase's title
See also:
setTitle

void TSE3::Phrase::setTitle const std::string &  title  ) 
 

Sets the unique Phrase title. Since the Phrase is held in a PhraseList, the new name must be unique in this list. If it is not, a is thrown and the name is not changed.

Parameters:
title New Phrase title
Exceptions:
PhraseListError 
See also:
title

DisplayParams* TSE3::Phrase::displayParams  )  [inline]
 

The display parameters.

Returns:
The Part's DisplayParams object

int TSE3::Phrase::operator< const Phrase p  )  const [inline]
 

This operator works on the value of the title alone

int TSE3::Phrase::operator== const Phrase p  )  const [inline]
 

This operator works on the value of the title alone

virtual void TSE3::Phrase::save std::ostream &  o,
int  i
const [virtual]
 

Implementation of the Serializable interface

NB: Loading is done by the PhraseList. A Phrase can't be altered so it can't logically load itself. Sigh.

Reimplemented from TSE3::Serializable.

virtual void TSE3::Phrase::DisplayParams_Altered DisplayParams  )  [virtual]
 

Reimplemented from TSE3::DisplayParamsListener.


Friends And Related Function Documentation

friend class PhraseEdit [friend]
 

The PhraseEdit class is a friend of Phrase - it is the only type of object that can create Phrases.

Reimplemented from TSE3::MidiData.

friend class PhraseList [friend]
 

The PhraseList class is a friend so that it can access the () method.


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:46:48 2005 for TSE3 by doxygen 1.3.2