class ChoicesManager

Choices file saving management. More...

Full nameTSE3::App::ChoicesManager
Definition#include <Choices.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

This class provides a mechanism for saving 'choices'. These are the configuration aspects of any objects in the TSE3 sequencer application.

It employs the singleton design pattern.

The format of a choices file is the blocked TSE3MDL format.

See also: TSE3

 ChoicesManager ()

ChoicesManager

 ~ChoicesManager ()

~ChoicesManager

void  add (ChoiceHandler *ch)

add

Add a new ChoiceHandler to the manager. This ties the object's lifecycle to the ChoicesManager; if it is not removed then the destruction of this object will bring about the destruction of the added ChoiceHandler.

void  remove (ChoiceHandler *ch)

remove

Remove the ChoiceHandler from the manager. The ChoiceHandler's life is not tied to the manager's any more.

void  save (const std::string &filename)

save

This method steps through each ChoiceHandler registered and requests that it saves it's choices in the appropriate file format.

void  load (const std::string &filename)

load

This method reads and interprets the given choices file. It reads each block and then intructs the appropriate ChoiceHandler to perform the necessary settings based on it.

If the file doesn't exist then no error is thrown.