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 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MySQL++ Reference Manual</title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MySQL++: mysqlpp::OptionalExceptions Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MySQL++
 <span id="projectnumber">3.2.5</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</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" title="Interface allowing a class to have optional exceptions." alt="" coords="5,156,199,181"/>
<area shape="rect" href="classmysqlpp_1_1Connection.html" title="Manages the connection to the database server." alt="" coords="247,72,393,97"/>
<area shape="rect" href="classmysqlpp_1_1Query.html" title="A class for building and executing SQL queries." alt="" coords="263,131,377,156"/>
<area shape="rect" href="classmysqlpp_1_1ResultBase.html" title="Base class for StoreQueryResult and UseQueryResult." alt="" coords="247,180,393,205"/>
<area shape="rect" href="classmysqlpp_1_1Row.html" title="Manages rows from a result set." alt="" coords="267,229,372,255"/>
<area shape="rect" href="classmysqlpp_1_1TCPConnection.html" title="Specialization of Connection for TCP/IP." alt="" coords="456,5,629,31"/>
<area shape="rect" href="classmysqlpp_1_1UnixDomainSocketConnection.html" title="Specialization of Connection for Unix domain sockets." alt="" coords="446,55,638,93"/>
<area shape="rect" href="classmysqlpp_1_1WindowsNamedPipeConnection.html" title="Specialization of Connection for Windows named pipes." alt="" coords="441,117,643,156"/>
<area shape="rect" href="classmysqlpp_1_1StoreQueryResult.html" title="StoreQueryResult set type for "store" queries." alt="" coords="450,180,634,205"/>
<area shape="rect" href="classmysqlpp_1_1UseQueryResult.html" title="StoreQueryResult set type for "use" queries." alt="" coords="454,229,630,255"/>
</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 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:a46ce5ac667513bac88c0bd459115f236"><td class="memItemLeft" align="right" valign="top"><a id="a46ce5ac667513bac88c0bd459115f236"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#a46ce5ac667513bac88c0bd459115f236">enable_exceptions</a> () const</td></tr>
<tr class="memdesc:a46ce5ac667513bac88c0bd459115f236"><td class="mdescLeft"> </td><td class="mdescRight">Enable exceptions from the object. <br /></td></tr>
<tr class="separator:a46ce5ac667513bac88c0bd459115f236"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4e1a95b8d3c97338c66f21c5d5a4be20"><td class="memItemLeft" align="right" valign="top"><a id="a4e1a95b8d3c97338c66f21c5d5a4be20"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#a4e1a95b8d3c97338c66f21c5d5a4be20">disable_exceptions</a> () const</td></tr>
<tr class="memdesc:a4e1a95b8d3c97338c66f21c5d5a4be20"><td class="mdescLeft"> </td><td class="mdescRight">Disable exceptions from the object. <br /></td></tr>
<tr class="separator:a4e1a95b8d3c97338c66f21c5d5a4be20"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acac3ee271ab36b9f65e6c2110a04ffff"><td class="memItemLeft" align="right" valign="top"><a id="acac3ee271ab36b9f65e6c2110a04ffff"></a>
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#acac3ee271ab36b9f65e6c2110a04ffff">throw_exceptions</a> () const</td></tr>
<tr class="memdesc:acac3ee271ab36b9f65e6c2110a04ffff"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if exceptions are enabled. <br /></td></tr>
<tr class="separator:acac3ee271ab36b9f65e6c2110a04ffff"><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:a5e4f4a7a1526ceaef3308a385bd28a10"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1OptionalExceptions.html#a5e4f4a7a1526ceaef3308a385bd28a10">set_exceptions</a> (bool e) const</td></tr>
<tr class="memdesc:a5e4f4a7a1526ceaef3308a385bd28a10"><td class="mdescLeft"> </td><td class="mdescRight">Sets the exception state to a particular value. <a href="#a5e4f4a7a1526ceaef3308a385bd28a10">More...</a><br /></td></tr>
<tr class="separator:a5e4f4a7a1526ceaef3308a385bd28a10"><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 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 id="a45a3e93f56716abf10704419b5ba4f31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45a3e93f56716abf10704419b5ba4f31">◆ </a></span>OptionalExceptions()</h2>
<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 id="a5e4f4a7a1526ceaef3308a385bd28a10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e4f4a7a1526ceaef3308a385bd28a10">◆ </a></span>set_exceptions()</h2>
<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 class="reference">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 Sun Jul 21 2019 05:32:21 for MySQL++ by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
|