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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>MySQL++ Reference Manual</title>
<meta http-equiv="Content-type" content="text/html;charset=iso-8859-1">
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="refman.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li id="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul></div>
<div class="nav">
<b>mysqlpp</b>::<a class="el" href="classmysqlpp_1_1OptionalExceptions.html">OptionalExceptions</a></div>
<h1>mysqlpp::OptionalExceptions Class Reference</h1><!-- doxytag: class="mysqlpp::OptionalExceptions" -->Interface allowing a class to have optional exceptions.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="noexceptions_8h-source.html">noexceptions.h</a>></code>
<p>
Inheritance diagram for mysqlpp::OptionalExceptions:<p><center><img src="classmysqlpp_1_1OptionalExceptions__inherit__graph.png" border="0" usemap="#mysqlpp_1_1OptionalExceptions__inherit__map" alt="Inheritance graph"></center>
<map name="mysqlpp_1_1OptionalExceptions__inherit__map">
<area href="classmysqlpp_1_1Connection.html" shape="rect" coords="5,81,165,105" alt="">
<area href="classmysqlpp_1_1Query.html" shape="rect" coords="189,81,315,105" alt="">
<area href="classmysqlpp_1_1ResultBase.html" shape="rect" coords="339,81,496,105" alt="">
<area href="classmysqlpp_1_1Row.html" shape="rect" coords="520,81,635,105" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classmysqlpp_1_1OptionalExceptions-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#45a3e93f56716abf10704419b5ba4f31">OptionalExceptions</a> (bool e=true)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#45a3e93f56716abf10704419b5ba4f31"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e97334b7e5f89c1927c5d277b770db0a"></a><!-- doxytag: member="mysqlpp::OptionalExceptions::~OptionalExceptions" ref="e97334b7e5f89c1927c5d277b770db0a" args="()" -->
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#e97334b7e5f89c1927c5d277b770db0a">~OptionalExceptions</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="da38946e3352da3fa90ba57e9b6a9c18"></a><!-- doxytag: member="mysqlpp::OptionalExceptions::enable_exceptions" ref="da38946e3352da3fa90ba57e9b6a9c18" args="() const " -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#da38946e3352da3fa90ba57e9b6a9c18">enable_exceptions</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enable exceptions from the object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5c18f4a1da49f55652fbd8840cd67d82"></a><!-- doxytag: member="mysqlpp::OptionalExceptions::disable_exceptions" ref="5c18f4a1da49f55652fbd8840cd67d82" args="() const " -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#5c18f4a1da49f55652fbd8840cd67d82">disable_exceptions</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Disable exceptions from the object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6231a5e3fd15fd5ecc4c74785b8c4514"></a><!-- doxytag: member="mysqlpp::OptionalExceptions::throw_exceptions" ref="6231a5e3fd15fd5ecc4c74785b8c4514" args="() const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#6231a5e3fd15fd5ecc4c74785b8c4514">throw_exceptions</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if exceptions are enabled. <br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#0273012228b9e6889908a6a93aa47973">set_exceptions</a> (bool e) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the exception state to a particular value. <a href="#0273012228b9e6889908a6a93aa47973"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c41c56580e33a404b4f43f38f26bea82"></a><!-- doxytag: member="mysqlpp::OptionalExceptions::NoExceptions" ref="c41c56580e33a404b4f43f38f26bea82" args="" -->
class </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#c41c56580e33a404b4f43f38f26bea82">NoExceptions</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Declare <a class="el" href="classmysqlpp_1_1NoExceptions.html">NoExceptions</a> to be our friend so it can access our protected functions. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Interface allowing a class to have optional exceptions.
<p>
A class derives from this one to acquire a standard interface for disabling exceptions, possibly only temporarily. By default, exceptions are enabled.<p>
Note that all methods are const even though some of them change our internal flag indicating whether exceptions should be thrown. This is justifiable because this is just an interface class, and it changes the behavior of our subclass literally only in exceptional conditions. This Jesuitical interpretation of "const" is required because you may want to disable exceptions on const subclass instances.<p>
If it makes you feel better about this, consider that the real change isn't within the const <a class="el" href="classmysqlpp_1_1OptionalExceptions.html">OptionalExceptions</a> subclass instance. What changes is the code wrapping the method call on that instance that can optionally throw an exception. This outside code is in a better position to say what "const" means than the subclass instance.
<p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="45a3e93f56716abf10704419b5ba4f31"></a><!-- doxytag: member="mysqlpp::OptionalExceptions::OptionalExceptions" ref="45a3e93f56716abf10704419b5ba4f31" args="(bool e=true)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">mysqlpp::OptionalExceptions::OptionalExceptions </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>e</em> = <code>true</code> </td>
<td> ) </td>
<td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Default constructor.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>e</em> </td><td>if true, exceptions are enabled (this is the default) </td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="0273012228b9e6889908a6a93aa47973"></a><!-- doxytag: member="mysqlpp::OptionalExceptions::set_exceptions" ref="0273012228b9e6889908a6a93aa47973" args="(bool e) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void mysqlpp::OptionalExceptions::set_exceptions </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>e</em> </td>
<td> ) </td>
<td width="100%"> const<code> [inline, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the exception state to a particular value.
<p>
This method is protected because it is only intended for use by subclasses' copy constructors and the like.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="noexceptions_8h-source.html">noexceptions.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Thu Jun 3 11:59:12 2010 for MySQL++ by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>
|