00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_CONCEPT_BASEFUNCTOR_H 00006 #define BALL_CONCEPT_BASEFUNCTOR_H 00007 00008 #ifndef BALL_COMMON_GLOBAL_H 00009 # include <BALL/COMMON/global.h> 00010 #endif 00011 00012 namespace BALL 00013 { 00014 00020 00024 template <class ArgumentType, class ResultType> 00025 class BALL_EXPORT UnaryFunctor 00026 { 00027 public: 00028 00032 00035 typedef ResultType result_type; 00036 00039 typedef ArgumentType argument_type; 00040 00043 typedef ArgumentType& argument_reference; 00044 00047 typedef const ArgumentType& const_argument_reference; 00048 00051 typedef ArgumentType* argument_pointer; 00052 00055 typedef const ArgumentType* const_argument_pointer; 00056 00058 }; 00059 00063 template <class FirstArgumentType, class SecondArgumentType, class ResultType> 00064 class BALL_EXPORT BinaryFunctor 00065 { 00066 public: 00067 00071 00074 typedef ResultType result_type; 00075 00078 typedef FirstArgumentType first_argument_type; 00081 typedef FirstArgumentType & first_argument_reference; 00084 typedef const FirstArgumentType & const_first_argument_reference; 00087 typedef FirstArgumentType * first_argument_pointer; 00090 typedef const FirstArgumentType * const_first_argument_pointer; 00091 00094 typedef SecondArgumentType second_argument_type; 00097 typedef SecondArgumentType & second_argument_reference; 00100 typedef const SecondArgumentType & const_second_argument_reference; 00103 typedef SecondArgumentType * second_argument_pointer; 00106 typedef const SecondArgumentType * const_second_argument_pointer; 00107 00109 }; 00110 00112 00113 } // namespace BALL 00114 00115 #endif // BALL_CONCEPT_BASEFUNCTOR_H