summaryrefslogtreecommitdiff
path: root/doc/html/RtError_8h-source.html
blob: db0f4cedf2435379bf22dfa0ccdd3cf15c2517ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<HTML>
<HEAD>
<TITLE>The RtMidi Tutorial</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<a class="qindex" href="index.html">Tutorial</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
<!-- Generated by Doxygen 1.3-rc3 -->
<h1>RtError.h</h1><div class="fragment"><pre>00001 <span class="comment">/************************************************************************/</span>
00010 <span class="comment">/************************************************************************/</span>
00011 
00012 <span class="preprocessor">#ifndef RTERROR_H</span>
00013 <span class="preprocessor"></span><span class="preprocessor">#define RTERROR_H</span>
00014 <span class="preprocessor"></span>
00015 <span class="preprocessor">#include &lt;iostream&gt;</span>
00016 <span class="preprocessor">#include &lt;string&gt;</span>
00017 
<a name="l00018"></a><a class="code" href="classRtError.html">00018</a> <span class="keyword">class </span><a class="code" href="classRtError.html">RtError</a>
00019 {
00020 <span class="keyword">public</span>:
<a name="l00022"></a><a class="code" href="classRtError.html#s11">00022</a>   <span class="keyword">enum</span> <a class="code" href="classRtError.html#s11">Type</a> {
00023     WARNING,
00024     DEBUG_WARNING,
00025     UNSPECIFIED,
00026     NO_DEVICES_FOUND,
00027     INVALID_DEVICE,
00028     INVALID_STREAM,
00029     MEMORY_ERROR,
00030     INVALID_PARAMETER,
00031     DRIVER_ERROR,
00032     SYSTEM_ERROR,
00033     THREAD_ERROR
00034   };
00035 
00036 <span class="keyword">protected</span>:
00037   std::string message_;
00038   <a class="code" href="classRtError.html#s11">Type</a> type_;
00039 
00040 <span class="keyword">public</span>:
<a name="l00042"></a><a class="code" href="classRtError.html#a0">00042</a>   <a class="code" href="classRtError.html#a0">RtError</a>(<span class="keyword">const</span> std::string&amp; message, Type type = RtError::UNSPECIFIED) : message_(message), type_(type) {}
00043 
<a name="l00045"></a><a class="code" href="classRtError.html#a1">00045</a>   <span class="keyword">virtual</span> <a class="code" href="classRtError.html#a1">~RtError</a>(<span class="keywordtype">void</span>) {}
00046 
<a name="l00048"></a><a class="code" href="classRtError.html#a2">00048</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtError.html#a2">printMessage</a>(<span class="keywordtype">void</span>) { std::cout &lt;&lt; <span class="charliteral">'\n'</span> &lt;&lt; message_ &lt;&lt; <span class="stringliteral">"\n\n"</span>; }
00049 
<a name="l00051"></a><a class="code" href="classRtError.html#a3">00051</a>   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classRtError.html#s11">Type</a>&amp; <a class="code" href="classRtError.html#a3">getType</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> type_; }
00052 
<a name="l00054"></a><a class="code" href="classRtError.html#a4">00054</a>   <span class="keyword">virtual</span> <span class="keyword">const</span> std::string&amp; <a class="code" href="classRtError.html#a4">getMessage</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> message_; }
00055 };
00056 
00057 <span class="preprocessor">#endif</span>
</pre></div><HR>

<table><tr><td><img src="../images/mcgill.gif" width=165></td>
  <td>&copy;2003-2004 Gary P. Scavone, McGill University. All Rights Reserved.<br>
  Maintained by Gary P. Scavone, gary at music.mcgill.ca</td></tr>
</table>

</BODY>
</HTML>