FACT++
1.0
|
Maintains a list of all services available in the Dim network. More...
#include <DimServiceInfoList.h>
Classes | |
struct | ServerInfo |
Public Types | |
typedef std::map< const std::string, std::vector< DimInfo * > > | ServiceInfoList |
typedef std::pair< std::string, bool > | ServiceType |
typedef std::map< const std::string, ServiceType > | TypeList |
typedef std::map< const std::string, std::pair< std::string, std::vector< Description > > > | DescriptionList |
typedef std::map< const std::string, ServerInfo > | ServiceList |
Public Types inherited from DimServerList | |
typedef std::vector< std::string > | ServerList |
Public Member Functions | |
void | AddServer (const std::string &s) |
void | RemoveServer (std::string) |
void | RemoveAllServers () |
DimServiceInfoList (DimServiceInfoListImp *list) | |
~DimServiceInfoList () | |
std::vector< std::string > | GetServiceList (bool iscmd=false) const |
std::vector< std::string > | GetServiceList (const std::string &server, bool iscmd=false) const |
std::vector< Description > | GetDescription (const std::string &server, const std::string &service) const |
std::vector< State > | GetStates (const std::string &server) const |
State | GetState (const std::string &server, int state) const |
int | IsCommand (const std::string &server, const std::string &service) const |
int | PrintDescription (std::ostream &out, bool iscmd, const std::string &serv="", const std::string &service="") const |
int | PrintStates (std::ostream &out, const std::string &serv="") const |
bool | SendDimCommand (std::ostream &lout, const std::string &server, const std::string &str) const |
void | SendDimCommand (const std::string &server, std::string str, std::ostream &lout) const |
void | SendDimCommand (const std::string &server, const std::string &str) const |
Public Member Functions inherited from DimServerList | |
DimServerList (DimServerListImp *list) | |
const ServerList & | GetServerList () const |
bool | HasServer (const std::string &server) const |
Public Member Functions inherited from DimInfoHandler | |
DimInfo * | getInfo () |
virtual | ~DimInfoHandler () |
Protected Member Functions | |
void | infoHandler () |
Private Member Functions | |
DimInfo * | CreateDimInfo (const std::string &str, const std::string &svc) const |
A mal containing all the available informations. More... | |
DimInfo * | CreateSL (const std::string &str) const |
DimInfo * | CreateFMT (const std::string &str) const |
DimInfo * | CreateDS (const std::string &str) const |
Private Attributes | |
DimServiceInfoListImp * | fList |
ServiceInfoList | fServiceInfoList |
ServiceList | fServiceList |
A map storing the service description to retrieve all informations. More... | |
Additional Inherited Members | |
Public Attributes inherited from DimInfoHandler | |
DimInfo * | itsService |
Maintains a list of all services available in the Dim network.
The idea of this class is to maintain a list of services available in the Dim network as well as state descriptions if available.
Therefore, it subscribes to the SERVICE_LIST, SERVICE_DESC and STATE_LIST services of all servers.
To maintain the list it derives from DimServerList which maintains a list of all servers.
To maintain the subscriptions it overwrites:
If a derived class also overwrites these functions it must be ensured that the member functions of DimServiceInfoList are still called properly.
Whenever a service is added or removed, or all services of one server is removed the following virtual functions are called:
Note, that these functions are not called from the RemoveServer() and RemoveAllServer() functions. It might be a difference whether all services were removed but the server is still online or the server went offline.
If a description or a state was added, this is signaled though:
Note, that Descriptions and States are never removed except a service or server goes offline. It is expected that if a service comes online also the list of descritions is sent again.
Definition at line 15 of file DimServiceInfoList.h.