File: classmysqlpp_1_1Comparable.html

package info (click to toggle)
mysql%2B%2B 3.2.2%2Bpristine-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 15,724 kB
  • ctags: 10,567
  • sloc: cpp: 35,668; sh: 3,683; makefile: 846; perl: 786
file content (168 lines) | stat: -rwxr-xr-x 13,466 bytes parent folder | download
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
<!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&#160;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&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;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_1Comparable.html">Comparable</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="classmysqlpp_1_1Comparable-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">mysqlpp::Comparable&lt; T &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Mix-in that gives its subclass a full set of comparison operators.  
 <a href="classmysqlpp_1_1Comparable.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="comparable_8h_source.html">comparable.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for mysqlpp::Comparable&lt; T &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="classmysqlpp_1_1Comparable__inherit__graph.png" border="0" usemap="#mysqlpp_1_1Comparable_3_01T_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="mysqlpp_1_1Comparable_3_01T_01_4_inherit__map" id="mysqlpp_1_1Comparable_3_01T_01_4_inherit__map">
<area shape="rect" id="node2" href="classmysqlpp_1_1Comparable.html" title="mysqlpp::Comparable\l\&lt; DateTime \&gt;" alt="" coords="320,5,469,46"/><area shape="rect" id="node4" href="classmysqlpp_1_1Comparable.html" title="mysqlpp::Comparable\l\&lt; Time \&gt;" alt="" coords="320,70,469,111"/><area shape="rect" id="node6" href="classmysqlpp_1_1Comparable.html" title="mysqlpp::Comparable\l\&lt; Date \&gt;" alt="" coords="320,135,469,177"/><area shape="rect" id="node3" href="classmysqlpp_1_1DateTime.html" title="C++ form of SQL&#39;s DATETIME type. " alt="" coords="520,12,656,39"/><area shape="rect" id="node5" href="classmysqlpp_1_1Time.html" title="C++ form of SQL&#39;s TIME type. " alt="" coords="534,77,642,104"/><area shape="rect" id="node7" href="classmysqlpp_1_1Date.html" title="C++ form of SQL&#39;s DATE type. " alt="" coords="535,143,641,169"/></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:a88062e6c972104353b675e69d798ff11"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a88062e6c972104353b675e69d798ff11"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#a88062e6c972104353b675e69d798ff11">operator==</a> (const T &amp;other) const </td></tr>
<tr class="memdesc:a88062e6c972104353b675e69d798ff11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if "other" is equal to this object. <br/></td></tr>
<tr class="separator:a88062e6c972104353b675e69d798ff11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6062c13d77297d6ea038afc32bd1825a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6062c13d77297d6ea038afc32bd1825a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#a6062c13d77297d6ea038afc32bd1825a">operator!=</a> (const T &amp;other) const </td></tr>
<tr class="memdesc:a6062c13d77297d6ea038afc32bd1825a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if "other" is not equal to this object. <br/></td></tr>
<tr class="separator:a6062c13d77297d6ea038afc32bd1825a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a990a2cc29467a347406162fff86cc514"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a990a2cc29467a347406162fff86cc514"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#a990a2cc29467a347406162fff86cc514">operator&lt;</a> (const T &amp;other) const </td></tr>
<tr class="memdesc:a990a2cc29467a347406162fff86cc514"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if "other" is less than this object. <br/></td></tr>
<tr class="separator:a990a2cc29467a347406162fff86cc514"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03cde1e3a6da4f73d918ed6e472e4fc8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a03cde1e3a6da4f73d918ed6e472e4fc8"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#a03cde1e3a6da4f73d918ed6e472e4fc8">operator&lt;=</a> (const T &amp;other) const </td></tr>
<tr class="memdesc:a03cde1e3a6da4f73d918ed6e472e4fc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if "other" is less than or equal to this object. <br/></td></tr>
<tr class="separator:a03cde1e3a6da4f73d918ed6e472e4fc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a617880cb42950b9df07f2dbf193eb955"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a617880cb42950b9df07f2dbf193eb955"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#a617880cb42950b9df07f2dbf193eb955">operator&gt;</a> (const T &amp;other) const </td></tr>
<tr class="memdesc:a617880cb42950b9df07f2dbf193eb955"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if "other" is greater than this object. <br/></td></tr>
<tr class="separator:a617880cb42950b9df07f2dbf193eb955"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a745bf92e13e9e600fe3b34cb35b4aa86"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a745bf92e13e9e600fe3b34cb35b4aa86"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#a745bf92e13e9e600fe3b34cb35b4aa86">operator&gt;=</a> (const T &amp;other) const </td></tr>
<tr class="memdesc:a745bf92e13e9e600fe3b34cb35b4aa86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if "other" is greater than or equal to this object. <br/></td></tr>
<tr class="separator:a745bf92e13e9e600fe3b34cb35b4aa86"><td class="memSeparator" colspan="2">&#160;</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:a04f46aa0ee2ba5e0dcb6e3bd77a22f0f"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#a04f46aa0ee2ba5e0dcb6e3bd77a22f0f">~Comparable</a> ()</td></tr>
<tr class="memdesc:a04f46aa0ee2ba5e0dcb6e3bd77a22f0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy object.  <a href="#a04f46aa0ee2ba5e0dcb6e3bd77a22f0f">More...</a><br/></td></tr>
<tr class="separator:a04f46aa0ee2ba5e0dcb6e3bd77a22f0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a189507426ed585f7da84f63dc426c651"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Comparable.html#a189507426ed585f7da84f63dc426c651">compare</a> (const T &amp;other) const =0</td></tr>
<tr class="memdesc:a189507426ed585f7da84f63dc426c651"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare this object to another of the same type.  <a href="#a189507426ed585f7da84f63dc426c651">More...</a><br/></td></tr>
<tr class="separator:a189507426ed585f7da84f63dc426c651"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class T&gt;<br/>
class mysqlpp::Comparable&lt; T &gt;</h3>

<p>Mix-in that gives its subclass a full set of comparison operators. </p>
<p>Simply by inheriting publically from this and implementing <a class="el" href="classmysqlpp_1_1Comparable.html#a189507426ed585f7da84f63dc426c651" title="Compare this object to another of the same type. ">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#a189507426ed585f7da84f63dc426c651" title="Compare this object to another of the same type. ">compare()</a>. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a04f46aa0ee2ba5e0dcb6e3bd77a22f0f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classmysqlpp_1_1Comparable.html">mysqlpp::Comparable</a>&lt; T &gt;::~<a class="el" href="classmysqlpp_1_1Comparable.html">Comparable</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destroy object. </p>
<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. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a189507426ed585f7da84f63dc426c651"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int <a class="el" href="classmysqlpp_1_1Comparable.html">mysqlpp::Comparable</a>&lt; T &gt;::compare </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compare this object to another of the same type. </p>
<p>Returns &lt; 0 if this object is "before" the other, 0 of they are equal, and &gt; 0 if this object is "after" the other. </p>

<p>Implemented in <a class="el" href="classmysqlpp_1_1Time.html#a55c735d6dd5563d0ff921e06991e9ba3">mysqlpp::Time</a>, <a class="el" href="classmysqlpp_1_1Date.html#abfc9a7c6d530b3f2c0acf163265fff32">mysqlpp::Date</a>, and <a class="el" href="classmysqlpp_1_1DateTime.html#a296fcae06b2cfc11cd7ef724393223a0">mysqlpp::DateTime</a>.</p>

<p>Referenced by <a class="el" href="classmysqlpp_1_1Comparable.html#a6062c13d77297d6ea038afc32bd1825a">mysqlpp::Comparable&lt; Date &gt;::operator!=()</a>, <a class="el" href="classmysqlpp_1_1Comparable.html#a990a2cc29467a347406162fff86cc514">mysqlpp::Comparable&lt; Date &gt;::operator&lt;()</a>, <a class="el" href="classmysqlpp_1_1Comparable.html#a03cde1e3a6da4f73d918ed6e472e4fc8">mysqlpp::Comparable&lt; Date &gt;::operator&lt;=()</a>, <a class="el" href="classmysqlpp_1_1Comparable.html#a88062e6c972104353b675e69d798ff11">mysqlpp::Comparable&lt; Date &gt;::operator==()</a>, <a class="el" href="classmysqlpp_1_1Comparable.html#a617880cb42950b9df07f2dbf193eb955">mysqlpp::Comparable&lt; Date &gt;::operator&gt;()</a>, and <a class="el" href="classmysqlpp_1_1Comparable.html#a745bf92e13e9e600fe3b34cb35b4aa86">mysqlpp::Comparable&lt; Date &gt;::operator&gt;=()</a>.</p>

</div>
</div>
<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></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 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>