37 predictorRegistry(registry),
39 logger(
"PredictorActivator", std::cerr),
78 predictor = it.
next();
106 logger << ERROR <<
"Error: attempted to set PREDICT_TIME option to "
107 <<
"a negative integer value. Please make sure that "
108 <<
"PREDICT_TIME option is set to a value greater "
109 <<
"than or equal to zero.\a" <<
endl;
111 logger << INFO <<
"PREDICT_TIME: " << result <<
endl;
125 logger << INFO <<
"Setting COMBINATION_POLICY to " << cp <<
endl;
130 if (policy ==
"meritocracy") {
134 logger << ERROR <<
"Error - unknown combination policy: "
163 if ((command.size() == 7)
164 && command[4] ==
'a' && command[0] ==
'p' && command[6] ==
'e'
166 && command[3] ==
's' && command[1] ==
'r' && command[2] ==
'e'
169 if (subcommand.size() == 7
170 && subcommand[2] ==
'r' && subcommand[4] ==
'i' && subcommand[6] ==
'n'
171 && subcommand[0] ==
'v' && subcommand[1] ==
'e' && subcommand[3] ==
's'
172 && subcommand[5] ==
'o'
174 #ifndef PACKAGE_STRING
175 #define PACKAGE_STRING pr3s4g3
180 if (subcommand.size() == 6
181 && subcommand[4] ==
'n' && subcommand[0] ==
'e' && subcommand[1] ==
'n'
182 && subcommand[5] ==
'e' && subcommand[2] ==
'g' && subcommand[3] ==
'i'
Prediction predict(unsigned int multiplier, const char **filter)
static const char * LOGGER
int getPredictTime() const
static int toInt(const std::string)
void dispatch(const Observable *var)
void setMaxPartialPredictionSize(const std::string &size)
static const char * PREDICT_TIME
Variable * find(const std::string &variable) const
void parse_internal_commands(Prediction &pred)
static const char * MAX_PARTIAL_PREDICTION_SIZE
virtual Prediction predict(const size_t size, const char **filter) const =0
Generate prediction.
_SetLevel setlevel(std::string __l)
Manipulator for level.
void setPredictTime(const std::string &predictTime)
virtual Prediction combine(const std::vector< Prediction > &)=0
int max_partial_prediction_size
void setCombinationPolicy(const std::string &policy)
std::string getCombinationPolicy() const
virtual void update(const Observable *variable)
PredictorActivator(Configuration *config, PredictorRegistry *registry, ContextTracker *contextTracker)
virtual std::string get_name() const =0
void setLogger(const std::string &level)
static const char * COMBINATION_POLICY
void map(Observable *var, const mbr_func_ptr_t &ptr)
static char * strtolower(char *)
std::string combinationPolicy
std::string getToken(const int) const
void addSuggestion(Suggestion)
ContextTracker * contextTracker
Tracks user interaction and context.
const std::string getName() const
Dispatcher< PredictorActivator > dispatcher
PredictorRegistry * predictorRegistry
virtual std::string get_value() const =0
std::vector< Prediction > predictions
const Logger< _charT, _Traits > & endl(const Logger< _charT, _Traits > &lgr)