Public Member Functions | Public Attributes | List of all members
SqlDatabase::TimeRenderer Struct Reference


Renders a time_t as a string.

Definition at line 583 of file SqlDatabase.h.

#include <SqlDatabase.h>

Inheritance diagram for SqlDatabase::TimeRenderer:
Inheritance graph
Collaboration diagram for SqlDatabase::TimeRenderer:
Collaboration graph

Public Member Functions

 TimeRenderer (const std::string &format, bool local_tz=true)
virtual std::string operator() (const time_t &value, size_t width) const
 Renders a column value as a string. More...

Public Attributes

bool local_tz
 Use local time zone rather than GMT. More...
std::string format
 Format, as for strftime(). More...

Member Function Documentation

virtual std::string SqlDatabase::TimeRenderer::operator() ( const time_t &  value,
size_t  width 
) const

Renders a column value as a string.

The width is zero when this functor is called while Table::print() is trying to determine the maximum width of a value.

Reimplemented from SqlDatabase::Renderer< time_t >.

Member Data Documentation

bool SqlDatabase::TimeRenderer::local_tz

Use local time zone rather than GMT.

Definition at line 584 of file SqlDatabase.h.

std::string SqlDatabase::TimeRenderer::format

Format, as for strftime().

Definition at line 585 of file SqlDatabase.h.

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