Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::attributes::basic_clock< TimeTraitsT > Class Template Reference

A class of an attribute that makes an attribute value of the current date and time. More...

#include <clock.hpp>

Inheritance diagram for boost::attributes::basic_clock< TimeTraitsT >:
Collaboration diagram for boost::attributes::basic_clock< TimeTraitsT >:

Classes

struct  impl
 Attribute factory implementation. More...
 

Public Types

typedef TimeTraitsT::time_type value_type
 Generated value type. More...
 

Public Member Functions

 basic_clock ()
 Default constructor. More...
 
 basic_clock (cast_source const &source)
 Constructor for casting support. More...
 
bool operator! () const BOOST_NOEXCEPT
 Verifies that the factory is not in empty state. More...
 
attribute_value get_value () const
 
void swap (attribute &that) BOOST_NOEXCEPT
 The method swaps two factories (i.e. More...
 

Protected Member Functions

implget_impl () const BOOST_NOEXCEPT
 
void set_impl (intrusive_ptr< impl > p) BOOST_NOEXCEPT
 Sets the pointer to the factory implementation. More...
 

Detailed Description

template<typename TimeTraitsT>
class boost::attributes::basic_clock< TimeTraitsT >

A class of an attribute that makes an attribute value of the current date and time.

The attribute generates current time stamp as a value. The type of the attribute value is determined with time traits passed to the class template as a template parameter. The time traits provided by the library use boost::posix_time::ptime as the time type.

Time traits also determine the way time is acquired. There are two types of time traits provided by the library: utc_time_traits and local_time_traits. The first returns UTC time, the second returns local time.

Member Typedef Documentation

template<typename TimeTraitsT >
typedef TimeTraitsT::time_type boost::attributes::basic_clock< TimeTraitsT >::value_type

Generated value type.

Constructor & Destructor Documentation

template<typename TimeTraitsT >
boost::attributes::basic_clock< TimeTraitsT >::basic_clock ( )
inline

Default constructor.

template<typename TimeTraitsT >
boost::attributes::basic_clock< TimeTraitsT >::basic_clock ( cast_source const &  source)
inlineexplicit

Constructor for casting support.

Member Function Documentation

attribute_value boost::attribute::get_value ( ) const
inherited
Returns
The actual attribute value. It shall not return empty values (exceptions shall be used to indicate errors).
bool boost::attribute::operator! ( ) const
inlineinherited

Verifies that the factory is not in empty state.

Verifies that the factory is in empty state

void boost::attribute::set_impl ( intrusive_ptr< impl p)
inlineprotectedinherited

Sets the pointer to the factory implementation.

Parameters
pPointer to the implementation. Must not be NULL.

References boost::multiprecision::backends::p, and boost::intrusive_ptr< T >::swap().

Referenced by boost::attributes::counter< T >::counter().

void boost::attribute::swap ( attribute that)
inlineinherited

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