plll
1.0
|
Provides conversion implementation from type SourceType
to DestContext::Type
.
More...
#include <arithmetic.hpp>
Provides conversion implementation from type SourceType
to DestContext::Type
.
Every instantiation should provide the following member types:
RetVal
: return value for the convert()
function.RetVal_Frac
: return value for the convert_frac()
function. Should be void
if DestContext::is_real
is false
.RetVal_Floor
: return value for the convert_floor()
function. Should be void
if DestContext::is_int
is false
or type_traits<SourceType>::is_real
is false
RetVal_Round
: return value for the convert_round()
function. Should be void
if DestContext::is_int
is false
or type_traits<SourceType>::is_real
is false
RetVal_Round2
: return value for the convert_round()
function which also retrieves rounding information. Should be void
if DestContext::is_int
is false
or type_traits<SourceType>::is_real
is false
RetVal_Ceil
: return value for the convert_ceil()
function. Should be void
if DestContext::is_int
is false
or type_traits<SourceType>::is_real
is false
The following static functions should always be provided:
void convert(typename Context::Type &, const typename Context::Type &, const Context &)
RetVal convert(const typename Context::Type &, const Context &)
The following static functions should be provided if DestContext::is_real
is true:
void convert_frac(typename Context::Type &, const typename Context::Type &, const typename Context::Type &, const Context &)
RetVal_Frac convert_frac(const typename Context::Type &, const typename Context::Type &, const Context &)
The following static functions should be provided if both DestContext::is_int
and type_traits<SourceType>::is_real
are true
:
void floor(typename Context::Type &, const typename Context::Type &, const Context &)
RetVal_Floor floor(const typename Context::Type &, const Context &)
void round(typename Context::Type &, const typename Context::Type &, const Context &)
RetVal_Round round(const typename Context::Type &, const Context &)
void round(typename Context::Type &, const typename Context::Type &, bool &, const Context &)
RetVal_Round2 round(const typename Context::Type &, bool &, const Context &)
void ceil(typename Context::Type &, const typename Context::Type &, const Context &)
RetVal_Ceil ceil(const typename Context::Type &, const Context &)
Definition at line 713 of file arithmetic.hpp.