FACT++  1.0
template<class S >
int RunDim ( Configuration conf)

Definition at line 444 of file dclient5.cc.

References Configuration::Get(), Configuration::Has(), kRed, and WindowLog::OpenLogFile().

445 {
446  /*
447  initscr(); // Start curses mode
448  cbreak(); // Line buffering disabled, Pass on
449  intrflush(stdscr, FALSE);
450  start_color(); // Initialize ncurses colors
451  use_default_colors(); // Assign terminal default colors to -1
452  for (int i=1; i<8; i++)
453  init_pair(i, i, -1); // -1: def background
454  scrollok(stdscr, true);
455  */
456 
457  WindowLog wout;
458 
459  //log.SetWindow(stdscr);
460  if (conf.Has("log"))
461  if (!wout.OpenLogFile(conf.Get<string>("log")))
462  wout << kRed << "ERROR - Couldn't open log-file " << conf.Get<string>("log") << ": " << strerror(errno) << endl;
463 
464  // Start io_service.Run to use the StateMachineImp::Run() loop
465  // Start io_service.run to only use the commandHandler command detaching
466  StateMachineFAD<S> io_service("DATA_LOGGER", wout);
467  io_service.Run();
468 
469  return 0;
470 }
A C++ ostream to an ncurses window supporting attributes and colors.
Definition: WindowLog.h:50
T Get(const std::string &var)
Set color Red.
Definition: WindowLog.h:17
bool Has(const std::string &var)
bool OpenLogFile(const std::string &filename, bool append=false)
Open a log-file.
Definition: WindowLog.cc:111

+ Here is the call graph for this function: