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

TSE3::App::Application Class Reference

Support class providing core TSE3 application functionality. More...

#include <Application.h>

Inheritance diagram for TSE3::App::Application:

Inheritance graph
[legend]
Collaboration diagram for TSE3::App::Application:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Application (const std::string &appname, const std::string &appversion, TSE3::MidiSchedulerFactory *msf, const std::string &choicesFile="")
 ~Application ()
const std::string & appName () const
const std::string & appVersion () const
TSE3::Metronomemetronome () const
TSE3::Transporttransport () const
TSE3::MidiSchedulerscheduler () const
ChoicesManagerchoicesManager () const
Recordrecord () const
TSE3::Ins::Destinationdestination () const
TSE3::PresetColourspresetColours () const
bool saveChoicesOnDestroy () const
void setSaveChoicesOnDestroy (bool s)
void saveChoices (const std::string &filename="")
TSE3::SongaddSong (TSE3::Song *song=0)
size_t numSongs () const
TSE3::Cmd::CommandHistoryhistory (TSE3::Song *song)
virtual void Notifier_Deleted (TSE3::Song *song)

Protected Attributes

std::string _appname
std::string _appversion
std::string _choicesFile
TSE3::Metronome_metronome
TSE3::Transport_transport
TSE3::MidiScheduler_scheduler
ChoicesManager_cm
Record_record
TSE3::Ins::Destination_destination
TSE3::PresetColours_presetColours
bool _saveChoicesOnDestroy
std::vector< TSE3::Song * > songs
std::map< TSE3::Song *, TSE3::Cmd::CommandHistory * > histories

Detailed Description

Support class providing core TSE3 application functionality.

This class provides the GUI independant core functionality of a sequencer application based upon the TSE3 library.

The functionality provided by this class includes:

This class is used as a singleton.

Author:
Pete Goodliffe
Version:
1.00
See also:
TSE3


Constructor & Destructor Documentation

TSE3::App::Application::Application const std::string &  appname,
const std::string &  appversion,
TSE3::MidiSchedulerFactory msf,
const std::string &  choicesFile = ""
 

Create the application.

Parameters:
appname The appname supplied is the name of this application. Any use of the application name should access it from this object in future.
appversion A string containing the application version number.
msf A factory use to generate a MidiScheduler.
choicesFile The name of the file that choices are loaded from on startup, and saved to by default. You will conventionally want this to be something like "$HOME/.tse3". If you specify no choicesFile then no default choices loading/saving will be performed.

TSE3::App::Application::~Application  ) 
 

Any Song objects 'managed' by the application will be deleted.


Member Function Documentation

const std::string& TSE3::App::Application::appName  )  const [inline]
 

Returns the application's name.

If you need to quote the application's name at some point in your code, use the Application::name() method, rather than hardcoding a string constant.

const std::string& TSE3::App::Application::appVersion  )  const [inline]
 

Returns the application's version.

If you need to quote the application's version at some point in your code, use the Application::name() method, rather than hardcoding a string constant.

TSE3::Metronome* TSE3::App::Application::metronome  )  const [inline]
 

Returns a pointer to the Metronome object used in this application.

TSE3::Transport* TSE3::App::Application::transport  )  const [inline]
 

Returns a pointer to the Transport object used in this application.

TSE3::MidiScheduler* TSE3::App::Application::scheduler  )  const [inline]
 

Returns a pointer to the MidiScheduler object used in this application. This has been created from the MidiSchedulerFactory object passed to the constructor.

ChoicesManager* TSE3::App::Application::choicesManager  )  const [inline]
 

Returns a pointer to the ChoicesManager.

Record* TSE3::App::Application::record  )  const
 

Returns a pointer to the Application's Record object. This object is only created when it's needed.

TSE3::Ins::Destination* TSE3::App::Application::destination  )  const [inline]
 

Returns the object used in this application.

TSE3::PresetColours* TSE3::App::Application::presetColours  )  const [inline]
 

Returns the TSE3::PresetColours object used in this application.

bool TSE3::App::Application::saveChoicesOnDestroy  )  const [inline]
 

Sets whether choices are saved on destruction or not.

See also:
setSaveChoicesOnDestroy

void TSE3::App::Application::setSaveChoicesOnDestroy bool  s  ) 
 

Returns whether choices are saved on destruction.

See also:
saveChoicesOnDestroy

void TSE3::App::Application::saveChoices const std::string &  filename = ""  ) 
 

Saves the current choices to the given filename. If no filename is supplied then the default one is used.

TSE3::Song* TSE3::App::Application::addSong TSE3::Song song = 0  ) 
 

Add a new TSE3::Song to the Application object. If you don't specify a TSE3::Song, then a new TSE3::Song will be created.

You can remove the TSE3::Song by simply deleting it.

Parameters:
song TSE3::Song to add, or zero to create a new one.
Returns:
Pointer to the TSE3::Song that has been added (useful if song was zero).

size_t TSE3::App::Application::numSongs  )  const
 

Returns the number of TSE3::Song objects being managed by this Application.

TSE3::Cmd::CommandHistory* TSE3::App::Application::history TSE3::Song song  ) 
 

Returns the object associated with this Song.

Parameters:
song TSE3::Song to get history object for.

virtual void TSE3::App::Application::Notifier_Deleted TSE3::Song song  )  [virtual]
 


Member Data Documentation

std::string TSE3::App::Application::_appname [protected]
 

std::string TSE3::App::Application::_appversion [protected]
 

std::string TSE3::App::Application::_choicesFile [protected]
 

TSE3::Metronome* TSE3::App::Application::_metronome [protected]
 

TSE3::Transport* TSE3::App::Application::_transport [protected]
 

TSE3::MidiScheduler* TSE3::App::Application::_scheduler [protected]
 

ChoicesManager* TSE3::App::Application::_cm [protected]
 

Record* TSE3::App::Application::_record [protected]
 

TSE3::Ins::Destination* TSE3::App::Application::_destination [protected]
 

TSE3::PresetColours* TSE3::App::Application::_presetColours [protected]
 

bool TSE3::App::Application::_saveChoicesOnDestroy [protected]
 

std::vector<TSE3::Song *> TSE3::App::Application::songs [protected]
 

std::map<TSE3::Song *, TSE3::Cmd::CommandHistory *> TSE3::App::Application::histories [protected]
 


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