FACT++  1.0
void DimServiceInfoList::AddServer ( const std::string &  s)

Adds the service subscription for SERVICE_LIST, SERVICE_DESC and STATE_LIST for the given server. Don't forget to call this function if it is overwritten in a derived class.

Parameters
sserver which should be added
Exceptions
aruntime_error is the server is already in the list

Definition at line 90 of file DimServiceInfoList.cc.

Referenced by DimServiceInfoListImp::AddServer(), and CreateDS().

91 {
92  // Check if this server is already in the list.
93  // This should never happen if Dim works reliable
94  const ServiceInfoList::iterator v = fServiceInfoList.find(s);
95  if (v!=fServiceInfoList.end())
96  {
97  stringstream err;
98  err << "DimServiceInfoList: Server '" << s << "' in list not as it ought to be.";
99  throw runtime_error(err.str());
100  }
101 
102  fServiceInfoList[s].push_back(CreateSL(s));
103  fServiceInfoList[s].push_back(CreateFMT(s));
104  fServiceInfoList[s].push_back(CreateDS(s));
105 }
DimInfo * CreateFMT(const std::string &str) const
DimInfo * CreateSL(const std::string &str) const
ServiceInfoList fServiceInfoList
DimInfo * CreateDS(const std::string &str) const

+ Here is the caller graph for this function: