Main Page   Class Hierarchy   Compound List   File List   Compound Members  

VowelSet Class Reference

#include <VowelManager.h>

List of all members.

Public Member Functions

 VowelSet (const char *name="SetName")
 ~VowelSet (void)
 VowelSet (VowelSet &source)
bool load (fstream &fs, AudioPreprocessing &prep, void(*cback)(void *)=NULL, void *user=NULL)
void save (fstream &fs)
void setName (const char *name)
bool addSample (VowelSample *sample)
bool addSample (const char *filename, AudioPreprocessing &prep)
bool removeSample (VowelSample *sample)
void clearList (void)
VowelSamplefindSample (const char *filename)
vector< VowelSample * > & getSampleList (void)

Public Attributes

char * name

Private Attributes

vector< VowelSample * > vowels

Detailed Description

VowelSet class, management of multiple VowelSample elements.

Constructor & Destructor Documentation

VowelSet::VowelSet const char *    name = "SetName"

Basic constructor.

name The name of the set, optionally given. The name is pointer-copied, so we steal a pointer here.

VowelSet::~VowelSet void   

Standard destructor.

VowelSet::VowelSet VowelSet &    source

Copy constructor.

source Source object to be copied.

Member Function Documentation

bool VowelSet::addSample const char *    filename,
AudioPreprocessing   prep

Add a sample to the set from AU file.

filename Filename of the AU file to open and add to the set.
prep The AudioPreprocessor template to use for conversion to a VowelSample. It is copied to a new processor, so its internal state is preserved.
True on success, otherwise false.

bool VowelSet::addSample VowelSample   sample

Add a sample to the set.

sample The sample to be added to the list. Note that no dupe checking takes place, so its possible to add the same sample multiple times.
True on success, otherwise false.

void VowelSet::clearList void   

Clear the entire sample list.

VowelSample * VowelSet::findSample const char *    filename

Find the Sample containing data for a specific filename

filename for search
VowelSample containing data for filename, NULL if unknown

vector< VowelSample * > & VowelSet::getSampleList void   

Get the entire list of samples stored in this set.

The list of samples in this set.

bool VowelSet::load fstream &    fs,
AudioPreprocessing   prep,
void(*    cback)(void *) = NULL,
void *    user = NULL

Load method.

Note that this method destructs all previous samples automatically.

fs The file stream the set will be created from.
prep The audio preprocessing template used to process all the samples.
cback An optional callback function called after each imported sample. As the import process can take a while, you can use it to update events and the like.
user An optional parameter passed to the callback function.
True on success, false on failure.

bool VowelSet::removeSample VowelSample   sample

Remove a sample from the set.

Note: Does not delete the sample object itself.

sample The sample that will be removed in case its in the list. When multiple samples of the same type are in the list, only the first occurance will be removed.
Return true in case it was removed, otherwise return false.

void VowelSet::save fstream &    fs

Save method.

fs The file stream the set will be saved to.

void VowelSet::setName const char *    name

Set the name of the set.

name The new name of the set.

Member Data Documentation

char* VowelSet::name

The name of this set. Ensured not to be NULL at any time.

vector<VowelSample *> VowelSet::vowels [private]

The list of vowels stored in this set.

The documentation for this class was generated from the following files:
Generated on Mon Feb 24 19:37:47 2003 by doxygen1.3-rc3