<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>/include/ZE_ZError.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.3-rc2 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> <hr><h1>/include/ZE_ZError.h</h1><a href="ZE__ZError_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*******************************************************************************</span> 00002 <span class="comment"> This file is Part of the ZEngine Library for 2D game development.</span> 00003 <span class="comment"> Copyright (C) 2002, 2003 James Turk</span> 00004 <span class="comment"></span> 00005 <span class="comment"> Licensed under a BSD-style license.</span> 00006 <span class="comment"></span> 00007 <span class="comment"> The maintainer of this library is James Turk (james@conceptofzero.net) </span> 00008 <span class="comment"> and the home of this Library is http://www.zengine.sourceforge.net</span> 00009 <span class="comment">*******************************************************************************/</span> 00010 00025 <span class="preprocessor">#ifndef __ze_zerror_h__</span> 00026 <span class="preprocessor"></span><span class="preprocessor">#define __ze_zerror_h__</span> 00027 <span class="preprocessor"></span> 00028 <span class="preprocessor">#include "<a class="code" href="ZE__Utility_8h.html">ZE_Utility.h</a>"</span> 00029 <span class="preprocessor">#include <string></span> 00030 <span class="keyword">using</span> <span class="keyword">namespace </span>std; 00031 00032 <span class="keyword">namespace </span>ZE 00033 { 00034 00036 <a name="l00040"></a><a class="code" href="namespaceZE.html#a24">00040</a> <span class="keyword">enum</span> <a class="code" href="namespaceZE.html#a24">ZErrorCode</a> 00041 { 00042 <a class="code" href="namespaceZE.html#a24a0">ZERR_NONE</a>, 00043 <a class="code" href="namespaceZE.html#a24a1">ZERR_SDL_INTERNAL</a>, 00044 <a class="code" href="namespaceZE.html#a24a2">ZERR_SDL_INIT</a>, 00045 <a class="code" href="namespaceZE.html#a24a3">ZERR_MIX_INIT</a>, 00046 <a class="code" href="namespaceZE.html#a24a4">ZERR_TTF_INIT</a>, 00047 <a class="code" href="namespaceZE.html#a24a5">ZERR_NET_INIT</a>, 00048 <a class="code" href="namespaceZE.html#a24a6">ZERR_VIDMODE</a>, 00049 <a class="code" href="namespaceZE.html#a24a7">ZERR_LOAD_IMAGE</a>, 00050 <a class="code" href="namespaceZE.html#a24a8">ZERR_LOAD_SOUND</a>, 00051 <a class="code" href="namespaceZE.html#a24a9">ZERR_LOAD_MUSIC</a>, 00052 <a class="code" href="namespaceZE.html#a24a10">ZERR_LOAD_FONT</a>, 00053 <a class="code" href="namespaceZE.html#a24a11">ZERR_NOIMAGE</a>, 00054 <a class="code" href="namespaceZE.html#a24a12">ZERR_NOSOUND</a>, 00055 <a class="code" href="namespaceZE.html#a24a13">ZERR_NOMUSIC</a>, 00056 <a class="code" href="namespaceZE.html#a24a14">ZERR_NOFONT</a>, 00057 <a class="code" href="namespaceZE.html#a24a15">ZERR_NOSOCKET</a>, 00058 <a class="code" href="namespaceZE.html#a24a16">ZERR_NET_CLIENT</a>, 00059 <a class="code" href="namespaceZE.html#a24a17">ZERR_NET_SERVER</a>, 00060 <a class="code" href="namespaceZE.html#a24a18">ZERR_LAST</a> 00061 }; 00062 <a name="l00069"></a><a class="code" href="classZE_1_1ZError.html">00069</a> <span class="keyword">class </span><a class="code" href="classZE_1_1ZError.html">ZError</a> 00070 { 00071 <span class="keyword">protected</span>: 00073 <span class="keyword">static</span> string *<a class="code" href="classZE_1_1ZError.html#q0">sErrorDesc</a>; <a name="l00075"></a><a class="code" href="classZE_1_1ZError.html#n0">00075</a> <a class="code" href="namespaceZE.html#a24">ZErrorCode</a> <a class="code" href="classZE_1_1ZError.html#n0">rCode</a>; <a name="l00077"></a><a class="code" href="classZE_1_1ZError.html#n1">00077</a> string <a class="code" href="classZE_1_1ZError.html#n1">rDescription</a>; <a name="l00079"></a><a class="code" href="classZE_1_1ZError.html#n2">00079</a> string <a class="code" href="classZE_1_1ZError.html#n2">rFilename</a>; <a name="l00081"></a><a class="code" href="classZE_1_1ZError.html#n3">00081</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classZE_1_1ZError.html#n3">rLine</a>; 00082 00083 <span class="keyword">public</span>: 00089 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZError.html#d0">CreateStringTable</a>(); 00090 00096 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZError.html#d1">DestroyStringTable</a>(); 00097 00107 <a class="code" href="classZE_1_1ZError.html#a0">ZError</a>(ZErrorCode code=ZERR_NONE, string desc=<span class="stringliteral">""</span>, string file=<span class="stringliteral">""</span>, <span class="keywordtype">int</span> line=0); 00108 00114 <span class="keyword">virtual</span> <a class="code" href="classZE_1_1ZError.html#a1">~ZError</a>(); 00115 00125 <span class="keywordtype">void</span> <a class="code" href="classZE_1_1ZError.html#a2">Create</a>(ZErrorCode code, string desc=<span class="stringliteral">""</span>, string file=<span class="stringliteral">""</span>, <span class="keywordtype">int</span> line=0); 00126 00128 <span class="comment">//Accessors//</span> 00130 <span class="comment"></span> 00137 <span class="comment"></span> <a class="code" href="namespaceZE.html#a24">ZErrorCode</a> <a class="code" href="classZE_1_1ZError.html#a3">Code</a>() <span class="keyword">const</span>; 00138 00144 string <a class="code" href="classZE_1_1ZError.html#a4">LogString</a>() <span class="keyword">const</span>; 00145 }; 00146 00147 } 00148 00149 <span class="preprocessor">#endif //__ze_zerror_h__</span> </pre></div><hr><address style="align: right;"><small>Generated on Sun Apr 27 22:34:35 2003 for ZEngine by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.3-rc2 </small></address> </body> </html>