52 typedef std::set<typename G4FastList<OBJECT>::Watcher*,
83 for(;it != _end ;++it)
93 if (__list == 0)
return;
107 for(;it_watcher != end_watcher ;++it_watcher)
112 (*it_watcher)->Watch(__list);
115 if(__list->
empty() ==
false)
119 for(;it_watcher != end_watcher ;++it_watcher)
122 for(;it_obj != __list->
end() ;++it_obj)
128 (*it_watcher)->NotifyAddObject(*it_obj,__list);
151 if (__list == 0)
return;
159 for(;it != _end ;++it)
161 (*it)->StopWatching(__list);
172 inline bool Holds(OBJECT* __track)
const
176 for (; __it != __end; __it++)
177 if ((*__it)->Holds(__track))
return true;
186 __size += __it->size();
195 for (; __it != __end; __it++)
221 for (; __it != __end; __it++)
222 if (*__it) (*__it)->clear();
231template<
class OBJECT>
302 if (
fIterator == (*fCurrentListIt)->begin())
314 else if (
fIterator == (*fCurrentListIt)->begin())
322 while (((*fCurrentListIt)->empty() ||
fIterator.GetNode() == 0
323 ||
fIterator.GetNode()->GetObject() == 0)
370template<
class OBJECT>
373 if (fAssociatedLists.empty())
376 fAssociatedLists.end(),
388 if (*it && (*it)->empty() ==
false)
390 trackList_it = (*it)->begin();
397 if (i == fAssociatedLists.size() || it == _end)
408template<
class OBJECT>
411 if (fAssociatedLists.empty())
414 fAssociatedLists.end(),
419 fAssociatedLists.end(),
423#include "G4ManyFastLists.icc"
void Watch(G4FastList< OBJECT > *fastList)
void StopWatching(G4FastList< OBJECT > *fastList, bool removeWatcher=true)
void RemoveWatcher(Watcher *watcher)
void push_back(OBJECT *__track)
void AddGlobalWatcher(typename G4FastList< OBJECT >::Watcher *watcher)
ManyLists fAssociatedLists
virtual ~G4ManyFastLists()=default
G4FastList< G4FastList< OBJECT > > ManyLists
void Add(G4FastList< OBJECT > *__list)
void Remove(G4FastList< OBJECT > *__list)
std::set< typename G4FastList< OBJECT >::Watcher *, sortWatcher< OBJECT > > WatcherSet
G4ManyFastLists_iterator< OBJECT > iterator
bool Holds(OBJECT *__track) const
virtual void NotifyDeletingList(G4FastList< OBJECT > *__list)
WatcherSet * fMainListWatchers
G4FastList_iterator< OBJECT > fIterator
G4bool operator!=(const _Self &__x) const
G4ManyFastLists_iterator(const G4ManyFastLists_iterator &__x)=default
G4FastListNode< OBJECT > _Node
G4ManyFastLists_iterator(G4FastList_iterator< OBJECT > __x, typename ManyLists::iterator __it, ManyLists *__lists)
ManyLists::iterator fCurrentListIt
const OBJECT * operator->() const
_Self & operator=(const G4ManyFastLists_iterator &__x)=default
G4bool operator==(const _Self &__x) const
G4FastList< OBJECT > * GetTrackList()
G4ManyFastLists_iterator _Self
G4FastList< G4FastList< OBJECT > > ManyLists
_Self UpdateToNextValidList()
const OBJECT * operator*() const