#include <PhraseList.h>
Inheritance diagram for TSE3::PhraseList:
Public Member Functions | |
PhraseList () | |
virtual | ~PhraseList () |
size_t | size () const |
Phrase * | operator[] (size_t n) const |
Phrase * | phrase (const std::string &title) const |
size_t | index (const Phrase *phrase) const |
void | erase (Phrase *phrase) |
void | remove (Phrase *phrase) |
void | insert (Phrase *phrase) |
std::string | newPhraseTitle (const std::string &baseName=newPhraseString) |
virtual void | Phrase_TitleAltered (Phrase *) |
virtual void | Notifier_Deleted (Phrase *) |
virtual void | save (std::ostream &o, int i) const |
virtual void | load (std::istream &i, SerializableLoadInfo &info) |
Static Public Attributes | |
const std::string | newPhraseString |
const std::string | importedString |
const std::string | mergedPhraseString |
const std::string | explodedPhraseString |
Friends | |
class | Phrase |
A list of within a certain Song.
|
Creates an empty PhraseList |
|
The destructor: all contained in the PhraseList will also be deleted. |
|
Returns the number of in the PhraseList.
|
|
Returns the Phrase at positon n The value returned for an index that is out of range is undefined. The size method describes the valid values.
|
|
Returns the Phrase with the given title.
|
|
Returns the index of the given Phrase. If the Phrase is no in the PhraseList, returns the value of size().
|
|
Deletes the Phrase (consequently removing it from the PhraseList). If the Phrase is not in the PhraseList no error is raised. It is also safe to just delete a Phrase through a pointer to it. However, that's a little 'unconventional'.
|
|
Removes the Phrase from the PhraseList but does not delete it. Note that this leaves you with a pretty useless Phrase. You cannot use it in a Part. Any Part objects that were using the Phrase will reset their Phrase reference. The only way to make the Phrase useful again is to insert it back into a PhraseList. Once you have removed a Phrase from the PhraseList it is no longer owned by the PhraseList, and it is your responsibility to delete it. If the specified Phrase is not in the PhraseList then no error is raised.
|
|
Inserts an unparented Phrase back into the PhraseList. Throws if there is already a Phrase with that name in the PhraseList. You cannot insert a Phrase with no title - the same exception will be thrown. This causes the Phrase to be 'owned' by the PhraseList, it will be deleted when the PhraseList is deleted.
|
|
Returns a Phrase name based on the given base string that is guaranteed to not be used by any Phrase in this PhraseList. If the base name already exists in the PhraseList, a unique variant of it will be returned (by appending a number).
|
|
Reimplemented from TSE3::PhraseListener. |
|
|
|
Reimplemented from TSE3::Serializable. |
|
NOTE: The PhraseList actually loads the Phrase object chunks. Reimplemented from TSE3::Serializable. |
|
|
|
The base name to use when creating a new Phrase.
|
|
The base name to use when creating a new Phrase that has been imported.
|
|
The base name to use when creating a new Phrase that has been merged into the PhraseList.
|
|
The base name to use when creating a new Phrase that has been 'exploded' by a Phrase Utility.
|