Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::date_time::c_time Struct Reference

Provides a uniform interface to some 'ctime' functions. More...

#include <c_time.hpp>

Static Public Member Functions

static std::tm * localtime (const std::time_t *t, std::tm *result)
 requires a pointer to a user created std::tm struct More...
 
static std::tm * gmtime (const std::time_t *t, std::tm *result)
 requires a pointer to a user created std::tm struct More...
 

Detailed Description

Provides a uniform interface to some 'ctime' functions.

Provides a uniform interface to some ctime functions and their '_r' counterparts. The '_r' functions require a pointer to a user created std::tm struct whereas the regular functions use a staticly created struct and return a pointer to that. These wrapper functions require the user to create a std::tm struct and send in a pointer to it. This struct may be used to store the resulting time. The returned pointer may or may not point to this struct, however, it will point to the result of the corresponding function. All functions do proper checking of the C function results and throw exceptions on error. Therefore the functions will never return NULL.

Member Function Documentation

static std::tm* boost::date_time::c_time::gmtime ( const std::time_t *  t,
std::tm *  result 
)
inlinestatic

requires a pointer to a user created std::tm struct

References boost::throw_exception().

Referenced by boost::date_time::second_clock< time_type >::universal_time().

static std::tm* boost::date_time::c_time::localtime ( const std::time_t *  t,
std::tm *  result 
)
inlinestatic

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