FACT++  1.0
void DimServiceInfoList::RemoveServer ( std::string  s)

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

Parameters
sserver which should be removed. We need to make a copy, otherwise RemoveServer will destroy the staring the reference is pointing to
Exceptions
aruntime_error is the server to be removed is not in the list

Definition at line 121 of file DimServiceInfoList.cc.

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

122 {
124 
125  const ServiceInfoList::iterator v = fServiceInfoList.find(s);
126  if (v==fServiceInfoList.end())
127  return;
128  /*
129  {
130  stringstream err;
131  err << "DimServiceInfoList: Server '" << s << "' not in list as it ought to be.";
132  throw runtime_error(err.str());
133  }*/
134 
135  // Remove the server from the server list
136  delete v->second[0];
137  delete v->second[1];
138  delete v->second[2];
139 
140  fServiceInfoList.erase(v);
141  fServiceList.erase(s);
142 }
ServiceList fServiceList
A map storing the service description to retrieve all informations.
virtual void RemoveAllServices(const std::string &)
DimServiceInfoListImp * fList
ServiceInfoList fServiceInfoList

+ Here is the caller graph for this function: