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

uesqlc::TTime Class Reference

SQL time handler. More...

#include <time.hh>

Inheritance diagram for uesqlc::TTime:

mpcl::text::TLocalDate uesqlc::IType mpcl::text::IDate List of all members.

Public Methods

 TTime (void)
 Builds a new instance.

 TTime (const TTime &rktTIME)
 Builds a new instance from another instance.

 TTime (const int kiHOUR, const int kiMINUTE, const int kiSECOND)
void * getBuffer (const std::size_t kzSIZE)
void set (const char *pkcVALUE)
void set (const std::string &rkyVALUE)
mpcl::text::TString get (void) const
mpcl::text::TString get (const char *pkcTIME_FORMAT) const

Detailed Description

SQL time handler.

Definition at line 41 of file time.hh.


Constructor & Destructor Documentation

uesqlc::TTime::TTime const int    kiHOUR,
const int    kiMINUTE,
const int    kiSECOND
[inline]
 

Builds a new instance. It builds the instance with an useless valid date to let the base class 'mpcl::text::TLocalDate' be used.

Parameters:
kiHOUR  Hours.
kiMINUTE  Minutes.
kiSECOND  Seconds.
See also:
mpcl::text::TLocalDate.

Definition at line 73 of file time.hh.

References uesqlc::IType::setNull(), and mpcl::text::TLocalDate::TLocalDate().


Member Function Documentation

mpcl::text::TString uesqlc::TTime::get const char *    pkcTIME_FORMAT const [inline, virtual]
 

Returns time in SQL format.

Parameters:
pkcTIME_FORMAT  Time format in strftime-like format. It defaults to ANSI SQL time format. A valid time can be '23:59:59'.
Returns:
Time in readable format.
Warning:
pkcTIME_FORMAT must include the enclosing quotes (').

Reimplemented from mpcl::text::TLocalDate.

Definition at line 151 of file time.hh.

References uesqlc::IType::isNull().

mpcl::text::TString uesqlc::TTime::get void    const [inline, virtual]
 

Returns a string with the value of the instance. If the instance holds a null value, then the string 'NULL' will be printed.

Returns:
The result of converting this instance to string.

Implements uesqlc::IType.

Definition at line 128 of file time.hh.

References uesqlc::IType::isNull().

void* uesqlc::TTime::getBuffer const std::size_t    kzSIZE
 

Reserves a buffer kzSIZE octets length, to let somebody store a time as a zero-terminated string of chars.

Parameters:
kzSIZE  Size of the buffer.
Returns:
The buffer.

void uesqlc::TTime::set const std::string &    rkyVALUE [inline]
 

Assigns value rkyVALUE. If rkyVALUE is empty, then the instance is null.

Precondition:
( rkyVALUE.empty() ) => isNull()
Parameters:
rkyVALUE  Source value.

Definition at line 116 of file time.hh.

References set().

void uesqlc::TTime::set const char *    pkcVALUE [virtual]
 

Assigns value pkcVALUE. If pkcVALUE is null or points to a zero length string, then the instance is null.

Precondition:
( !pkcVALUE || !*pkcVALUE ) => isNull()
Parameters:
pkcVALUE  Source value.

Implements uesqlc::IType.

Definition at line 33 of file time.cc.

References uesqlc::IType::isNull(), and uesqlc::IType::setNull().

Referenced by set().


The documentation for this class was generated from the following files:
Generated on Mon Oct 13 02:40:13 2003 for UESQLC by doxygen1.2.18