Geant4  10.01.p03
G4FastList< OBJECT > Class Template Reference

G4FastList is used by G4TrackHolder to save G4IT tracks only. More...

#include <G4FastList.hh>

+ Inheritance diagram for G4FastList< OBJECT >:
+ Collaboration diagram for G4FastList< OBJECT >:

Classes

class  Watcher
 

Public Types

typedef OBJECT object
 
typedef G4FastList_iterator
< OBJECT > 
iterator
 
typedef
G4FastList_const_iterator
< OBJECT > 
const_iterator
 
typedef G4FastListNode< OBJECT > node
 

Public Member Functions

 G4FastList ()
 
 ~G4FastList ()
 
void SetListNode (G4FastListNode< G4FastList< OBJECT > > *__node)
 
G4FastListNode< G4FastList
< OBJECT > > * 
GetListNode ()
 
void AddWatcher (Watcher *watcher)
 
void RemoveWatcher (Watcher *watcher)
 
OBJECT * back ()
 
G4int size () const
 
bool empty () const
 
iterator insert (iterator, OBJECT *)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
bool Holds (const OBJECT *) const
 return an iterator that contains an empty node use for boundary checking only More...
 
void push_front (OBJECT *__track)
 
void push_back (OBJECT *__track)
 
OBJECT * pop_back ()
 
void remove (OBJECT *)
 
iterator pop (OBJECT *)
 
iterator pop (G4FastListNode< OBJECT > *)
 
iterator pop (iterator __first, iterator __last)
 
iterator erase (OBJECT *)
 
iterator erase (iterator __first, iterator __last)
 Complexity = constant By storing the node inside the object, we avoid searching through all the container. More...
 
void clear ()
 Complexity = linear in size between __first and __last. More...
 
void transferTo (G4FastList< OBJECT > *)
 

Static Public Member Functions

static G4FastListNode< OBJECT > * GetNode (OBJECT *)
 Complexity = constant. More...
 
static void SetNode (OBJECT *__obj, G4FastListNode< OBJECT > *__node)
 
static G4FastList< OBJECT > * GetList (OBJECT *)
 
static G4FastList< OBJECT > * GetList (G4FastListNode< OBJECT > *__trackListNode)
 
static void Pop (OBJECT *)
 

Protected Member Functions

G4FastListNode< OBJECT > * CreateNode (OBJECT *)
 
G4FastListNode< OBJECT > * Flag (OBJECT *)
 
G4FastListNode< OBJECT > * Unflag (OBJECT *)
 
void Unflag (G4FastListNode< OBJECT > *__trackListNode)
 
void CheckFlag (G4FastListNode< OBJECT > *)
 
void DeleteObject (OBJECT *)
 
void Hook (G4FastListNode< OBJECT > *, G4FastListNode< OBJECT > *)
 
void Unhook (G4FastListNode< OBJECT > *)
 
G4FastListNode< OBJECT > * EraseListNode (OBJECT *)
 

Static Protected Member Functions

static G4FastListNode< OBJECT > * __GetNode (OBJECT *)
 

Protected Attributes

G4int fNbObjects
 
CLHEP::shared_ptr< _ListRef
< G4FastList< OBJECT > > > 
fListRef
 
G4FastListNode< OBJECT > fBoundary
 
std::set< Watcher * > fWatchers
 
G4FastListNode< G4FastList
< OBJECT > > * 
fpNodeInManyLists
 

Private Member Functions

 G4FastList (const G4FastList< OBJECT > &other)
 
G4FastList< OBJECT > & operator= (const G4FastList< OBJECT > &right)
 
G4int operator== (const G4FastList< OBJECT > &right) const
 
G4int operator!= (const G4FastList< OBJECT > &right) const
 

Detailed Description

template<class OBJECT>
class G4FastList< OBJECT >

G4FastList is used by G4TrackHolder to save G4IT tracks only.

Its advantage lies to a fast search of a track in this list.

Definition at line 58 of file G4FastList.hh.

Member Typedef Documentation

template<class OBJECT>
typedef G4FastList_const_iterator<OBJECT> G4FastList< OBJECT >::const_iterator

Definition at line 276 of file G4FastList.hh.

template<class OBJECT>
typedef G4FastList_iterator<OBJECT> G4FastList< OBJECT >::iterator

Definition at line 275 of file G4FastList.hh.

template<class OBJECT>
typedef G4FastListNode<OBJECT> G4FastList< OBJECT >::node

Definition at line 277 of file G4FastList.hh.

template<class OBJECT>
typedef OBJECT G4FastList< OBJECT >::object

Definition at line 274 of file G4FastList.hh.

Constructor & Destructor Documentation

template<class OBJECT>
G4FastList< OBJECT >::G4FastList ( )
template<class OBJECT>
G4FastList< OBJECT >::~G4FastList ( )
template<class OBJECT>
G4FastList< OBJECT >::G4FastList ( const G4FastList< OBJECT > &  other)
private

Member Function Documentation

template<class OBJECT>
static G4FastListNode<OBJECT>* G4FastList< OBJECT >::__GetNode ( OBJECT *  )
staticprotected
template<class OBJECT>
void G4FastList< OBJECT >::AddWatcher ( Watcher watcher)
inline

Definition at line 292 of file G4FastList.hh.

Referenced by G4ManyFastLists< G4Track >::Add(), G4ITTrackHolder::AddWatcher(), and G4FastList< OBJECT >::Watcher< G4Track >::Watch().

+ Here is the caller graph for this function:

template<class OBJECT>
OBJECT* G4FastList< OBJECT >::back ( )
inline

Definition at line 304 of file G4FastList.hh.

template<class OBJECT>
iterator G4FastList< OBJECT >::begin ( )
inline

Referenced by G4ManyFastLists< G4Track >::ClearLists(), G4ManyFastLists< G4Track >::Holds(), G4ITTrackHolder::KillTracks(), G4ManyFastLists_iterator< OBJECT >::operator--(), G4ManyFastLists< G4Track >::RemoveLists(), and G4ManyFastLists< G4Track >::size().

+ Here is the caller graph for this function:

template<class OBJECT>
const_iterator G4FastList< OBJECT >::begin ( ) const
inline
template<class OBJECT>
void G4FastList< OBJECT >::CheckFlag ( G4FastListNode< OBJECT > *  )
protected
template<class OBJECT>
void G4FastList< OBJECT >::clear ( )

Complexity = linear in size between __first and __last.

Referenced by G4ManyFastLists< G4Track >::RemoveLists().

+ Here is the caller graph for this function:

template<class OBJECT>
G4FastListNode<OBJECT>* G4FastList< OBJECT >::CreateNode ( OBJECT *  )
protected
template<class OBJECT>
void G4FastList< OBJECT >::DeleteObject ( OBJECT *  )
protected
template<class OBJECT>
bool G4FastList< OBJECT >::empty ( ) const
inline

Referenced by G4ManyFastLists_iterator< OBJECT >::HasReachedEnd(), and G4ManyFastLists_iterator< OBJECT >::operator--().

+ Here is the caller graph for this function:

template<class OBJECT>
const_iterator G4FastList< OBJECT >::end ( ) const
inline
template<class OBJECT>
iterator G4FastList< OBJECT >::erase ( OBJECT *  )

Referenced by G4ITTrackHolder::KillTracks().

+ Here is the caller graph for this function:

template<class OBJECT>
iterator G4FastList< OBJECT >::erase ( iterator  __first,
iterator  __last 
)

Complexity = constant By storing the node inside the object, we avoid searching through all the container.

template<class OBJECT>
G4FastListNode<OBJECT>* G4FastList< OBJECT >::EraseListNode ( OBJECT *  )
protected
template<class OBJECT>
G4FastListNode<OBJECT>* G4FastList< OBJECT >::Flag ( OBJECT *  )
protected
template<class OBJECT>
static G4FastList<OBJECT>* G4FastList< OBJECT >::GetList ( OBJECT *  )
static
template<class OBJECT>
static G4FastList<OBJECT>* G4FastList< OBJECT >::GetList ( G4FastListNode< OBJECT > *  __trackListNode)
static
template<class OBJECT>
G4FastListNode<G4FastList<OBJECT> >* G4FastList< OBJECT >::GetListNode ( )
inline

Definition at line 287 of file G4FastList.hh.

Referenced by G4FastList< G4Track >::Holds(), and PriorityList::PushToListOfSecondaries().

+ Here is the caller graph for this function:

template<class OBJECT>
static G4FastListNode<OBJECT>* G4FastList< OBJECT >::GetNode ( OBJECT *  )
static

Complexity = constant.

template<class OBJECT>
bool G4FastList< OBJECT >::Holds ( const OBJECT *  ) const

return an iterator that contains an empty node use for boundary checking only

template<class OBJECT>
void G4FastList< OBJECT >::Hook ( G4FastListNode< OBJECT > *  ,
G4FastListNode< OBJECT > *   
)
protected
template<class OBJECT>
iterator G4FastList< OBJECT >::insert ( iterator  ,
OBJECT *   
)
template<class OBJECT>
G4int G4FastList< OBJECT >::operator!= ( const G4FastList< OBJECT > &  right) const
private
template<class OBJECT>
G4FastList<OBJECT>& G4FastList< OBJECT >::operator= ( const G4FastList< OBJECT > &  right)
private
template<class OBJECT>
G4int G4FastList< OBJECT >::operator== ( const G4FastList< OBJECT > &  right) const
private
template<class OBJECT>
iterator G4FastList< OBJECT >::pop ( OBJECT *  )

Referenced by G4Scheduler::ExtractILData(), G4ManyFastLists< G4Track >::NotifyDeletingList(), and G4ManyFastLists< G4Track >::Remove().

+ Here is the caller graph for this function:

template<class OBJECT>
iterator G4FastList< OBJECT >::pop ( G4FastListNode< OBJECT > *  )
template<class OBJECT>
iterator G4FastList< OBJECT >::pop ( iterator  __first,
iterator  __last 
)
template<class OBJECT>
static void G4FastList< OBJECT >::Pop ( OBJECT *  )
static
template<class OBJECT>
OBJECT* G4FastList< OBJECT >::pop_back ( )
template<class OBJECT>
void G4FastList< OBJECT >::push_back ( OBJECT *  __track)
inline

Referenced by G4ManyFastLists< G4Track >::Add(), G4ITTrackHolder::PushToKill(), PriorityList::PushToListOfSecondaries(), PriorityList::PushToMainList(), and PriorityList::PushToWaitingList().

+ Here is the caller graph for this function:

template<class OBJECT>
void G4FastList< OBJECT >::push_front ( OBJECT *  __track)
inline
template<class OBJECT>
void G4FastList< OBJECT >::remove ( OBJECT *  )
template<class OBJECT>
void G4FastList< OBJECT >::RemoveWatcher ( Watcher watcher)
inline

Definition at line 297 of file G4FastList.hh.

Referenced by G4ManyFastLists< G4Track >::Remove(), and G4FastList< OBJECT >::Watcher< G4Track >::StopWatching().

+ Here is the caller graph for this function:

template<class OBJECT>
void G4FastList< OBJECT >::SetListNode ( G4FastListNode< G4FastList< OBJECT > > *  __node)
inline

Definition at line 282 of file G4FastList.hh.

Referenced by G4ManyFastLists< G4Track >::RemoveLists().

+ Here is the caller graph for this function:

template<class OBJECT>
static void G4FastList< OBJECT >::SetNode ( OBJECT *  __obj,
G4FastListNode< OBJECT > *  __node 
)
static
template<class OBJECT>
G4int G4FastList< OBJECT >::size ( ) const
inline

Definition at line 311 of file G4FastList.hh.

Referenced by PriorityList::GetNTracks(), G4ITTrackHolder::KillTracks(), and G4ITTrackHolder::MergeNextTimeToMainList().

+ Here is the caller graph for this function:

template<class OBJECT>
void G4FastList< OBJECT >::transferTo ( G4FastList< OBJECT > *  )

Referenced by PriorityList::MergeWithMainList(), PriorityList::TransferSecondariesToMainList(), and PriorityList::TransferToMainList().

+ Here is the caller graph for this function:

template<class OBJECT>
G4FastListNode<OBJECT>* G4FastList< OBJECT >::Unflag ( OBJECT *  )
protected

Referenced by G4FastList< G4Track >::EraseListNode().

+ Here is the caller graph for this function:

template<class OBJECT>
void G4FastList< OBJECT >::Unflag ( G4FastListNode< OBJECT > *  __trackListNode)
protected
template<class OBJECT>
void G4FastList< OBJECT >::Unhook ( G4FastListNode< OBJECT > *  )
protected

Referenced by G4FastList< G4Track >::EraseListNode().

+ Here is the caller graph for this function:

Member Data Documentation

template<class OBJECT>
G4FastListNode<OBJECT> G4FastList< OBJECT >::fBoundary
protected

Definition at line 225 of file G4FastList.hh.

template<class OBJECT>
CLHEP::shared_ptr<_ListRef<G4FastList<OBJECT> > > G4FastList< OBJECT >::fListRef
protected

Definition at line 223 of file G4FastList.hh.

Referenced by G4FastList< G4Track >::Flag(), and G4FastList< G4Track >::Holds().

template<class OBJECT>
G4int G4FastList< OBJECT >::fNbObjects
protected

Definition at line 220 of file G4FastList.hh.

Referenced by G4FastList< G4FastList< G4Track > >::size().

template<class OBJECT>
G4FastListNode<G4FastList<OBJECT> >* G4FastList< OBJECT >::fpNodeInManyLists
protected

Definition at line 271 of file G4FastList.hh.

Referenced by G4FastList< G4FastList< G4Track > >::GetListNode().

template<class OBJECT>
std::set<Watcher*> G4FastList< OBJECT >::fWatchers
protected

Definition at line 270 of file G4FastList.hh.


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