Adapter to create integer types with +-infinity, and not a value. More...
#include <int_adapter.hpp>
Public Types | |
typedef int_type_ | int_type |
Public Member Functions | |
int_adapter (int_type v) | |
bool | is_infinity () const |
bool | is_pos_infinity () const |
bool | is_neg_infinity () const |
bool | is_nan () const |
bool | is_special () const |
bool | operator== (const int_adapter &rhs) const |
bool | operator== (const int &rhs) const |
bool | operator!= (const int_adapter &rhs) const |
bool | operator!= (const int &rhs) const |
bool | operator< (const int_adapter &rhs) const |
bool | operator< (const int &rhs) const |
bool | operator> (const int_adapter &rhs) const |
int_type | as_number () const |
special_values | as_special () const |
Returns either special value type or is_not_special. More... | |
template<class rhs_type > | |
int_adapter | operator+ (const int_adapter< rhs_type > &rhs) const |
Operator allows for adding dissimilar int_adapter types. More... | |
int_adapter | operator+ (const int_type rhs) const |
template<class rhs_type > | |
int_adapter | operator- (const int_adapter< rhs_type > &rhs) const |
Operator allows for subtracting dissimilar int_adapter types. More... | |
int_adapter | operator- (const int_type rhs) const |
int_adapter | operator* (const int_adapter &rhs) const |
int_adapter | operator* (const int rhs) const |
Provided for cases when automatic conversion from 'int' to 'int_adapter' causes incorrect results. More... | |
int_adapter | operator/ (const int_adapter &rhs) const |
int_adapter | operator/ (const int rhs) const |
Provided for cases when automatic conversion from 'int' to 'int_adapter' causes incorrect results. More... | |
int_adapter | operator% (const int_adapter &rhs) const |
int_adapter | operator% (const int rhs) const |
Provided for cases when automatic conversion from 'int' to 'int_adapter' causes incorrect results. More... | |
Static Public Member Functions | |
static bool | has_infinity () |
static const int_adapter | pos_infinity () |
static const int_adapter | neg_infinity () |
static const int_adapter | not_a_number () |
static int_adapter max | BOOST_PREVENT_MACRO_SUBSTITUTION () |
static int_adapter min | BOOST_PREVENT_MACRO_SUBSTITUTION () |
static int_adapter | from_special (special_values sv) |
static bool | is_inf (int_type v) |
static bool | is_neg_inf (int_type v) |
static bool | is_pos_inf (int_type v) |
static bool | is_not_a_number (int_type v) |
static special_values | to_special (int_type v) |
Returns either special value type or is_not_special. More... | |
static int_type | maxcount () |
Adapter to create integer types with +-infinity, and not a value.
This class is used internally in counted date/time representations. It adds the floating point like features of infinities and not a number. It also provides mathmatical operations with consideration to special values following these rules:
typedef int_type_ boost::date_time::int_adapter< int_type_ >::int_type |
|
inline |
|
inline |
Referenced by boost::date_time::time_resolution_traits_adapted32_impl::as_number(), boost::date_time::time_resolution_traits_adapted64_impl::as_number(), boost::date_time::duration_traits_adapted::as_number(), boost::date_time::int_adapter< int_type_ >::is_inf(), boost::date_time::int_adapter< int_type_ >::is_infinity(), boost::date_time::int_adapter< int_type_ >::is_nan(), boost::date_time::int_adapter< int_type_ >::is_neg_inf(), boost::date_time::int_adapter< int_type_ >::is_neg_infinity(), boost::date_time::int_adapter< int_type_ >::is_not_a_number(), boost::date_time::int_adapter< int_type_ >::is_pos_inf(), boost::date_time::int_adapter< int_type_ >::is_pos_infinity(), boost::date_time::int_adapter< int_type_ >::operator+(), and boost::date_time::int_adapter< int_type_ >::operator-().
|
inline |
Returns either special value type or is_not_special.
References boost::date_time::int_adapter< int_type_ >::to_special().
|
inlinestatic |
References boost::accumulators::extract::max.
|
inlinestatic |
References boost::accumulators::extract::min.
|
inlinestatic |
References boost::accumulators::extract::max, boost::date_time::max_date_time, boost::accumulators::extract::min, boost::date_time::min_date_time, boost::date_time::neg_infin, boost::date_time::int_adapter< int_type_ >::neg_infinity(), boost::date_time::not_a_date_time, boost::date_time::int_adapter< int_type_ >::not_a_number(), boost::date_time::pos_infin, and boost::date_time::int_adapter< int_type_ >::pos_infinity().
|
inlinestatic |
|
inlinestatic |
|
inline |
References boost::date_time::int_adapter< int_type_ >::as_number(), boost::date_time::int_adapter< int_type_ >::neg_infinity(), and boost::date_time::int_adapter< int_type_ >::pos_infinity().
Referenced by boost::date_time::int_adapter< int_type_ >::is_special(), boost::date_time::int_adapter< int_type_ >::operator%(), boost::date_time::int_adapter< int_type_ >::operator+(), boost::date_time::int_adapter< int_type_ >::operator-(), and boost::date_time::int_adapter< int_type_ >::operator/().
|
inline |
References boost::date_time::int_adapter< int_type_ >::as_number(), and boost::date_time::int_adapter< int_type_ >::not_a_number().
Referenced by boost::date_time::int_adapter< int_type_ >::is_special(), boost::date_time::int_adapter< int_type_ >::operator+(), and boost::date_time::int_adapter< int_type_ >::operator-().
|
inlinestatic |
References boost::date_time::int_adapter< int_type_ >::as_number(), and boost::date_time::int_adapter< int_type_ >::neg_infinity().
Referenced by boost::date_time::int_adapter< int_type_ >::operator!=(), boost::date_time::int_adapter< int_type_ >::operator+(), boost::date_time::int_adapter< int_type_ >::operator-(), boost::date_time::int_adapter< int_type_ >::operator<(), boost::date_time::int_adapter< int_type_ >::operator==(), and boost::date_time::int_adapter< int_type_ >::to_special().
|
inline |
|
inlinestatic |
|
inlinestatic |
References boost::date_time::int_adapter< int_type_ >::as_number(), and boost::date_time::int_adapter< int_type_ >::pos_infinity().
Referenced by boost::date_time::int_adapter< int_type_ >::operator+(), boost::date_time::int_adapter< int_type_ >::operator-(), and boost::date_time::int_adapter< int_type_ >::to_special().
|
inline |
|
inline |
References boost::date_time::int_adapter< int_type_ >::is_infinity(), and boost::date_time::int_adapter< int_type_ >::is_nan().
Referenced by boost::date_time::int_adapter< int_type_ >::operator%(), boost::date_time::int_adapter< int_type_ >::operator*(), boost::date_time::int_adapter< int_type_ >::operator+(), boost::date_time::int_adapter< int_type_ >::operator-(), and boost::date_time::int_adapter< int_type_ >::operator/().
|
inlinestatic |
References boost::accumulators::extract::max.
|
inlinestatic |
References boost::accumulators::extract::min.
Referenced by boost::date_time::int_adapter< int_type_ >::from_special(), boost::date_time::int_adapter< int_type_ >::is_inf(), boost::date_time::int_adapter< int_type_ >::is_infinity(), boost::date_time::int_adapter< int_type_ >::is_neg_inf(), boost::date_time::int_adapter< int_type_ >::is_neg_infinity(), boost::date_time::int_adapter< int_type_ >::operator+(), and boost::date_time::int_adapter< int_type_ >::operator-().
|
inlinestatic |
References boost::accumulators::extract::max.
Referenced by boost::date_time::int_adapter< int_type_ >::from_special(), boost::date_time::int_adapter< int_type_ >::is_nan(), boost::date_time::int_adapter< int_type_ >::is_not_a_number(), boost::date_time::int_adapter< int_type_ >::operator%(), boost::date_time::int_adapter< int_type_ >::operator+(), boost::date_time::int_adapter< int_type_ >::operator-(), and boost::date_time::int_adapter< int_type_ >::operator/().
|
inline |
|
inline |
|
inline |
|
inline |
Provided for cases when automatic conversion from 'int' to 'int_adapter' causes incorrect results.
References boost::date_time::int_adapter< int_type_ >::is_special().
|
inline |
|
inline |
Provided for cases when automatic conversion from 'int' to 'int_adapter' causes incorrect results.
References boost::date_time::int_adapter< int_type_ >::is_special().
|
inline |
Operator allows for adding dissimilar int_adapter types.
The return type will match that of the the calling object's type
References boost::date_time::int_adapter< int_type_ >::as_number(), boost::date_time::int_adapter< int_type_ >::is_infinity(), boost::date_time::int_adapter< int_type_ >::is_nan(), boost::date_time::int_adapter< int_type_ >::is_neg_inf(), boost::date_time::int_adapter< int_type_ >::is_pos_inf(), boost::date_time::int_adapter< int_type_ >::is_special(), boost::date_time::int_adapter< int_type_ >::neg_infinity(), boost::date_time::int_adapter< int_type_ >::not_a_number(), and boost::date_time::int_adapter< int_type_ >::pos_infinity().
|
inline |
|
inline |
Operator allows for subtracting dissimilar int_adapter types.
The return type will match that of the the calling object's type
References boost::date_time::int_adapter< int_type_ >::as_number(), boost::date_time::int_adapter< int_type_ >::is_infinity(), boost::date_time::int_adapter< int_type_ >::is_nan(), boost::date_time::int_adapter< int_type_ >::is_neg_inf(), boost::date_time::int_adapter< int_type_ >::is_pos_inf(), boost::date_time::int_adapter< int_type_ >::is_special(), boost::date_time::int_adapter< int_type_ >::neg_infinity(), boost::date_time::int_adapter< int_type_ >::not_a_number(), and boost::date_time::int_adapter< int_type_ >::pos_infinity().
|
inline |
|
inline |
|
inline |
Provided for cases when automatic conversion from 'int' to 'int_adapter' causes incorrect results.
References boost::date_time::int_adapter< int_type_ >::is_special().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
References boost::accumulators::extract::max.
Referenced by boost::date_time::int_adapter< int_type_ >::from_special(), boost::date_time::int_adapter< int_type_ >::is_inf(), boost::date_time::int_adapter< int_type_ >::is_infinity(), boost::date_time::int_adapter< int_type_ >::is_pos_inf(), boost::date_time::int_adapter< int_type_ >::is_pos_infinity(), boost::date_time::int_adapter< int_type_ >::operator+(), and boost::date_time::int_adapter< int_type_ >::operator-().
|
inlinestatic |
Returns either special value type or is_not_special.
References boost::date_time::int_adapter< int_type_ >::is_neg_inf(), boost::date_time::int_adapter< int_type_ >::is_not_a_number(), boost::date_time::int_adapter< int_type_ >::is_pos_inf(), boost::date_time::neg_infin, boost::date_time::not_a_date_time, boost::date_time::not_special, and boost::date_time::pos_infin.
Referenced by boost::date_time::int_adapter< int_type_ >::as_special().