libodbc++  0.2.5
Public Member Functions | List of all members
odbc::Time Class Reference

An SQL TIME. More...

#include <types.h>

Inheritance diagram for odbc::Time:
odbc::Timestamp

Public Member Functions

 Time (int hour, int minute, int second)
 Constructor.
 
 Time ()
 Constructor. More...
 
 Time (std::time_t t)
 Constructor. More...
 
 Time (const std::string &str)
 Constructor. More...
 
 Time (const Time &t)
 Copy constructor.
 
Timeoperator= (const Time &t)
 Assignment operator.
 
virtual ~Time ()
 Destructor.
 
virtual void setTime (std::time_t t)
 Sets the time to the specified time_t value.
 
std::time_t getTime () const
 Returns the time_t value of 1970-01-01 at this time.
 
void parse (const std::string &str)
 Sets this time from a string in the HH:MM:SS format.
 
int getHour () const
 Gets the hour of this time.
 
int getMinute () const
 Gets the minute of this time.
 
int getSecond () const
 Gets the second of this time.
 
void setHour (int h)
 Sets the hour of this time.
 
void setMinute (int m)
 Sets the minute of this time.
 
void setSecond (int s)
 Sets the second of this time.
 

Detailed Description

An SQL TIME.

Constructor & Destructor Documentation

odbc::Time::Time ( )
explicit

Constructor.

Sets the time to now.

odbc::Time::Time ( std::time_t  t)

Constructor.

Sets the time to the specified time_t value.

odbc::Time::Time ( const std::string &  str)

Constructor.

Sets the time to the specified string in the HH:MM:SS format.


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

Go back to the libodbc++ homepage