BOSS 8.0.0
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
 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 53 of file Calibration/xmlBase/include/xmlBase/docMan/DocMan.h.

Constructor & Destructor Documentation

◆ ClientList() [1/3]

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

Definition at line 55 of file Calibration/xmlBase/include/xmlBase/docMan/DocMan.h.

55: m_eltName( eltName ) {}

◆ ~ClientList() [1/3]

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

Definition at line 119 of file DocMan.cxx.

119{ m_clients.clear(); }

◆ ClientList() [2/3]

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

Definition at line 55 of file InstallArea/x86_64-el9-gcc13-dbg/include/xmlBase/docMan/DocMan.h.

55: m_eltName( eltName ) {}

◆ ~ClientList() [2/3]

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

◆ ClientList() [3/3]

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

Definition at line 55 of file InstallArea/x86_64-el9-gcc13-opt/include/xmlBase/docMan/DocMan.h.

55: m_eltName( eltName ) {}

◆ ~ClientList() [3/3]

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

Member Function Documentation

◆ add() [1/3]

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 87 of file DocMan.cxx.

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

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

◆ add() [2/3]

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.

◆ add() [3/3]

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/3]

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

which list are we?

Definition at line 69 of file Calibration/xmlBase/include/xmlBase/docMan/DocMan.h.

69{ return m_eltName; }

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

◆ getName() [2/3]

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

which list are we?

Definition at line 69 of file InstallArea/x86_64-el9-gcc13-dbg/include/xmlBase/docMan/DocMan.h.

69{ return m_eltName; }

◆ getName() [3/3]

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

which list are we?

Definition at line 69 of file InstallArea/x86_64-el9-gcc13-opt/include/xmlBase/docMan/DocMan.h.

69{ return m_eltName; }

◆ invoke() [1/3]

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

call back each client in turn

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

◆ invoke() [2/3]

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

call back each client in turn

◆ invoke() [3/3]

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

call back each client in turn

◆ remove() [1/3]

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

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

Definition at line 104 of file DocMan.cxx.

104 {
105 client->getName(); // just to avoid compile-time warning
106 return true;
107 }

◆ remove() [2/3]

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

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

◆ remove() [3/3]

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: