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 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
<!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">
</head>
<body>
<!-- Generated by Doxygen 1.8.5 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>mysqlpp</b></li><li class="navelem"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html">OptionalExceptions</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pro-methods">Protected Member Functions</a> |
<a href="#friends">Friends</a> |
<a href="classmysqlpp_1_1OptionalExceptions-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">mysqlpp::OptionalExceptions Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Interface allowing a class to have optional exceptions.
<a href="classmysqlpp_1_1OptionalExceptions.html#details">More...</a></p>
<p><code>#include <<a class="el" href="noexceptions_8h_source.html">noexceptions.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for mysqlpp::OptionalExceptions:</div>
<div class="dyncontent">
<div class="center"><img src="classmysqlpp_1_1OptionalExceptions__inherit__graph.png" border="0" usemap="#mysqlpp_1_1OptionalExceptions_inherit__map" alt="Inheritance graph"/></div>
<map name="mysqlpp_1_1OptionalExceptions_inherit__map" id="mysqlpp_1_1OptionalExceptions_inherit__map">
<area shape="rect" id="node2" href="classmysqlpp_1_1Connection.html" title="Manages the connection to the database server. " alt="" coords="246,76,391,103"/><area shape="rect" id="node6" href="classmysqlpp_1_1Query.html" title="A class for building and executing SQL queries. " alt="" coords="261,137,376,164"/><area shape="rect" id="node7" href="classmysqlpp_1_1ResultBase.html" title="Base class for StoreQueryResult and UseQueryResult. " alt="" coords="245,188,392,215"/><area shape="rect" id="node10" href="classmysqlpp_1_1Row.html" title="Manages rows from a result set. " alt="" coords="265,239,372,265"/><area shape="rect" id="node3" href="classmysqlpp_1_1TCPConnection.html" title="Specialization of Connection for TCP/IP. " alt="" coords="455,5,627,32"/><area shape="rect" id="node4" href="classmysqlpp_1_1UnixDomainSocketConnection.html" title="Specialization of Connection for Unix domain sockets. " alt="" coords="445,57,637,98"/><area shape="rect" id="node5" href="classmysqlpp_1_1WindowsNamedPipeConnection.html" title="Specialization of Connection for Windows named pipes. " alt="" coords="441,122,642,163"/><area shape="rect" id="node8" href="classmysqlpp_1_1StoreQueryResult.html" title="StoreQueryResult set type for "store" queries. " alt="" coords="450,188,633,215"/><area shape="rect" id="node9" href="classmysqlpp_1_1UseQueryResult.html" title="StoreQueryResult set type for "use" queries. " alt="" coords="453,239,629,265"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a45a3e93f56716abf10704419b5ba4f31"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#a45a3e93f56716abf10704419b5ba4f31">OptionalExceptions</a> (bool e=true)</td></tr>
<tr class="memdesc:a45a3e93f56716abf10704419b5ba4f31"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a45a3e93f56716abf10704419b5ba4f31">More...</a><br/></td></tr>
<tr class="separator:a45a3e93f56716abf10704419b5ba4f31"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae97334b7e5f89c1927c5d277b770db0a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae97334b7e5f89c1927c5d277b770db0a"></a>
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#ae97334b7e5f89c1927c5d277b770db0a">~OptionalExceptions</a> ()</td></tr>
<tr class="memdesc:ae97334b7e5f89c1927c5d277b770db0a"><td class="mdescLeft"> </td><td class="mdescRight">Destroy object. <br/></td></tr>
<tr class="separator:ae97334b7e5f89c1927c5d277b770db0a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ada38946e3352da3fa90ba57e9b6a9c18"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ada38946e3352da3fa90ba57e9b6a9c18"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#ada38946e3352da3fa90ba57e9b6a9c18">enable_exceptions</a> () const </td></tr>
<tr class="memdesc:ada38946e3352da3fa90ba57e9b6a9c18"><td class="mdescLeft"> </td><td class="mdescRight">Enable exceptions from the object. <br/></td></tr>
<tr class="separator:ada38946e3352da3fa90ba57e9b6a9c18"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5c18f4a1da49f55652fbd8840cd67d82"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c18f4a1da49f55652fbd8840cd67d82"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#a5c18f4a1da49f55652fbd8840cd67d82">disable_exceptions</a> () const </td></tr>
<tr class="memdesc:a5c18f4a1da49f55652fbd8840cd67d82"><td class="mdescLeft"> </td><td class="mdescRight">Disable exceptions from the object. <br/></td></tr>
<tr class="separator:a5c18f4a1da49f55652fbd8840cd67d82"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6231a5e3fd15fd5ecc4c74785b8c4514"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6231a5e3fd15fd5ecc4c74785b8c4514"></a>
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#a6231a5e3fd15fd5ecc4c74785b8c4514">throw_exceptions</a> () const </td></tr>
<tr class="memdesc:a6231a5e3fd15fd5ecc4c74785b8c4514"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if exceptions are enabled. <br/></td></tr>
<tr class="separator:a6231a5e3fd15fd5ecc4c74785b8c4514"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a0273012228b9e6889908a6a93aa47973"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#a0273012228b9e6889908a6a93aa47973">set_exceptions</a> (bool e) const </td></tr>
<tr class="memdesc:a0273012228b9e6889908a6a93aa47973"><td class="mdescLeft"> </td><td class="mdescRight">Sets the exception state to a particular value. <a href="#a0273012228b9e6889908a6a93aa47973">More...</a><br/></td></tr>
<tr class="separator:a0273012228b9e6889908a6a93aa47973"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ac41c56580e33a404b4f43f38f26bea82"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac41c56580e33a404b4f43f38f26bea82"></a>
class </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#ac41c56580e33a404b4f43f38f26bea82">NoExceptions</a></td></tr>
<tr class="memdesc:ac41c56580e33a404b4f43f38f26bea82"><td class="mdescLeft"> </td><td class="mdescRight">Declare <a class="el" href="classmysqlpp_1_1NoExceptions.html" title="Disable exceptions in an object derived from OptionalExceptions. ">NoExceptions</a> to be our friend so it can access our protected functions. <br/></td></tr>
<tr class="separator:ac41c56580e33a404b4f43f38f26bea82"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Interface allowing a class to have optional exceptions. </p>
<p>A class derives from this one to acquire a standard interface for disabling exceptions, possibly only temporarily. By default, exceptions are enabled.</p>
<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>
<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" title="Interface allowing a class to have optional exceptions. ">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>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="a45a3e93f56716abf10704419b5ba4f31"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<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></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">e</td><td>if true, exceptions are enabled (this is the default) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a0273012228b9e6889908a6a93aa47973"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<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> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the exception state to a particular value. </p>
<p>This method is protected because it is only intended for use by subclasses' copy constructors and the like. </p>
<p>Referenced by <a class="el" href="classmysqlpp_1_1ResultBase.html#a3649538671f94a215c72ad03ff9025aa">mysqlpp::ResultBase::copy()</a>, <a class="el" href="classmysqlpp_1_1Connection.html#a44070d9f1bee49126320ad815a854ed3">mysqlpp::Connection::copy()</a>, and <a class="el" href="classmysqlpp_1_1Query.html#a75982ff4f3b5fe603ee6041ed64172ce">mysqlpp::Query::operator=()</a>.</p>
</div>
</div>
<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></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Mar 18 2015 18:55:03 for MySQL++ by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
|