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::special_values_formatter< CharT, OutItrT > Class Template Reference

Class that provides generic formmatting ostream formatting for special values. More...

#include <special_values_formatter.hpp>

Inheritance diagram for boost::date_time::special_values_formatter< CharT, OutItrT >:
Collaboration diagram for boost::date_time::special_values_formatter< CharT, OutItrT >:

Public Types

typedef std::basic_string< CharT > string_type
 
typedef CharT char_type
 
typedef std::vector< string_typecollection_type
 

Public Member Functions

 special_values_formatter ()
 Construct special values formatter using default strings. More...
 
 special_values_formatter (const char_type *const *begin, const char_type *const *end)
 Construct special values formatter from array of strings. More...
 
 special_values_formatter (typename collection_type::iterator beg, typename collection_type::iterator end)
 
OutItrT put_special (OutItrT next, const boost::date_time::special_values &value) const
 

Static Public Attributes

static const char_type default_special_value_names [3][17]
 Storage for the strings used to indicate special values. More...
 

Protected Attributes

collection_type m_special_value_names
 

Detailed Description

template<class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
class boost::date_time::special_values_formatter< CharT, OutItrT >

Class that provides generic formmatting ostream formatting for special values.

This class provides for the formmating of special values to an output stream. In particular, it produces strings for the values of negative and positive infinity as well as not_a_date_time.

While not a facet, this class is used by the date and time facets for formatting special value types.

Member Typedef Documentation

template<class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef CharT boost::date_time::special_values_formatter< CharT, OutItrT >::char_type
template<class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef std::vector<string_type> boost::date_time::special_values_formatter< CharT, OutItrT >::collection_type
template<class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef std::basic_string<CharT> boost::date_time::special_values_formatter< CharT, OutItrT >::string_type

Constructor & Destructor Documentation

template<class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
boost::date_time::special_values_formatter< CharT, OutItrT >::special_values_formatter ( )
inline

Construct special values formatter using default strings.

Default strings are not-a-date-time -infinity +infinity

template<class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
boost::date_time::special_values_formatter< CharT, OutItrT >::special_values_formatter ( const char_type *const *  begin,
const char_type *const *  end 
)
inline

Construct special values formatter from array of strings.

This constructor will take pair of iterators from an array of strings that represent the special values and copy them for use in formatting special values.

const char* const special_value_names[]={"nadt","-inf","+inf" };
special_value_formatter svf(&special_value_names[0], &special_value_names[3]);
template<class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
boost::date_time::special_values_formatter< CharT, OutItrT >::special_values_formatter ( typename collection_type::iterator  beg,
typename collection_type::iterator  end 
)
inline

Member Function Documentation

template<class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
OutItrT boost::date_time::special_values_formatter< CharT, OutItrT >::put_special ( OutItrT  next,
const boost::date_time::special_values value 
) const
inline

Member Data Documentation

template<class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
const special_values_formatter< CharT, OutItrT >::char_type boost::date_time::special_values_formatter< CharT, OutItrT >::default_special_value_names
static
Initial value:
= {
{'n','o','t','-','a','-','d','a','t','e','-','t','i','m','e'},
{'-','i','n','f','i','n','i','t','y'},
{'+','i','n','f','i','n','i','t','y'} }

Storage for the strings used to indicate special values.

template<class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
collection_type boost::date_time::special_values_formatter< CharT, OutItrT >::m_special_value_names
protected

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