00001 #ifndef InitServersMODULE_HPP_
00002 #define InitServersMODULE_HPP_
00003
00004 #include "../OptFrameModule.hpp"
00005
00006 template<class R, class M>
00007 class InitServersModule : public OptFrameModule<R,M>
00008 {
00009 public:
00010 string id()
00011 {
00012 return "initservers";
00013 }
00014 string usage()
00015 {
00016 return "initservers";
00017 }
00018
00019 void run(vector<OptFrameModule<R,M>*>, HeuristicFactory<R,M>* factory, map<string,string>* dictionary, string rest)
00020 {
00021 factory->mapReduce->initServers(factory->argc,factory->argv);
00022 }
00023
00024 virtual string preprocess(map<string,string>*, string input)
00025 {
00026 Scanner scanner(input);
00027
00028
00029
00030 string input2 = "";
00031
00032 while(scanner.hasNextChar())
00033 {
00034 char c = scanner.nextChar();
00035 if(c != '%')
00036 input2 += c;
00037 else
00038 break;
00039 }
00040
00041 return input2;
00042 }
00043
00044 };
00045
00046 #endif