Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class 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 >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~DTbase ()
 Destroy object.

 operator std::string () const
 Return a copy of the item in C++ string form.

virtual MYSQLPP_EXPORT short 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 primarily 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.

This template also defines interfaces for converting the object to a string form, which a subclass must define.


Member Function Documentation

template<class T>
virtual MYSQLPP_EXPORT short 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::DateTime, mysqlpp::Date, and mysqlpp::Time.


The documentation for this struct was generated from the following file:
Generated on Wed Jul 11 15:35:15 2007 for MySQL++ by doxygen 1.3.5