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

mysqlpp::Time Struct Reference

C++ form of MySQL's TIME type. More...

#include <datetime.h>

Inheritance diagram for mysqlpp::Time:

Inheritance graph
[legend]
Collaboration diagram for mysqlpp::Time:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Time ()
 Default constructor.

 Time (tiny_int h, tiny_int m, tiny_int s)
 Initialize object.

 Time (const Time &other)
 Initialize object as a copy of another Time.

 Time (const DateTime &other)
 Initialize object from time part of date/time object.

 Time (cchar *str)
 Initialize object from a MySQL time string.

 Time (const ColData &str)
 Initialize object from a MySQL time string.

 Time (const std::string &str)
 Initialize object from a MySQL time string.

MYSQLPP_EXPORT cchar * convert (cchar *)
 Parse a MySQL time string into this object.

MYSQLPP_EXPORT short int compare (const Time &other) const
 Compare this time to another.


Public Attributes

tiny_int hour
 hour, 0-23

tiny_int minute
 minute, 0-59

tiny_int second
 second, 0-59


Detailed Description

C++ form of MySQL's TIME type.

Objects of this class can be inserted into streams, and initialized from MySQL TIME strings.


Constructor & Destructor Documentation

mysqlpp::Time::Time cchar *  str  )  [inline]
 

Initialize object from a MySQL time string.

String must be in the HH:MM:SS format. It doesn't have to be zero-padded.

mysqlpp::Time::Time const ColData str  )  [inline]
 

Initialize object from a MySQL time string.

See also:
Time(cchar*)

mysqlpp::Time::Time const std::string &  str  )  [inline]
 

Initialize object from a MySQL time string.

See also:
Time(cchar*)


Member Function Documentation

short int mysqlpp::Time::compare const Time other  )  const [virtual]
 

Compare this time to another.

Returns < 0 if this time is before the other, 0 of they are equal, and > 0 if this time is after the other.

Implements mysqlpp::DTbase< Time >.


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