Back to index

natlog  0.91.0
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
ShowSeconds Class Reference

#include <showseconds.h>

Collaboration diagram for ShowSeconds:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ShowSeconds (std::string const &seconds)
 ShowSeconds (time_t seconds)

Static Public Member Functions

static void setFormat ()
static std::string const & utcMarker ()

Static Private Member Functions

static void rawTime (std::ostream &out, std::string const &seconds)
static void utcTime (std::ostream &out, std::string const &seconds)
static void localTime (std::ostream &out, std::string const &seconds)

Private Attributes

std::string d_seconds

Static Private Attributes

static std::string s_utcMarker
static void(* s_show )(std::ostream &out, std::string const &time)

Friends

std::ostream & operator<< (std::ostream &out, ShowSeconds const &showSeconds)

Detailed Description

Definition at line 8 of file showseconds.h.


Constructor & Destructor Documentation

ShowSeconds::ShowSeconds ( std::string const &  seconds)
ShowSeconds::ShowSeconds ( time_t  seconds)

Definition at line 3 of file showseconds2.cc.

:
    d_seconds(X2a(seconds))
{}

Member Function Documentation

void ShowSeconds::localTime ( std::ostream &  out,
std::string const &  seconds 
) [static, private]

Definition at line 28 of file time.cc.

{
    insertTime(DateTime::LOCALTIME, out, seconds);
}

Here is the caller graph for this function:

void ShowSeconds::rawTime ( std::ostream &  out,
std::string const &  seconds 
) [static, private]

Definition at line 18 of file time.cc.

{
    out << seconds;
}

Here is the caller graph for this function:

void ShowSeconds::setFormat ( ) [static]

Definition at line 3 of file setformat.cc.

{
    Options::Time time = Options::instance().time();

    s_show = 
        time == Options::RAW ? rawTime :
                Options::UTC ? utcTime :
                               localTime;

    if (time == Options::UTC)
        s_utcMarker = " (UTC)";
}

Here is the call graph for this function:

Here is the caller graph for this function:

std::string const & ShowSeconds::utcMarker ( ) [inline, static]

Definition at line 33 of file showseconds.h.

{
    return s_utcMarker;
}

Here is the caller graph for this function:

void ShowSeconds::utcTime ( std::ostream &  out,
std::string const &  seconds 
) [static, private]

Definition at line 23 of file time.cc.

{
    insertTime(DateTime::UTC, out, seconds);
}

Here is the caller graph for this function:


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
ShowSeconds const &  showSeconds 
) [friend]

Member Data Documentation

std::string ShowSeconds::d_seconds [private]

Definition at line 13 of file showseconds.h.

void(* ShowSeconds::s_show)(std::ostream &out, std::string const &time) [static, private]
Initial value:

Definition at line 17 of file showseconds.h.

string ShowSeconds::s_utcMarker [static, private]

Definition at line 15 of file showseconds.h.


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