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

Wrapper class to represent months in gregorian based calendar. More...

#include <greg_month.hpp>

Inheritance diagram for boost::gregorian::greg_month:
Collaboration diagram for boost::gregorian::greg_month:

Public Types

typedef date_time::months_of_year month_enum
 
typedef std::map< std::string,
unsigned short > 
month_map_type
 
typedef boost::shared_ptr
< month_map_type
month_map_ptr_type
 
typedef value_policies::value_type value_type
 

Public Member Functions

 greg_month (month_enum theMonth)
 Construct a month from the months_of_year enumeration. More...
 
 greg_month (unsigned short theMonth)
 Construct from a short value. More...
 
 operator unsigned short () const
 Convert the value back to a short. More...
 
unsigned short as_number () const
 Returns month as number from 1 to 12. More...
 
month_enum as_enum () const
 
const char * as_short_string () const
 
const char * as_long_string () const
 
const wchar_t * as_short_wstring () const
 
const wchar_t * as_long_wstring () const
 
const char * as_short_string (char) const
 
const char * as_long_string (char) const
 
const wchar_t * as_short_string (wchar_t) const
 
const wchar_t * as_long_string (wchar_t) const
 
 operator value_type () const
 Coerce into the representation type. More...
 

Static Public Member Functions

static month_map_ptr_type get_month_map_ptr ()
 Shared pointer to a map of Month strings (Names & Abbrev) & numbers. More...
 
static value_type max BOOST_PREVENT_MACRO_SUBSTITUTION ()
 Return the max allowed value (traits method) More...
 
static value_type min BOOST_PREVENT_MACRO_SUBSTITUTION ()
 Return the min allowed value (traits method) More...
 

Protected Attributes

value_type value_
 

Detailed Description

Wrapper class to represent months in gregorian based calendar.

Member Typedef Documentation

typedef std::map<std::string, unsigned short> boost::gregorian::greg_month::month_map_type
template<class value_policies >
typedef value_policies::value_type boost::CV::constrained_value< value_policies >::value_type
inherited

Constructor & Destructor Documentation

boost::gregorian::greg_month::greg_month ( month_enum  theMonth)
inline

Construct a month from the months_of_year enumeration.

boost::gregorian::greg_month::greg_month ( unsigned short  theMonth)
inline

Construct from a short value.

Member Function Documentation

month_enum boost::gregorian::greg_month::as_enum ( ) const
inline
const char* boost::gregorian::greg_month::as_long_string ( ) const
const char* boost::gregorian::greg_month::as_long_string ( char  ) const
inline
const wchar_t* boost::gregorian::greg_month::as_long_string ( wchar_t  ) const
inline
const wchar_t* boost::gregorian::greg_month::as_long_wstring ( ) const
unsigned short boost::gregorian::greg_month::as_number ( ) const
inline

Returns month as number from 1 to 12.

Referenced by boost::serialization::save().

const char* boost::gregorian::greg_month::as_short_string ( ) const
const char* boost::gregorian::greg_month::as_short_string ( char  ) const
inline
const wchar_t* boost::gregorian::greg_month::as_short_string ( wchar_t  ) const
inline
const wchar_t* boost::gregorian::greg_month::as_short_wstring ( ) const
template<class value_policies >
static value_type max boost::CV::constrained_value< value_policies >::BOOST_PREVENT_MACRO_SUBSTITUTION ( )
inlinestaticinherited

Return the max allowed value (traits method)

References boost::accumulators::extract::max.

template<class value_policies >
static value_type min boost::CV::constrained_value< value_policies >::BOOST_PREVENT_MACRO_SUBSTITUTION ( )
inlinestaticinherited

Return the min allowed value (traits method)

References boost::accumulators::extract::min.

static month_map_ptr_type boost::gregorian::greg_month::get_month_map_ptr ( )
static

Shared pointer to a map of Month strings (Names & Abbrev) & numbers.

boost::gregorian::greg_month::operator unsigned short ( ) const
inline

Convert the value back to a short.

template<class value_policies >
boost::CV::constrained_value< value_policies >::operator value_type ( ) const
inlineinherited

Coerce into the representation type.

References boost::CV::constrained_value< value_policies >::value_.

Member Data Documentation


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