Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

xmlBase::DocMan::ClientList Class Reference

Nested class to keep track of clients for one element type. More...

#include <DocMan.h>

List of all members.

Public Member Functions

bool add (DocClient *client, bool front=false)
 Add a client to list.
bool add (DocClient *client, bool front=false)
 Add a client to list.
 ClientList (const std::string &eltName)
 ClientList (const std::string &eltName)
const std::string & getName ()
 which list are we?
const std::string & getName ()
 which list are we?
void invoke (DomElement *elt)
 call back each client in turn
void invoke (DomElement *elt)
 call back each client in turn
bool remove (DocClient *client)
bool remove (DocClient *client)
 ~ClientList ()
 ~ClientList ()

Private Types

typedef std::vector< DocClient
* >::const_iterator 
ClientsIt
typedef std::vector< DocClient
* >::const_iterator 
ClientsIt

Private Attributes

std::vector< DocClient * > m_clients
std::vector< DocClient * > m_clients
std::string m_eltName


Detailed Description

Nested class to keep track of clients for one element type.


Member Typedef Documentation

typedef std::vector<DocClient*>::const_iterator xmlBase::DocMan::ClientList::ClientsIt [private]
 

typedef std::vector<DocClient*>::const_iterator xmlBase::DocMan::ClientList::ClientsIt [private]
 


Constructor & Destructor Documentation

xmlBase::DocMan::ClientList::ClientList const std::string &  eltName  )  [inline]
 

00054 : m_eltName(eltName) {}

xmlBase::DocMan::ClientList::~ClientList  ) 
 

00115                                 {
00116     m_clients.clear();
00117   }

xmlBase::DocMan::ClientList::ClientList const std::string &  eltName  )  [inline]
 

00054 : m_eltName(eltName) {}

xmlBase::DocMan::ClientList::~ClientList  ) 
 


Member Function Documentation

bool xmlBase::DocMan::ClientList::add DocClient client,
bool  front = false
 

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.

bool xmlBase::DocMan::ClientList::add DocClient client,
bool  front = false
 

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.

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]
 

which list are we?

00068 {return m_eltName;}

const std::string& xmlBase::DocMan::ClientList::getName  )  [inline]
 

which list are we?

00068 {return m_eltName;}

void xmlBase::DocMan::ClientList::invoke DomElement elt  ) 
 

call back each client in turn

void xmlBase::DocMan::ClientList::invoke DomElement elt  ) 
 

call back each client in turn

bool xmlBase::DocMan::ClientList::remove DocClient client  ) 
 

Remove a client; return indicates success or failure (e.g., client not found)

bool xmlBase::DocMan::ClientList::remove DocClient client  ) 
 

Remove a client; return indicates success or failure (e.g., client not found)

00101                                                  {
00102     client->getName(); // just to avoid compile-time warning
00103     return true;
00104   }


Member Data Documentation

std::vector<DocClient*> xmlBase::DocMan::ClientList::m_clients [private]
 

std::vector<DocClient*> xmlBase::DocMan::ClientList::m_clients [private]
 

std::string xmlBase::DocMan::ClientList::m_eltName [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 19:24:42 2011 for BOSS6.5.5 by  doxygen 1.3.9.1