nidas
v1.2-1520
|
A list of SampleClients. More...
#include <SampleClientList.h>
Public Member Functions | |
SampleClientList () | |
SampleClientList (const SampleClientList &cl) | |
Public copy constructor. More... | |
virtual | ~SampleClientList () |
SampleClientList & | operator= (const SampleClientList &cl) |
Public assignment operator. More... | |
virtual void | add (SampleClient *) |
Add a SampleClient to this list. More... | |
virtual void | remove (SampleClient *) |
Remove a SampleClient from this SampleSource. More... | |
virtual bool | empty () const |
Are there any clients? More... | |
virtual void | removeAll () |
Big cleanup. More... | |
void | lock () const throw () |
Lock this list. More... | |
void | unlock () const throw () |
Unlock this list. More... | |
std::list< SampleClient * > ::const_iterator | begin () throw () |
get a const_iterator pointing to first element. More... | |
std::list< SampleClient * > ::const_iterator | end () throw () |
get a const_iterator pointing to one-past-last element. More... | |
Private Attributes | |
nidas::util::Mutex | _clistLock |
mutex to prevent simultaneous access to clients list More... | |
std::list< SampleClient * > | _clients |
My current clients. More... | |
A list of SampleClients.
This class is typically used by SampleSources to maintain their client lists.
|
inline |
SampleClientList::SampleClientList | ( | const SampleClientList & | cl | ) |
Public copy constructor.
To support multithreading, this first locks the SampleClientList argument.
|
inlinevirtual |
|
virtual |
Add a SampleClient to this list.
The pointer to the SampleClient must remain valid, until after it is removed. A nidas::util::Mutex exclusion lock is used to avoid simultaneous access.
References _clients, lock(), and unlock().
Referenced by nidas::core::SampleSourceSupport::addSampleClientForTag().
|
inline |
get a const_iterator pointing to first element.
Does not lock!
References _clients.
Referenced by nidas::core::SampleSourceSupport::distribute().
|
virtual |
|
inline |
get a const_iterator pointing to one-past-last element.
Does not lock!
References _clients.
Referenced by nidas::core::SampleSourceSupport::distribute().
|
inline |
Lock this list.
References _clistLock, and nidas::util::Mutex::lock().
Referenced by add(), empty(), operator=(), remove(), removeAll(), and SampleClientList().
SampleClientList & SampleClientList::operator= | ( | const SampleClientList & | cl | ) |
Public assignment operator.
To support multithreading, this first locks the SampleClientList argument.
|
virtual |
Remove a SampleClient from this SampleSource.
A nidas::util::Mutex exclusion lock is used to avoid simultaneous access.
|
virtual |
Big cleanup.
A nidas::util::Mutex exclusion lock is used to avoid simultaneous access.
References _clients, lock(), and unlock().
Referenced by nidas::core::SampleSourceSupport::removeAllSampleClients().
|
inline |
Unlock this list.
References _clistLock, and nidas::util::Mutex::unlock().
Referenced by add(), empty(), operator=(), remove(), removeAll(), and SampleClientList().
|
private |
My current clients.
Referenced by add(), begin(), empty(), end(), operator=(), remove(), removeAll(), and SampleClientList().
|
mutableprivate |