|
|
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.
See also: TSE3
Application (const std::string &appname,
const std::string &appversion,
TSE3::MidiSchedulerFactory *msf,
const std::string &choicesFile = "")
| Application |
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. |
~Application ()
| ~Application |
Any Song objects 'managed' by the application will be deleted.
const std::string & appName ()
| appName |
[const]
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 & appVersion ()
| appVersion |
[const]
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 * metronome ()
| metronome |
[const]
Returns a pointer to the Metronome object used in this application.
TSE3::Transport * transport ()
| transport |
[const]
Returns a pointer to the Transport object used in this application.
TSE3::MidiScheduler * scheduler ()
| scheduler |
[const]
Returns a pointer to the MidiScheduler object used in this application. This has been created from the MidiSchedulerFactory object passed to the constructor.
ChoicesManager * choicesManager ()
| choicesManager |
[const]
Returns a pointer to the ChoicesManager.
Record * record ()
| record |
[const]
Returns a pointer to the Application's Record object. This object is only created when it's needed.
TSE3::Ins::Destination * destination ()
| destination |
[const]
Returns the TSE3::Ins::Destintation object used in this application.
TSE3::PresetColours * presetColours ()
| presetColours |
[const]
Returns the TSE3::PresetColours object used in this application.
bool saveChoicesOnDestroy ()
| saveChoicesOnDestroy |
[const]
Sets whether choices are saved on destruction or not.
See also: setSaveChoicesOnDestroy
void setSaveChoicesOnDestroy (bool s)
| setSaveChoicesOnDestroy |
Returns whether choices are saved on destruction.
See also: saveChoicesOnDestroy
void saveChoices (const std::string &filename = "")
| saveChoices |
Saves the current choices to the given filename. If no filename is supplied then the default one is used.
TSE3::Song * addSong (TSE3::Song *song = 0)
| addSong |
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 numSongs ()
| numSongs |
[const]
Returns the number of TSE3::Song objects being managed by this Application.
TSE3::Cmd::CommandHistory * history (TSE3::Song *song)
| history |
Returns the CommandHistory object associated with this Song.
Parameters:
song | TSE3::Song to get history object for. |
void Notifier_Deleted (TSE3::Song *song)
| Notifier_Deleted |
[virtual]
Reimplemented from Listener for internal purposes..
std::string _appname | _appname |
[protected]
std::string _appversion | _appversion |
[protected]
std::string _choicesFile | _choicesFile |
[protected]
TSE3::Metronome * _metronome | _metronome |
[protected]
TSE3::Transport * _transport | _transport |
[protected]
TSE3::MidiScheduler * _scheduler | _scheduler |
[protected]
ChoicesManager * _cm | _cm |
[protected]
Record * _record | _record |
[protected]
TSE3::Ins::Destination * _destination | _destination |
[protected]
TSE3::PresetColours * _presetColours | _presetColours |
[protected]
bool _saveChoicesOnDestroy | _saveChoicesOnDestroy |
[protected]
std::vector<TSE3::Song *> songs | songs |
[protected]
std::map<TSE3::Song *, TSE3::Cmd::CommandHistory *> histories | histories |
[protected]