ACE  6.1.0
Public Types | Public Member Functions
ACE_Utils::Truncator< FROM, TO > Struct Template Reference

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

#include <Truncate.h>

List of all members.

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

 ACE_STATIC_CONSTANT (bool, MAX_FROM_GT_MAX_TO=(sizeof(FROM) > sizeof(TO)||(sizeof(FROM)==sizeof(TO)&&Sign_Check< FROM >::is_signed==0)))
TO operator() (FROM val)

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 >
ACE_Utils::Truncator< FROM, TO >::ACE_STATIC_CONSTANT ( bool  ,
MAX_FROM_GT_MAX_TO  = (sizeof(FROM) > sizeof(TO)||(sizeof(FROM)==sizeof(TO)&&Sign_Check< FROM >::is_signed==0)) 
)
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.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines