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

Definition at line 1999 of file fadctrl.cc.

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

2000  {
2001  if (!conf.HasDef(name, sub))
2002  {
2003  T::Error("Neither "+name+"default nor "+name+sub+" found.");
2004  return false;
2005  }
2006 
2007  const V val = conf.GetDef<V>(name, sub);
2008 
2009  if (val<=max)
2010  return true;
2011 
2012  ostringstream str;
2013  str << name << sub << "=" << val << " exceeds allowed maximum of " << max << "!";
2014  T::Error(str);
2015 
2016  return false;
2017  }
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: