Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members  

DLogic.hpp

Go to the documentation of this file.
00001 /* Copyright (C) Kwee Heong Tan 2002 - 2003
00002    Permission is granted to use this code without restriction as
00003    long as this copyright notice appears in all source files.
00004 */
00005 // $Id: DLogic.hpp,v 1.5 2002/11/21 18:08:50 khtan Exp $
00006 #include "DLogic.h"
00007 #include "DLogic.cpp"
00008 // DLogic*Functors, need .h and .cpp for template instantiation     
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 };

Generated on Mon Jan 20 11:54:26 2003 for ATPG by doxygen1.3-rc1