Files
stk/doc/html/RtError_8h-source.html
2013-09-29 23:38:16 +02:00

66 lines
5.0 KiB
HTML

<HTML>
<HEAD>
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<img src="princeton.gif"> &nbsp; <img src="ccrma.gif"> &nbsp; <img src="mcgill.gif"><P>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="information.html">Information</a> &nbsp; <a class="qindex" href="classes.html">Classes</a> &nbsp; <a class="qindex" href="download.html">Download</a> &nbsp; <a class="qindex" href="usage.html">Usage</a> &nbsp; <a class="qindex" href="maillist.html">Mail List</a> &nbsp; <a class="qindex" href="system.html">Requirements</a> &nbsp; <a class="qindex" href="links.html">Links</a> &nbsp; <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
<HR>
<!-- Generated by Doxygen 1.3.4 -->
<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#w11">00022</a> <span class="keyword">enum</span> <a class="code" href="classRtError.html#w11">Type</a> {
00023 <a class="code" href="classRtError.html#w11w0">WARNING</a>,
00024 <a class="code" href="classRtError.html#w11w1">DEBUG_WARNING</a>,
00025 <a class="code" href="classRtError.html#w11w2">UNSPECIFIED</a>,
00026 <a class="code" href="classRtError.html#w11w3">NO_DEVICES_FOUND</a>,
00027 <a class="code" href="classRtError.html#w11w4">INVALID_DEVICE</a>,
00028 <a class="code" href="classRtError.html#w11w5">INVALID_STREAM</a>,
00029 <a class="code" href="classRtError.html#w11w6">MEMORY_ERROR</a>,
00030 <a class="code" href="classRtError.html#w11w7">INVALID_PARAMETER</a>,
00031 <a class="code" href="classRtError.html#w11w8">DRIVER_ERROR</a>,
00032 <a class="code" href="classRtError.html#w11w9">SYSTEM_ERROR</a>,
00033 <a class="code" href="classRtError.html#w11w10">THREAD_ERROR</a>
00034 };
00035
00036 <span class="keyword">protected</span>:
00037 std::string message_;
00038 <a class="code" href="classRtError.html#w11">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::cerr &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#w11">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
<a name="l00057"></a><a class="code" href="classRtError.html#a5">00057</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classRtError.html#a5">getMessageString</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> message_.c_str(); }
00058 };
00059
00060 <span class="preprocessor">#endif</span>
</pre></div><HR>
<table>
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
<tr><td>&copy;1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
</table>
</BODY>
</HTML>