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
|
<!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_1Comparable.html">Comparable</a></div>
<h1>mysqlpp::Comparable< T > Class Template Reference</h1><!-- doxytag: class="mysqlpp::Comparable" -->Mix-in that gives its subclass a full set of comparison operators.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="comparable_8h-source.html">comparable.h</a>></code>
<p>
Inheritance diagram for mysqlpp::Comparable< T >:<p><center><img src="classmysqlpp_1_1Comparable__inherit__graph.png" border="0" usemap="#mysqlpp_1_1Comparable_3_01T_01_4__inherit__map" alt="Inheritance graph"></center>
<map name="mysqlpp_1_1Comparable_3_01T_01_4__inherit__map">
<area href="classmysqlpp_1_1Date.html" shape="rect" coords="460,7,703,31" alt="">
<area href="classmysqlpp_1_1DateTime.html" shape="rect" coords="427,55,736,79" alt="">
<area href="classmysqlpp_1_1Time.html" shape="rect" coords="459,103,704,127" alt="">
<area href="classmysqlpp_1_1Comparable.html" shape="rect" coords="435,151,728,175" alt="">
<area href="classmysqlpp_1_1Comparable.html" shape="rect" coords="435,199,728,223" alt="">
<area href="classmysqlpp_1_1Comparable.html" shape="rect" coords="419,247,744,271" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classmysqlpp_1_1Comparable-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"><a class="anchor" name="88062e6c972104353b675e69d798ff11"></a><!-- doxytag: member="mysqlpp::Comparable::operator==" ref="88062e6c972104353b675e69d798ff11" args="(const T &other) const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#88062e6c972104353b675e69d798ff11">operator==</a> (const T &other) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if "other" is equal to this object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6062c13d77297d6ea038afc32bd1825a"></a><!-- doxytag: member="mysqlpp::Comparable::operator!=" ref="6062c13d77297d6ea038afc32bd1825a" args="(const T &other) const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#6062c13d77297d6ea038afc32bd1825a">operator!=</a> (const T &other) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if "other" is not equal to this object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="990a2cc29467a347406162fff86cc514"></a><!-- doxytag: member="mysqlpp::Comparable::operator<" ref="990a2cc29467a347406162fff86cc514" args="(const T &other) const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#990a2cc29467a347406162fff86cc514">operator<</a> (const T &other) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if "other" is less than this object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="03cde1e3a6da4f73d918ed6e472e4fc8"></a><!-- doxytag: member="mysqlpp::Comparable::operator<=" ref="03cde1e3a6da4f73d918ed6e472e4fc8" args="(const T &other) const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#03cde1e3a6da4f73d918ed6e472e4fc8">operator<=</a> (const T &other) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if "other" is less than or equal to this object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="617880cb42950b9df07f2dbf193eb955"></a><!-- doxytag: member="mysqlpp::Comparable::operator>" ref="617880cb42950b9df07f2dbf193eb955" args="(const T &other) const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#617880cb42950b9df07f2dbf193eb955">operator></a> (const T &other) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if "other" is greater than this object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="745bf92e13e9e600fe3b34cb35b4aa86"></a><!-- doxytag: member="mysqlpp::Comparable::operator>=" ref="745bf92e13e9e600fe3b34cb35b4aa86" args="(const T &other) const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#745bf92e13e9e600fe3b34cb35b4aa86">operator>=</a> (const T &other) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if "other" is greater than or equal to this object. <br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#04f46aa0ee2ba5e0dcb6e3bd77a22f0f">~Comparable</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy object. <a href="#04f46aa0ee2ba5e0dcb6e3bd77a22f0f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#189507426ed585f7da84f63dc426c651">compare</a> (const T &other) const =0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compare this object to another of the same type. <a href="#189507426ed585f7da84f63dc426c651"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template<class T><br>
class mysqlpp::Comparable< T ></h3>
Mix-in that gives its subclass a full set of comparison operators.
<p>
Simply by inheriting publically from this and implementing <a class="el" href="classmysqlpp_1_1Comparable.html#189507426ed585f7da84f63dc426c651">compare()</a>, the subclass gains a full set of comparison operators, because all of the operators are implemented in terms of <a class="el" href="classmysqlpp_1_1Comparable.html#189507426ed585f7da84f63dc426c651">compare()</a>.
<p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="04f46aa0ee2ba5e0dcb6e3bd77a22f0f"></a><!-- doxytag: member="mysqlpp::Comparable::~Comparable" ref="04f46aa0ee2ba5e0dcb6e3bd77a22f0f" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<class T> </div>
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classmysqlpp_1_1Comparable.html">mysqlpp::Comparable</a>< T >::~<a class="el" href="classmysqlpp_1_1Comparable.html">Comparable</a> </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"><code> [inline, protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Destroy object.
<p>
This class has nothing to destroy, but declaring the dtor virtual placates some compilers set to high warning levels. Protecting it ensures you can't delete subclasses through base class pointers, which makes no sense because this class isn't made for polymorphism. It's just a mixin.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="189507426ed585f7da84f63dc426c651"></a><!-- doxytag: member="mysqlpp::Comparable::compare" ref="189507426ed585f7da84f63dc426c651" args="(const T &other) const =0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<class T> </div>
<table class="memname">
<tr>
<td class="memname">virtual int <a class="el" href="classmysqlpp_1_1Comparable.html">mysqlpp::Comparable</a>< T >::compare </td>
<td>(</td>
<td class="paramtype">const T & </td>
<td class="paramname"> <em>other</em> </td>
<td> ) </td>
<td width="100%"> const<code> [protected, pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Compare this object to another of the same type.
<p>
Returns < 0 if this object is "before" the other, 0 of they are equal, and > 0 if this object is "after" the other.
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="comparable_8h-source.html">comparable.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>
|