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
CoreInitialisationAdapter Class Referenceabstract

Core initialization adapter (singleton class). More...

#include <coreinitialisationadapter.h>

+ Inheritance diagram for CoreInitialisationAdapter:

Public Member Functions

 CoreInitialisationAdapter ()
 Singleton constructor. Resets the unique pointer to the only instance of the class. More...
 
virtual void create ()=0
 Create the initialization dialog box. More...
 
virtual void destroy ()=0
 Destroy the initialization dialog box. More...
 
virtual void updateProgress (int percentage)=0
 Show the current progress as a progress bar in the initialization message box. More...
 

Static Private Attributes

static std::unique_ptr
< CoreInitialisationAdapter
mSingleton
 CoreInitialisationAdapter::mSingleton. More...
 

Detailed Description

Core initialization adapter (singleton class).

This adapter is part of the interface between the core and the GUI. The purpose of this adapter and its derived implementation in the GUI is to show a message box during the initialization process of the main application. Moreover, it informs about the progress of the initialization process in regular intervals by showing an advancing progress bar.

The class is reimplemented in Qt as QtCoreInitialisation (see initializediagol.h). It is instantiated in tunerapplication.cpp and passed via pointer to init(...) of the core. The core itself calls create(), performs the initialization and calls the function updateProgress between all the steps. Finally the core calls destroy().

See also
QtCoreInitialisation

Definition at line 49 of file coreinitialisationadapter.h.

Constructor & Destructor Documentation

CoreInitialisationAdapter::CoreInitialisationAdapter ( )

Singleton constructor. Resets the unique pointer to the only instance of the class.

Definition at line 46 of file coreinitialisationadapter.cpp.

Member Function Documentation

virtual void CoreInitialisationAdapter::create ( )
pure virtual

Create the initialization dialog box.

Implemented in QtCoreInitialisation.

virtual void CoreInitialisationAdapter::destroy ( )
pure virtual

Destroy the initialization dialog box.

Implemented in QtCoreInitialisation.

virtual void CoreInitialisationAdapter::updateProgress ( int  percentage)
pure virtual

Show the current progress as a progress bar in the initialization message box.

Parameters
percentage: Percentage of progress between 0 and 100

Implemented in QtCoreInitialisation.

Member Data Documentation

std::unique_ptr< CoreInitialisationAdapter > CoreInitialisationAdapter::mSingleton
staticprivate

CoreInitialisationAdapter::mSingleton.

This is a unique pointer belonging to the CoreInitializationAdapter and pointing onto itself. It holds the only instance of the CoreInitializationAdapter, which is defined as a singleton class.

Definition at line 52 of file coreinitialisationadapter.h.


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