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
Message Class Reference

The Message class. More...

#include <message.h>

+ Inheritance diagram for Message:

Public Types

enum  MessageTypes {
  MSG_CLEAR_RECORDING, MSG_RECORDING_STARTED, MSG_RECORDING_ENDED, MSG_SIGNAL_ANALYSIS_STARTED,
  MSG_SIGNAL_ANALYSIS_ENDED, MSG_FINAL_KEY, MSG_OPTIONS_CHANGED, MSG_CALCULATION_PROGRESS,
  MSG_CHANGE_TUNING_CURVE, MSG_FINAL_KEY_RECOGNIZED, MSG_KEY_DATA_CHANGED, MSG_KEY_SELECTION_CHANGED,
  MSG_MIDI_EVENT, MSG_MODE_CHANGED, MSG_NEW_FFT_CALCULATED, MSG_PRELIMINARY_KEY,
  MSG_PROJECT_FILE, MSG_RECORDER_ENERGY_CHANGED, MSG_STROBOSCOPE_EVENT, MSG_TUNING_DEVIATION
}
 Available message types: More...
 

Public Member Functions

 Message (MessageTypes type)
 Message constructor. More...
 
virtual ~Message ()
 Virtual destructor without function, can be overwritten in derived classes. More...
 
MessageTypes getType () const
 Get the message type of the message object. More...
 

Private Attributes

const MessageTypes mType
 Local variable holding the message type. More...
 

Detailed Description

The Message class.

An instance of this class represents a single message. Messages can be of different type, which are listed here in the enum below. For example, Message::MSG_CLEAR_RECORDING would be such a message type. The constructor Message(Message::MSG_CLEAR_RECORDING) would turn this into a message object. The message type of a message object cannot be changed during its lifetime.

See also: MessageHandler for sending and MessageListener for receiving messages.

Definition at line 43 of file message.h.

Member Enumeration Documentation

Available message types:

Enumerator
MSG_CLEAR_RECORDING 

called when the recording was cleared

MSG_RECORDING_STARTED 

keystroke recognized and recording started

MSG_RECORDING_ENDED 

recording ended

MSG_SIGNAL_ANALYSIS_STARTED 

analysis of the signal started

MSG_SIGNAL_ANALYSIS_ENDED 

analysis of the signal ended

MSG_FINAL_KEY 

final key information after recording

MSG_OPTIONS_CHANGED 

settings in the system options changed

MSG_CALCULATION_PROGRESS 

Message that progress of any kind was made by the calculator.

MSG_CHANGE_TUNING_CURVE 

Message that the tuning curve has been adapted.

MSG_FINAL_KEY_RECOGNIZED 

sent by KeyRecognizer if final FFT is ready

MSG_KEY_DATA_CHANGED 

data of a key changed

MSG_KEY_SELECTION_CHANGED 

Message that a key has been selected.

MSG_MIDI_EVENT 

new event from MIDI keyboard received

MSG_MODE_CHANGED 

Message that the operation mode has changed.

MSG_NEW_FFT_CALCULATED 

sent by SignalAnalyzer if FFT is ready

MSG_PRELIMINARY_KEY 

number of the key recognized during recording

MSG_PROJECT_FILE 

Message that a change was made with the current project file.

MSG_RECORDER_ENERGY_CHANGED 

recording input level has changed

MSG_STROBOSCOPE_EVENT 

stroboscope message

MSG_TUNING_DEVIATION 

tuning deviation curve has been updated

Definition at line 47 of file message.h.

Constructor & Destructor Documentation

Message::Message ( MessageTypes  type)
explicit

Message constructor.

This constructor is declared as an explicit one so that it cannot be called errorneously with integer arguments.

Parameters
type: Type of the message to be created (see enumeration above).

Definition at line 28 of file message.cpp.

Message::~Message ( )
virtual

Virtual destructor without function, can be overwritten in derived classes.

Definition at line 36 of file message.cpp.

Member Function Documentation

MessageTypes Message::getType ( ) const
inline

Get the message type of the message object.

Returns
Type ofthe message

Definition at line 88 of file message.h.

Member Data Documentation

const MessageTypes Message::mType
private

Local variable holding the message type.

After initialization during construction this cannot be changed.

Definition at line 94 of file message.h.


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