diff options
Diffstat (limited to 'basebmp/inc/basebmp/accessorfunctors.hxx')
-rw-r--r-- | basebmp/inc/basebmp/accessorfunctors.hxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/basebmp/inc/basebmp/accessorfunctors.hxx b/basebmp/inc/basebmp/accessorfunctors.hxx index 1d5464ac0c2f..32f4e60a85b4 100644 --- a/basebmp/inc/basebmp/accessorfunctors.hxx +++ b/basebmp/inc/basebmp/accessorfunctors.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ template< typename T > struct XorFunctor : public std::binary_function<T,T,T> //----------------------------------------------------------------------------- /// Base class, passing on the arg types -template< typename T, typename M > struct MaskFunctorBase : +template< typename T, typename M > struct MaskFunctorBase : public TernaryFunctorBase<T,M,T,T> {}; @@ -61,8 +61,8 @@ template< typename T, typename M > struct MaskFunctorBase : transparency, i.e. the original value will display. And vice versa. */ -template< typename T, - typename M, +template< typename T, + typename M, bool polarity > struct GenericOutputMaskFunctor : public MaskFunctorBase<T,M> { /// Ternary mask operation - selects v1 for !m == polarity, v2 otherwise @@ -75,14 +75,14 @@ template< typename T, /** Let a mask bit decide between two values (specialization for integer mask types) */ -template< typename T, +template< typename T, typename M, bool polarity > struct IntegerOutputMaskFunctor; -template< typename T, +template< typename T, typename M > struct IntegerOutputMaskFunctor<T,M,true> : public MaskFunctorBase<T,M> { /** Mask v with state of m - + @return v2, if m != 0, v1 otherwise. */ T operator()( T v1, M m, T v2 ) const @@ -94,11 +94,11 @@ template< typename T, return v1*(M)(1-mask) + v2*mask; } }; -template< typename T, +template< typename T, typename M > struct IntegerOutputMaskFunctor<T,M,false> : public MaskFunctorBase<T,M> { /** Mask v with state of m - + @return v2, if m != 0, v1 otherwise. */ T operator()( T v1, M m, T v2 ) const @@ -115,7 +115,7 @@ template< typename T, binary-valued mask types) */ template< typename T, typename M, bool polarity > struct FastIntegerOutputMaskFunctor; -template< typename T, typename M > struct FastIntegerOutputMaskFunctor<T,M,true> : +template< typename T, typename M > struct FastIntegerOutputMaskFunctor<T,M,true> : public MaskFunctorBase<T,M> { /// Specialization, only valid if mask can only attain 0 or 1 @@ -126,7 +126,7 @@ template< typename T, typename M > struct FastIntegerOutputMaskFunctor<T,M,true> return v1*(M)(1-m) + v2*m; } }; -template< typename T, typename M > struct FastIntegerOutputMaskFunctor<T,M,false> : +template< typename T, typename M > struct FastIntegerOutputMaskFunctor<T,M,false> : public MaskFunctorBase<T,M> { /// Specialization, only valid if mask can only attain 0 or 1 @@ -167,14 +167,14 @@ private: public: BinaryFunctorSplittingWrapper() : maFunctor() {} - template< class A > explicit - BinaryFunctorSplittingWrapper( + template< class A > explicit + BinaryFunctorSplittingWrapper( BinaryFunctorSplittingWrapper<A> const& src ) : maFunctor(src.maFunctor) {} - template< class F > explicit + template< class F > explicit BinaryFunctorSplittingWrapper( F const& func ) : maFunctor(func) {} - typename Functor::result_type operator()( + typename Functor::result_type operator()( typename Functor::first_argument_type v1, std::pair< typename Functor::third_argument_type, typename Functor::second_argument_type > const& v2 ) const |