Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Core Class Reference

CORE : Class managing the core. More...

#include <core.h>

+ Collaboration diagram for Core:

Public Member Functions

 Core (ProjectManagerAdapter *projectManager, AudioRecorderAdapter *recorderAdapter, AudioPlayerAdapter *playerAdapter, Log *log=new Log())
 Core constructor. More...
 
 ~Core ()
 Core destructor, calls stop and exit. More...
 
void init (CoreInitialisationAdapter *initAdapter)
 Core initialization. More...
 
void exit ()
 Thus function calls exit() of all components that were initialized. More...
 
void start ()
 Start the core. More...
 
void stop ()
 Stop the core. More...
 
bool isInitialized () const
 Function telling wether the core is already initialized. More...
 
ProjectManagerAdaptergetProjectManager ()
 
AudioRecorderAdaptergetAudioRecorder ()
 
AudioPlayerAdaptergetAudioPlayer ()
 
PianoManagergetPianoManager ()
 
MidiAdaptergetMidiInterface ()
 

Private Attributes

bool mInitialized
 
std::unique_ptr
< ProjectManagerAdapter
mProjectManager
 
AudioRecorderAdaptermRecorderAdapter
 
AudioPlayerAdaptermPlayerAdapter
 
SoundGenerator mSoundGenerator
 
RecordingManager mRecordingManager
 
SignalAnalyzer mSignalAnalyzer
 
PianoManager mPianoManager
 
std::shared_ptr< MidiAdaptermMidi
 

Detailed Description

CORE : Class managing the core.

The core comprises all components of the EPT which are independent of the GUI. The GUI is connected by impementing a number of virtual adapters.

Definition at line 45 of file core.h.

Constructor & Destructor Documentation

Core::Core ( ProjectManagerAdapter projectManager,
AudioRecorderAdapter recorderAdapter,
AudioPlayerAdapter playerAdapter,
Log log = new Log() 
)

Core constructor.

Parameters
projectManager: Pointer to the project manager
recorderAdapter: Pointer to the recorder adapter
playerAdapter: Pointer to the player adapter
log: Pointer to the system log

Definition at line 45 of file core.cpp.

+ Here is the call graph for this function:

Core::~Core ( )

Core destructor, calls stop and exit.

Definition at line 71 of file core.cpp.

+ Here is the call graph for this function:

Member Function Documentation

void Core::exit ( )

Thus function calls exit() of all components that were initialized.

Definition at line 146 of file core.cpp.

+ Here is the call graph for this function:

AudioPlayerAdapter* Core::getAudioPlayer ( )
inline

Definition at line 66 of file core.h.

AudioRecorderAdapter* Core::getAudioRecorder ( )
inline

Definition at line 65 of file core.h.

MidiAdapter* Core::getMidiInterface ( )
inline

Definition at line 68 of file core.h.

PianoManager* Core::getPianoManager ( )
inline

Definition at line 67 of file core.h.

ProjectManagerAdapter* Core::getProjectManager ( )
inline

Definition at line 64 of file core.h.

void Core::init ( CoreInitialisationAdapter initAdapter)

Core initialization.

On startup the core components have to be initialized by calling this function. Since the user has should see that something happens, a message box with a progress bar will be shown. The handling of this message box is carried out by the initialization adapter passed here as a pointer.

Parameters
initAdapter: Pointer to the initialization adapter

Definition at line 95 of file core.cpp.

+ Here is the call graph for this function:

bool Core::isInitialized ( ) const
inline

Function telling wether the core is already initialized.

Definition at line 61 of file core.h.

void Core::start ( )

Start the core.

Start all members which are running while the core is up.

Definition at line 172 of file core.cpp.

+ Here is the call graph for this function:

void Core::stop ( )

Stop the core.

Stop core components when stopping the core.

Definition at line 191 of file core.cpp.

+ Here is the call graph for this function:

Member Data Documentation

bool Core::mInitialized
private

Definition at line 71 of file core.h.

std::shared_ptr<MidiAdapter> Core::mMidi
private

Definition at line 79 of file core.h.

PianoManager Core::mPianoManager
private

Definition at line 78 of file core.h.

AudioPlayerAdapter* Core::mPlayerAdapter
private

Definition at line 74 of file core.h.

std::unique_ptr<ProjectManagerAdapter> Core::mProjectManager
private

Definition at line 72 of file core.h.

AudioRecorderAdapter* Core::mRecorderAdapter
private

Definition at line 73 of file core.h.

RecordingManager Core::mRecordingManager
private

Definition at line 76 of file core.h.

SignalAnalyzer Core::mSignalAnalyzer
private

Definition at line 77 of file core.h.

SoundGenerator Core::mSoundGenerator
private

Definition at line 75 of file core.h.


The documentation for this class was generated from the following files: