FACT++  1.0
DimServerList.h
Go to the documentation of this file.
1 #ifndef FACT_DimServerList
2 #define FACT_DimServerList
3 
4 #include <vector>
5 #include <string>
6 
7 #include "dic.hxx"
8 
9 class DimServerListImp;
10 
12 {
13 public:
14  typedef std::vector<std::string> ServerList;
15 
16 private:
18  ServerList fServerList;
20 
21 protected:
22  void infoHandler();
23 
24 public:
26 
28  const ServerList &GetServerList() const { return fServerList; }
29 
32  bool HasServer(const std::string &server) const;
33 };
34 
36 {
38 
39 public:
40  DimServerListImp() : fList(this) { }
41  virtual ~DimServerListImp() { }
42 
43  virtual void AddServer(const std::string &) { };
44  virtual void RemoveServer(std::string) { };
45  virtual void RemoveAllServers() { };
46 
48  const DimServerList::ServerList &GetServerList() const { return fList.GetServerList(); }
49 
52  bool HasServer(const std::string &server) const { return fList.HasServer(server); }
53 };
54 
55 #endif
56 
57 // ***************************************************************************
69 // ***************************************************************************
82 // ***************************************************************************
92 // ***************************************************************************
bool HasServer(const std::string &server) const
Definition: DimServerList.h:52
virtual void RemoveAllServers()
Definition: DimServerList.h:45
std::vector< std::string > ServerList
Definition: DimServerList.h:14
Definition: dic.hxx:31
virtual void AddServer(const std::string &)
Definition: DimServerList.h:43
DimServerListImp * fList
Definition: DimServerList.h:17
bool HasServer(const std::string &server) const
virtual void RemoveServer(std::string)
Definition: DimServerList.h:44
DimServerList fList
Definition: DimServerList.h:37
const ServerList & GetServerList() const
Definition: DimServerList.h:28
void infoHandler()
A DimInfo to retrieve the SERVER_LIST from teh DNS server.
DimInfo fDimServers
A list with the available servers.
Definition: DimServerList.h:19
DimServerList(DimServerListImp *list)
virtual ~DimServerListImp()
Definition: DimServerList.h:41
const DimServerList::ServerList & GetServerList() const
Definition: DimServerList.h:48
Maintains a list of all servers based on DIS_DNS/SERVER_LIST.
Definition: DimServerList.h:11
ServerList fServerList
Definition: DimServerList.h:18