5 fInfoState((name +
"/STATE").c_str(), (void*)NULL, 0, this)
50 for (ClientList::iterator
i=fClientList.begin();
51 i!=fClientList.end();
i++)
76 const ClientList::iterator v = fClientList.find(s);
77 if (v!=fClientList.end())
80 err <<
"Server '" << s <<
"' in list not as it ought to be.";
81 throw runtime_error(err.str());
105 const ClientList::iterator v = fClientList.find(s);
106 if (v==fClientList.end())
109 err <<
"Server '" << s <<
"' not in list as it ought to be.";
110 throw runtime_error(err.str());
116 fClientList.erase(v);
140 const ClientList::const_iterator v = fClientList.find(server);
141 return v==fClientList.end() ? -2 : v->second->GetState();
void DeleteClientList()
Delete all StateClient objects from teh list and clear the list.
The base implementation of a distributed messaging system.
void StateChanged(const Time &time, const std::string &server, const std::string &msg, int state)
Adds some functionality to boost::posix_time::ptime for our needs.
int GetCurrentState(const string &server) const
DimStampedInfo fInfoState
-2 not initialized, -1 not connected, 0>= state of client
int getTimestampMillisecs()
void RemoveServer(std::string s)
void AddServer(const std::string &s)
A list with all MESSAGE services to which we subscribed.
virtual void RemoveServer(std::string s)
StateClient(const std::string &name, MessageImp &imp)
Based on MessageImp, subscribes to a MESSAGE service in the Dim network.
void infoHandler()
The dim service subscription.
int fState
Combine into one MTime (together with value)
virtual void RemoveAllServers()
virtual void AddServer(const std::string &s)