ACE  6.4.2
Public Types | Public Member Functions | Static Public Attributes | List of all members
ACE_Utils::Truncator< FROM, TO > Struct Template Reference

Truncate value of type FROM to value of type TO. More...

#include <Truncate.h>

Public Types

typedef ACE::If_Then_Else< MAX_FROM_GT_MAX_TO, FROM, TO >::result_type comp_to_type
 
typedef ACE::If_Then_Else< MAX_FROM_GT_MAX_TO, Fast_Comparator< FROM, comp_to_type >, typename Comparator< FROM, comp_to_type >::comp_type >::result_type comparator
 

Public Member Functions

TO operator() (FROM val)
 

Static Public Attributes

static bool const MAX_FROM_GT_MAX_TO
 

Detailed Description

template<typename FROM, typename TO>
struct ACE_Utils::Truncator< FROM, TO >

Truncate value of type FROM to value of type TO.

Truncate a value of type FROM to value of type TO, if the value is larger than the maximum of value of type TO.

Member Typedef Documentation

template<typename FROM , typename TO >
typedef ACE::If_Then_Else< MAX_FROM_GT_MAX_TO, FROM, TO>::result_type ACE_Utils::Truncator< FROM, TO >::comp_to_type
template<typename FROM , typename TO >
typedef ACE::If_Then_Else< MAX_FROM_GT_MAX_TO, Fast_Comparator<FROM, comp_to_type>, typename Comparator<FROM, comp_to_type>::comp_type>::result_type ACE_Utils::Truncator< FROM, TO >::comparator

Member Function Documentation

template<typename FROM , typename TO >
TO ACE_Utils::Truncator< FROM, TO >::operator() ( FROM  val)
inline

Truncate a value of type FROM to value of type TO, if the value is larger than the maximum of value of type TO.

Member Data Documentation

template<typename FROM , typename TO >
bool const ACE_Utils::Truncator< FROM, TO >::MAX_FROM_GT_MAX_TO
static
Initial value:
= (sizeof(FROM) > sizeof (TO)
|| (sizeof(FROM) == sizeof (TO)
&& Sign_Check<FROM>::is_signed == 0))

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