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

# mysqlpp::DTbase< T > Struct Template Reference

Base class template for MySQL++ date and time classes. More...

`#include <datetime.h>`

Inheritance diagram for mysqlpp::DTbase< T >:

[legend]
List of all members.

## Public Methods

virtual short int | compare (const T &other) const=0
| Compare this object to another of the same type.
bool | operator== (const T &other) const
| Returns true if "other" is equal to this object.
bool | operator!= (const T &other) const
| Returns true if "other" is not equal to this object.
bool | operator< (const T &other) const
| Returns true if "other" is less than this object.
bool | operator<= (const T &other) const
| Returns true if "other" is less than or equal to this object.
bool | operator> (const T &other) const
| Returns true if "other" is greater than this object.
bool | operator>= (const T &other) const
| Returns true if "other" is greater than or equal to this object.

## Detailed Description

### template<class T>
struct mysqlpp::DTbase< T >

Base class template for MySQL++ date and time classes.

This template defines the comparison operators, which are all implemented in terms of compare(). Each subclass implements that as a protected method, because these operators are the only supported comparison method.

## Member Function Documentation

template<class T>
virtual short int mysqlpp::DTbase< T >::compare | ( | const T & | other | ) | const`[pure virtual]`

| Compare this object to another of the same type. Returns < 0 if this object is "before" the other, 0 of they are equal, and > 0 if this object is "after" the other. Implemented in mysqlpp::Date, mysqlpp::Time, and mysqlpp::DateTime.

The documentation for this struct was generated from the following file:

- datetime.h