00001
00002
00003
00004
00005
00006 #include "DLogic.h"
00007 #include "DLogic.cpp"
00008
00009 #include <functional>
00010
00011 template<typename T>
00012 struct DLogicNotFunctor : std::unary_function<T,T>{
00013 const T& operator()(const T& rhs) const{
00014 return (! rhs);
00015 }
00016 };
00017 template<typename T>
00018 struct DLogicAndFunctor : std::binary_function<T,T,T>{
00019 const T& operator()(const T& lhs,const T& rhs) const{
00020 return ( lhs && rhs );
00021 }
00022 };
00023 template<typename T>
00024 struct DLogicOrFunctor : std::binary_function<T,T,T>{
00025 const T& operator()(const T& lhs, const T& rhs) const{
00026 return (lhs || rhs);
00027 }
00028 };