| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Gaudi::Math::detail::_IDigits< TYPE, I, N1, N2 > Struct Template Reference

Helper structure for compile-time evaluation of range N1->N2 of decimal digits from the integral type. More...

#include <Digit.h>

Inheritance diagram for Gaudi::Math::detail::_IDigits< TYPE, I, N1, N2 >:

[legend]
List of all members.

Public Types

 value
 TYPE
 long
enum  {
  value, TYPE, TYPE, TYPE,
  long, long, value
}

Public Member Functions

 BOOST_STATIC_ASSERT (boost::integer_traits< TYPE >::is_specialized)
 BOOST_STATIC_ASSERT (boost::integer_traits< TYPE >::is_integral)
 BOOST_STATIC_ASSERT (!boost::integer_traits< TYPE >::is_signed)

Private Types

 _imax10 = boost::integer_traits<TYPE>::digits10
 check1 = N1 < N2
 check2 = N1 <= _imax10
 check3 = N2 <= _imax10 + 1
enum  { _imax10 = boost::integer_traits<TYPE>::digits10, check1 = N1 < N2, check2 = N1 <= _imax10, check3 = N2 <= _imax10 + 1 }

Private Member Functions

 BOOST_STATIC_ASSERT (check1)
 BOOST_STATIC_ASSERT (check2)
 BOOST_STATIC_ASSERT (check3)

Detailed Description

template<class TYPE, typename TypeWrapper< TYPE >::value_type I, unsigned int N1, unsigned int N2>
struct Gaudi::Math::detail::_IDigits< TYPE, I, N1, N2 >

Helper structure for compile-time evaluation of range N1->N2 of decimal digits from the integral type.

Attention:
the least significat decimal digit is numbered as #0
Author:
Vanya BELYAEV Ivan.Belyaev@nilkhef.nl
Date:
2008-07-31

Definition at line 148 of file Digit.h.


Member Enumeration Documentation

template<class TYPE, typename TypeWrapper< TYPE >::value_type I, unsigned int N1, unsigned int N2>
anonymous enum

Enumerator:
value 
TYPE 
TYPE 
TYPE 
long 
long 
value 

Definition at line 155 of file Digit.h.

00156           { 
00157             value = 
00158             Check10<TYPE,N1>::safe && Check10<TYPE,N2-N1>::safe     ?
00159             (I/Gaudi::Math::IPower<TYPE              ,10,N1>::value )%
00160             Gaudi::Math::IPower<TYPE,10,N2-N1>::value :
00161             (I/Gaudi::Math::IPower<unsigned long long,10,N1>::value )%
00162             Gaudi::Math::IPower<unsigned long long,10,N2-N1>::value 
00163           };

template<class TYPE, typename TypeWrapper< TYPE >::value_type I, unsigned int N1, unsigned int N2>
anonymous enum [private]

Enumerator:
_imax10 
check1 
check2 
check3 

Definition at line 167 of file Digit.h.

00167              {
00168           _imax10 = boost::integer_traits<TYPE>::digits10 ,
00169           check1  = N1 < N2 ,
00170           check2  = N1 <= _imax10 ,
00171           check3  = N2 <= _imax10 + 1 
00172         } ;


Member Function Documentation

template<class TYPE, typename TypeWrapper< TYPE >::value_type I, unsigned int N1, unsigned int N2>
Gaudi::Math::detail::_IDigits< TYPE, I, N1, N2 >::BOOST_STATIC_ASSERT ( boost::integer_traits< TYPE >::is_specialized   ) 

Reimplemented in Gaudi::Math::IDigits< TYPE, I, N1, N2 >.

template<class TYPE, typename TypeWrapper< TYPE >::value_type I, unsigned int N1, unsigned int N2>
Gaudi::Math::detail::_IDigits< TYPE, I, N1, N2 >::BOOST_STATIC_ASSERT ( boost::integer_traits< TYPE >::is_integral   ) 

Reimplemented in Gaudi::Math::IDigits< TYPE, I, N1, N2 >.

template<class TYPE, typename TypeWrapper< TYPE >::value_type I, unsigned int N1, unsigned int N2>
Gaudi::Math::detail::_IDigits< TYPE, I, N1, N2 >::BOOST_STATIC_ASSERT ( !boost::integer_traits< TYPE >::is_signed   ) 

Reimplemented in Gaudi::Math::IDigits< TYPE, I, N1, N2 >.

template<class TYPE, typename TypeWrapper< TYPE >::value_type I, unsigned int N1, unsigned int N2>
Gaudi::Math::detail::_IDigits< TYPE, I, N1, N2 >::BOOST_STATIC_ASSERT ( check1   )  [private]

template<class TYPE, typename TypeWrapper< TYPE >::value_type I, unsigned int N1, unsigned int N2>
Gaudi::Math::detail::_IDigits< TYPE, I, N1, N2 >::BOOST_STATIC_ASSERT ( check2   )  [private]

template<class TYPE, typename TypeWrapper< TYPE >::value_type I, unsigned int N1, unsigned int N2>
Gaudi::Math::detail::_IDigits< TYPE, I, N1, N2 >::BOOST_STATIC_ASSERT ( check3   )  [private]


The documentation for this struct was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:02:58 2011 for LHCbMath by doxygen 1.4.7