Canorus
0.7
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
rtmidi
RtError.h
Go to the documentation of this file.
1
/************************************************************************/
10
/************************************************************************/
11
12
#ifndef RTERROR_H
13
#define RTERROR_H
14
15
#include <iostream>
16
#include <string>
17
18
class
RtError
19
{
20
public
:
22
enum
Type
{
23
WARNING
,
24
DEBUG_WARNING
,
25
UNSPECIFIED
,
26
NO_DEVICES_FOUND
,
27
INVALID_DEVICE
,
28
INVALID_STREAM
,
29
MEMORY_ERROR
,
30
INVALID_PARAMETER
,
31
DRIVER_ERROR
,
32
SYSTEM_ERROR
,
33
THREAD_ERROR
34
};
35
36
protected
:
37
std::string
message_
;
38
Type
type_
;
39
40
public
:
42
RtError
(
const
std::string& message,
Type
type =
RtError::UNSPECIFIED
) :
message_
(message),
type_
(type) {}
43
45
virtual
~RtError
(
void
) {};
46
48
virtual
void
printMessage
(
void
) { std::cerr <<
'\n'
<<
message_
<<
"\n\n"
; }
49
51
virtual
const
Type
&
getType
(
void
) {
return
type_
; }
52
54
virtual
const
std::string&
getMessage
(
void
) {
return
message_
; }
55
57
virtual
const
char
*
getMessageString
(
void
) {
return
message_
.c_str(); }
58
};
59
60
#endif
Generated on Fri Jan 11 2013 14:40:12 for Canorus by
1.8.3