FACT++  1.0
void DataLogger::AddServer ( const string &  server)
private

Add a new server subscription.

Definition at line 535 of file datalogger.cc.

References Debug, HandleDescriptions(), DimDescriptions::SetCallbackDescriptions(), str, and DimDescriptions::Subscribe().

Referenced by DataLogger().

536 {
537  Info("Got request to add server " + server );
538  if (server != "DIS_DNS")
539  {
540  for (auto it=fServerDescriptionsList.begin(); it != fServerDescriptionsList.end(); it++)
541  if ((*it)->server == server)
542  {
543  if (fDebugIsOn)
544  {
545  ostringstream str;
546  str << "Already got description for server " << server << ". Ignoring." << endl;
547  Debug(str.str());
548  return;
549  }
550  }
551  DimDescriptions* d = new DimDescriptions(server);
553  d->Subscribe(*this);
554  fServerDescriptionsList.push_back(d);
555  }
556 
557 }
vector< DimDescriptions * > fServerDescriptionsList
Definition: datalogger.cc:401
int Debug(const std::string &str)
Definition: MessageImp.h:45
char str[80]
Definition: test_client.c:7
bool fDebugIsOn
configuration flags
Definition: datalogger.cc:315
int HandleDescriptions(DimDescriptions *desc)
the two methods below were copied from StateMachineDimControl.cc
Definition: datalogger.cc:415
void SetCallbackDescriptions(const callback_desc &cb)
Definition: DimState.h:197
int Info(const std::string &str)
Definition: MessageImp.h:47
virtual void Subscribe(StateMachineImp &imp)
Definition: DimState.h:189

+ Here is the call graph for this function:

+ Here is the caller graph for this function: