52 #include <CLHEP/Utility/memory.h>
57 template<
class OBJECT>
59 template<
class OBJECT>
61 template<
typename OBJECT>
63 template<
typename OBJECT>
65 template<
typename OBJECT>
67 template<
typename OBJECT>
79 template <
typename T>
123 template<
class OBJECT>
204 CLHEP::shared_ptr<_ListRef<G4FastList<OBJECT> > >
fListRef;
216 template<
class OBJECT>
223 CLHEP::shared_ptr<_ListRef<G4FastList<OBJECT> > >
fListRef;
242 (*it)->RemoveWatcher(
this);
284 fpNodeInManyLists = __node;
294 fWatchers.insert(watcher);
299 typename std::set<Watcher*>::iterator it = fWatchers.find(watcher);
300 if(it == fWatchers.end())
return;
307 if (fNbObjects != 0)
return fBoundary.
GetPrevious()->GetObject();
316 inline bool empty()
const;
317 iterator
insert(iterator , OBJECT*);
319 inline iterator
begin();
320 inline const_iterator
begin()
const;
322 inline iterator
end();
323 inline const_iterator
end()
const;
329 bool Holds(
const OBJECT*)
const;
335 void remove(OBJECT*);
337 iterator
pop(OBJECT*);
339 iterator
pop(iterator __first, iterator __last);
340 iterator
erase(OBJECT*);
347 iterator
erase(iterator __first, iterator __last);
362 static void Pop(OBJECT*);
391 template<
typename OBJECT>
483 template<
typename OBJECT>
569 #endif // G4FastList_H
G4FastListNode is the entity actually stored by the G4FastList.
void SetAttachedToList(bool flag)
G4FastList_const_iterator< OBJECT > _Self
G4FastList is used by G4TrackHolder to save G4IT tracks only.
void AddWatcher(Watcher *watcher)
void NotifyRemoveObject(OBJECT *, G4FastList< OBJECT > *)
G4FastList_iterator enables to go through the tracks contained by a list.
G4FastListNode< OBJECT > * Unflag(OBJECT *)
G4FastListNode< OBJECT > * GetNext()
void DeleteObject(OBJECT *)
type_wrapper< G4ManyFastLists_iterator< OBJECT > > ManyListsIteratorW
G4FastListNode< G4FastList< OBJECT > > * fpNodeInManyLists
void SetPrevious(G4FastListNode< OBJECT > *node)
const OBJECT * GetObject() const
static G4FastList< OBJECT > * GetList(OBJECT *)
G4FastList_const_iterator(const _Node *__x)
G4FastListNode< OBJECT > * EraseListNode(OBJECT *)
std::set< G4FastList< OBJECT > * > fWatching
bool operator!=(const _Self &__x) const
static void Pop(OBJECT *)
const _Node * GetNode() const
type_wrapper< OBJECT > ObjectW
G4FastList_iterator< OBJECT > iterator
const OBJECT * operator*() const
G4FastList_const_iterator()
G4FastListNode< OBJECT > fBoundary
G4FastListNode< OBJECT > * GetPrevious()
G4FastList_const_iterator(const G4FastList_iterator< OBJECT > &right)
type_wrapper< G4ManyFastLists< OBJECT > > ManyListsW
void CheckFlag(G4FastListNode< OBJECT > *)
type_wrapper< G4ManyFastLists_iterator< typename LIST::object > > mli_traits_type
G4FastListNode< OBJECT > _Node
void clear()
Complexity = linear in size between __first and __last.
G4FastListNode< OBJECT > _Node
bool Holds(const OBJECT *) const
return an iterator that contains an empty node use for boundary checking only
void NotifyEmpty(OBJECT *, G4FastList< OBJECT > *)
iterator insert(iterator, OBJECT *)
bool operator==(const _Self &__x) const
G4int operator==(const G4FastList< OBJECT > &right) const
void NotifyDeletingList(G4FastList< OBJECT > *)
const OBJECT * operator->() const
G4FastList_iterator(const G4FastList_iterator &right)
void SetNext(G4FastListNode< OBJECT > *node)
const G4FastListNode< OBJECT > * GetPrevious() const
type_wrapper< LIST > traits_type
void RemoveWatcher(Watcher *watcher)
G4FastListNode< OBJECT > node
const G4FastListNode< OBJECT > * GetNext() const
static G4FastListNode< OBJECT > * GetNode(OBJECT *)
Complexity = constant.
CLHEP::shared_ptr< _ListRef< G4FastList< OBJECT > > > fListRef
void push_back(OBJECT *__track)
void SetListNode(G4FastListNode< G4FastList< OBJECT > > *__node)
G4FastListNode< G4FastList< OBJECT > > * GetListNode()
static void SetNode(OBJECT *__obj, G4FastListNode< OBJECT > *__node)
G4FastListNode< OBJECT > * CreateNode(OBJECT *)
G4FastListNode< OBJECT > * fpNext
G4FastListNode< OBJECT > * fpPrevious
G4FastList_const_iterator< OBJECT > const_iterator
void Hook(G4FastListNode< OBJECT > *, G4FastListNode< OBJECT > *)
void transferTo(G4FastList< OBJECT > *)
void NotifyNewObject(OBJECT *, G4FastList< OBJECT > *)
void StopWatching(G4FastList< OBJECT > *fastList, bool removeWatcher=true)
std::set< Watcher * > fWatchers
CLHEP::shared_ptr< _ListRef< G4FastList< OBJECT > > > fListRef
G4FastListNode< OBJECT > * Flag(OBJECT *)
void push_front(OBJECT *__track)
G4FastList_iterator enables to go through the tracks contained by a list.
G4FastList< OBJECT > & operator=(const G4FastList< OBJECT > &right)
G4FastList_const_iterator(const G4FastList_const_iterator &right)
void Watch(G4FastList< OBJECT > *fastList)
G4FastListNode(OBJECT *track=0)
Default constructor.
static G4FastListNode< OBJECT > * __GetNode(OBJECT *)
G4FastList_iterator< OBJECT > _Self
G4FastList< typename ObjectW::type > LIST
bool operator!=(const _Self &__x) const
void Unhook(G4FastListNode< OBJECT > *)
G4int operator!=(const G4FastList< OBJECT > &right) const
G4FastList_iterator(_Node *__x)
G4FastList< OBJECT > list
bool operator==(const _Self &__x) const
type_wrapper< G4FastList< OBJECT > > ListW