#include <DocMan.h>
Public Member Functions | |
ClientList (const std::string &eltName) | |
~ClientList () | |
bool | add (DocClient *client, bool front=false) |
Add a client to list. | |
bool | remove (DocClient *client) |
const std::string & | getName () |
which list are we? | |
void | invoke (DomElement *elt) |
call back each client in turn | |
Private Types | |
typedef std::vector< DocClient * >::const_iterator | ClientsIt |
Private Attributes | |
std::string | m_eltName |
std::vector< DocClient * > | m_clients |
Definition at line 52 of file DocMan.h.
typedef std::vector<DocClient*>::const_iterator xmlBase::DocMan::ClientList::ClientsIt [private] |
xmlBase::DocMan::ClientList::ClientList | ( | const std::string & | eltName | ) | [inline] |
xmlBase::DocMan::ClientList::~ClientList | ( | ) |
Definition at line 115 of file DocMan.cxx.
References m_clients.
00115 { 00116 m_clients.clear(); 00117 }
Add a client to list.
return indicates success or failure (e.g. duplicate). By default new client is added to back of list, but if front is set to true client will go to the front.
Definition at line 85 of file DocMan.cxx.
References xmlBase::DocClient::getName(), m_clients, and deljobs::string.
Referenced by xmlBase::DocMan::regClient().
00085 { 00086 ClientsIt it = m_clients.begin(); 00087 const std::string& clientName = client->getName(); 00088 while (it != m_clients.end() ) { 00089 // can't register for the same element type more than once 00090 if (clientName.compare((*it)->getName()) == 0 ) return 0; 00091 ++it; 00092 } 00093 if (front) m_clients.insert(m_clients.begin(), client); 00094 else m_clients.push_back(client); 00095 00096 return true; 00097 }
const std::string& xmlBase::DocMan::ClientList::getName | ( | ) | [inline] |
void xmlBase::DocMan::ClientList::invoke | ( | DomElement * | elt | ) |
Remove a client; return indicates success or failure (e.g., client not found)
Definition at line 101 of file DocMan.cxx.
References xmlBase::DocClient::getName().
std::vector<DocClient*> xmlBase::DocMan::ClientList::m_clients [private] |