This is Unofficial EPICS BASE Doxygen Site
weak_set< T >::XIterator Struct Reference

an iterator-ish object which also locks the set during iteration More...

#include "weakset.h"

+ Collaboration diagram for weak_set< T >::XIterator:

Public Member Functions

 XIterator (weak_set &S)
 
value_pointer next ()
 yield the next live entry More...
 

Public Attributes

weak_setset
 
epicsGuard< epicsMutex > guard
 
store_t::iterator it
 
store_t::iterator end
 

Detailed Description

template<typename T>
struct weak_set< T >::XIterator

an iterator-ish object which also locks the set during iteration

Definition at line 204 of file weakset.h.

Constructor & Destructor Documentation

template<typename T>
weak_set< T >::XIterator::XIterator ( weak_set S)
inline

Definition at line 208 of file weakset.h.

208 :set(S), guard(S.mutex()), it(S._data->store.begin()), end(S._data->store.end()) {}
epicsMutex & mutex() const
Definition: weakset.h:199
epicsGuard< epicsMutex > guard
Definition: weakset.h:206
store_t::iterator end
Definition: weakset.h:207
store_t::iterator it
Definition: weakset.h:207

Member Function Documentation

template<typename T>
value_pointer weak_set< T >::XIterator::next ( )
inline

yield the next live entry

Definition at line 210 of file weakset.h.

210  {
211  value_pointer ret;
212  while(it!=end) {
213  ret = (it++)->lock();
214  if(ret) break;
215  }
216  return ret;
217  }
epicsMutexId lock
Definition: osiClockTime.c:37
store_t::iterator end
Definition: weakset.h:207
std::tr1::shared_ptr< T > value_pointer
Definition: weakset.h:61
store_t::iterator it
Definition: weakset.h:207

Member Data Documentation

template<typename T>
store_t::iterator weak_set< T >::XIterator::end

Definition at line 207 of file weakset.h.

template<typename T>
epicsGuard<epicsMutex> weak_set< T >::XIterator::guard

Definition at line 206 of file weakset.h.

template<typename T>
store_t::iterator weak_set< T >::XIterator::it

Definition at line 207 of file weakset.h.

template<typename T>
weak_set& weak_set< T >::XIterator::set

Definition at line 205 of file weakset.h.


The documentation for this struct was generated from the following file: