BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
xmlBase::DocMan::ClientList Class Reference

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

#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
 
 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
 

Detailed Description

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

Definition at line 52 of file Calibration/xmlBase/xmlBase-00-00-03/xmlBase/docMan/DocMan.h.

Constructor & Destructor Documentation

◆ ClientList() [1/2]

xmlBase::DocMan::ClientList::ClientList ( const std::string &  eltName)
inline

Definition at line 54 of file Calibration/xmlBase/xmlBase-00-00-03/xmlBase/docMan/DocMan.h.

54: m_eltName(eltName) {}

◆ ~ClientList() [1/2]

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

Definition at line 115 of file DocMan.cxx.

115 {
116 m_clients.clear();
117 }

◆ ClientList() [2/2]

xmlBase::DocMan::ClientList::ClientList ( const std::string &  eltName)
inline

Definition at line 54 of file InstallArea/include/xmlBase/xmlBase/docMan/DocMan.h.

54: m_eltName(eltName) {}

◆ ~ClientList() [2/2]

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

Member Function Documentation

◆ add() [1/2]

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.

Definition at line 85 of file DocMan.cxx.

85 {
86 ClientsIt it = m_clients.begin();
87 const std::string& clientName = client->getName();
88 while (it != m_clients.end() ) {
89 // can't register for the same element type more than once
90 if (clientName.compare((*it)->getName()) == 0 ) return 0;
91 ++it;
92 }
93 if (front) m_clients.insert(m_clients.begin(), client);
94 else m_clients.push_back(client);
95
96 return true;
97 }

Referenced by xmlBase::DocMan::regClient().

◆ add() [2/2]

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.

◆ getName() [1/2]

const std::string & xmlBase::DocMan::ClientList::getName ( )
inline

which list are we?

Definition at line 68 of file Calibration/xmlBase/xmlBase-00-00-03/xmlBase/docMan/DocMan.h.

68{return m_eltName;}

Referenced by xmlBase::DocMan::findList().

◆ getName() [2/2]

const std::string & xmlBase::DocMan::ClientList::getName ( )
inline

which list are we?

Definition at line 68 of file InstallArea/include/xmlBase/xmlBase/docMan/DocMan.h.

68{return m_eltName;}

◆ invoke() [1/2]

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

call back each client in turn

Referenced by xmlBase::DocMan::parse().

◆ invoke() [2/2]

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

call back each client in turn

◆ remove() [1/2]

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

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

Definition at line 101 of file DocMan.cxx.

101 {
102 client->getName(); // just to avoid compile-time warning
103 return true;
104 }

◆ remove() [2/2]

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

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


The documentation for this class was generated from the following files: