FACT++  1.0
Bool_t MVideo::SetControls ( TEnv &  env) const

Definition at line 316 of file MVideo.cc.

References fControls, MVideoCtrl::fDefault, str, and WriteControl().

317 {
318  Bool_t rc = kTRUE;
319 
320  TIter Next(&fControls);
321  TObject *o = 0;
322  while ((o=Next()))
323  {
324  if (!env.Defined(o->GetName()))
325  continue;
326 
327  TString str = env.GetValue(o->GetName(), "");
328  str = str.Strip(TString::kBoth);
329  str.ReplaceAll(" ", "_");
330  str.ReplaceAll(":", "_");
331  if (str.IsNull())
332  continue;
333 
334  MVideoCtrl &ctrl = *static_cast<MVideoCtrl*>(o);
335 
336  const Int_t val = str=="default" || str=="def" ?
337  ctrl.fDefault : env.GetValue(o->GetName(), 0);
338 
339  if (!WriteControl(ctrl, val))
340  rc = kFALSE;
341  }
342 
343  return rc;
344 }
char str[80]
Definition: test_client.c:7
TList fControls
Definition: MVideo.h:71
Bool_t WriteControl(MVideoCtrl &vctrl, Int_t val) const
Definition: MVideo.cc:286
Int_t fDefault
Definition: MVideo.h:36

+ Here is the call graph for this function: