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::time_zone_base< time_type, CharT > Class Template Referenceabstract

Interface class for dynamic time zones. More...

#include <time_zone_base.hpp>

Inheritance diagram for boost::date_time::time_zone_base< time_type, CharT >:

Public Types

typedef CharT char_type
 
typedef std::basic_string< CharT > string_type
 
typedef
std::basic_ostringstream
< CharT > 
stringstream_type
 
typedef
time_type::date_type::year_type 
year_type
 
typedef
time_type::time_duration_type 
time_duration_type
 

Public Member Functions

 time_zone_base ()
 
virtual ~time_zone_base ()
 
virtual string_type dst_zone_abbrev () const =0
 String for the timezone when in daylight savings (eg: EDT) More...
 
virtual string_type std_zone_abbrev () const =0
 String for the zone when not in daylight savings (eg: EST) More...
 
virtual string_type dst_zone_name () const =0
 String for the timezone when in daylight savings (eg: Eastern Daylight Time) More...
 
virtual string_type std_zone_name () const =0
 String for the zone when not in daylight savings (eg: Eastern Standard Time) More...
 
virtual bool has_dst () const =0
 True if zone uses daylight savings adjustments otherwise false. More...
 
virtual time_type dst_local_start_time (year_type y) const =0
 Local time that DST starts – undefined if has_dst is false. More...
 
virtual time_type dst_local_end_time (year_type y) const =0
 Local time that DST ends – undefined if has_dst is false. More...
 
virtual time_duration_type base_utc_offset () const =0
 Base offset from UTC for zone (eg: -07:30:00) More...
 
virtual time_duration_type dst_offset () const =0
 Adjustment forward or back made while DST is in effect. More...
 
virtual string_type to_posix_string () const =0
 Returns a POSIX time_zone string for this object. More...
 

Detailed Description

template<typename time_type, typename CharT>
class boost::date_time::time_zone_base< time_type, CharT >

Interface class for dynamic time zones.

This class represents the base interface for all timezone representations. Subclasses may provide different systems for identifying a particular zone. For example some may provide a geographical based zone construction while others may specify the offset from GMT. Another possible implementation would be to convert from POSIX timezone strings. Regardless of the construction technique, this is the interface that these time zone types must provide.

Note that this class is intended to be used as a shared resource (hence the derivation from boost::counted_base.

Member Typedef Documentation

template<typename time_type, typename CharT>
typedef CharT boost::date_time::time_zone_base< time_type, CharT >::char_type
template<typename time_type, typename CharT>
typedef std::basic_string<CharT> boost::date_time::time_zone_base< time_type, CharT >::string_type
template<typename time_type, typename CharT>
typedef std::basic_ostringstream<CharT> boost::date_time::time_zone_base< time_type, CharT >::stringstream_type
template<typename time_type, typename CharT>
typedef time_type::time_duration_type boost::date_time::time_zone_base< time_type, CharT >::time_duration_type
template<typename time_type, typename CharT>
typedef time_type::date_type::year_type boost::date_time::time_zone_base< time_type, CharT >::year_type

Constructor & Destructor Documentation

template<typename time_type, typename CharT>
boost::date_time::time_zone_base< time_type, CharT >::time_zone_base ( )
inline
template<typename time_type, typename CharT>
virtual boost::date_time::time_zone_base< time_type, CharT >::~time_zone_base ( )
inlinevirtual

Member Function Documentation

template<typename time_type, typename CharT>
virtual time_duration_type boost::date_time::time_zone_base< time_type, CharT >::base_utc_offset ( ) const
pure virtual

Base offset from UTC for zone (eg: -07:30:00)

Implemented in boost::local_time::posix_time_zone_base< CharT >, and boost::local_time::custom_time_zone_base< CharT >.

template<typename time_type, typename CharT>
virtual time_type boost::date_time::time_zone_base< time_type, CharT >::dst_local_end_time ( year_type  y) const
pure virtual

Local time that DST ends – undefined if has_dst is false.

template<typename time_type, typename CharT>
virtual time_type boost::date_time::time_zone_base< time_type, CharT >::dst_local_start_time ( year_type  y) const
pure virtual

Local time that DST starts – undefined if has_dst is false.

template<typename time_type, typename CharT>
virtual time_duration_type boost::date_time::time_zone_base< time_type, CharT >::dst_offset ( ) const
pure virtual

Adjustment forward or back made while DST is in effect.

Implemented in boost::local_time::posix_time_zone_base< CharT >, and boost::local_time::custom_time_zone_base< CharT >.

template<typename time_type, typename CharT>
virtual string_type boost::date_time::time_zone_base< time_type, CharT >::dst_zone_abbrev ( ) const
pure virtual

String for the timezone when in daylight savings (eg: EDT)

Implemented in boost::local_time::posix_time_zone_base< CharT >, and boost::local_time::custom_time_zone_base< CharT >.

template<typename time_type, typename CharT>
virtual string_type boost::date_time::time_zone_base< time_type, CharT >::dst_zone_name ( ) const
pure virtual

String for the timezone when in daylight savings (eg: Eastern Daylight Time)

Implemented in boost::local_time::posix_time_zone_base< CharT >, and boost::local_time::custom_time_zone_base< CharT >.

template<typename time_type, typename CharT>
virtual bool boost::date_time::time_zone_base< time_type, CharT >::has_dst ( ) const
pure virtual

True if zone uses daylight savings adjustments otherwise false.

Implemented in boost::local_time::posix_time_zone_base< CharT >, and boost::local_time::custom_time_zone_base< CharT >.

template<typename time_type, typename CharT>
virtual string_type boost::date_time::time_zone_base< time_type, CharT >::std_zone_abbrev ( ) const
pure virtual

String for the zone when not in daylight savings (eg: EST)

Implemented in boost::local_time::posix_time_zone_base< CharT >, and boost::local_time::custom_time_zone_base< CharT >.

template<typename time_type, typename CharT>
virtual string_type boost::date_time::time_zone_base< time_type, CharT >::std_zone_name ( ) const
pure virtual

String for the zone when not in daylight savings (eg: Eastern Standard Time)

Implemented in boost::local_time::posix_time_zone_base< CharT >, and boost::local_time::custom_time_zone_base< CharT >.

template<typename time_type, typename CharT>
virtual string_type boost::date_time::time_zone_base< time_type, CharT >::to_posix_string ( ) const
pure virtual

Returns a POSIX time_zone string for this object.

Implemented in boost::local_time::posix_time_zone_base< CharT >, and boost::local_time::custom_time_zone_base< CharT >.


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