00001 #ifndef MAPPER_H
00002 #define MAPPER_H
00003
00005 template<class KeyA, class A, class KeyB, class B, class C>
00006 class Mapper
00007 {
00008 public:
00010 #ifndef MRI_USE_MULTIMAP
00011 virtual vector< pair<KeyB,B> > run( vector< pair<KeyA,A> > & ) = 0 ;
00012 #else
00013 virtual multimap<KeyB,B> run( vector< pair<KeyA,A> > & ) = 0 ;
00014 #endif
00015
00016 virtual vector< pair<KeyB,B> > map( pair<KeyA,A> ) = 0 ;
00017 private:
00018 MapReduce<KeyA,A,KeyB,B,C> * mapReduce;
00019 };
00020
00022 class StrMapper : public Mapper<string,string,string,string,string> {};
00023
00024 #endif