Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

mysqlpp::MysqlCmp< BinaryPred, CmpType > Class Template Reference

Template for making function objects that can compare something against a Row element. More...

#include <compare.h>

Inheritance diagram for mysqlpp::MysqlCmp< BinaryPred, CmpType >:

Inheritance graph
[legend]
Collaboration diagram for mysqlpp::MysqlCmp< BinaryPred, CmpType >:

Collaboration graph
[legend]
List of all members.

Public Methods

 MysqlCmp (uint i, const BinaryPred &f, const CmpType &c)
 MysqlCmp constructor.

bool operator() (const Row &cmp1) const
 Run the predicate function on this row and the object's data, and return its value.


Protected Attributes

unsigned int index
 Index of field within Row object to compare against.

BinaryPred func
 Predicate function to use for the comparison.

CmpType cmp2
 What to compare the Row's field against.


Detailed Description

template<class BinaryPred, class CmpType>
class mysqlpp::MysqlCmp< BinaryPred, CmpType >

Template for making function objects that can compare something against a Row element.

See also:
mysql_cmp


Constructor & Destructor Documentation

template<class BinaryPred, class CmpType>
mysqlpp::MysqlCmp< BinaryPred, CmpType >::MysqlCmp uint    i,
const BinaryPred &    f,
const CmpType &    c
[inline]
 

MysqlCmp constructor.

Parameters:
i  field number within a row to compare against
f  predicate function
c  what to compare row element against
operator() for this object compares Row[i] to c using f.


Member Function Documentation

template<class BinaryPred, class CmpType>
bool mysqlpp::MysqlCmp< BinaryPred, CmpType >::operator() const Row   cmp1 const [inline]
 

Run the predicate function on this row and the object's data, and return its value.

See the constructor's parameters for what we compare against.

Reimplemented in mysqlpp::MysqlCmpCStr< BinaryPred >.


The documentation for this class was generated from the following file:
Generated on Thu May 26 09:40:34 2005 for MySQL++ by doxygen1.2.18