FACT++  1.0
template<class T , class S >
template<class V >
bool StateMachineFTM< T, S >::CheckConfigVal ( Configuration conf,
max,
const string &  name,
const string &  sub 
)
inline

Definition at line 2462 of file ftmctrl.cc.

References Error(), Configuration::GetDef(), Configuration::HasDef(), and str.

2463  {
2464  if (!conf.HasDef(name, sub))
2465  {
2466  T::Error("Neither "+name+"default nor "+name+sub+" found.");
2467  return false;
2468  }
2469 
2470  const V val = conf.GetDef<V>(name, sub);
2471 
2472  if (val<=max)
2473  return true;
2474 
2475  ostringstream str;
2476  str << name << sub << "=" << val << " exceeds allowed maximum of " << max << "!";
2477  T::Error(str);
2478 
2479  return false;
2480  }
char str[80]
Definition: test_client.c:7
T GetDef(const std::string &var, const S &val)
Error()
Definition: HeadersFTM.h:197
bool HasDef(const std::string &var, const T &val)

+ Here is the call graph for this function: