Geant4
10.03
|
G4FastList is used by G4TrackHolder to save G4IT tracks only. More...
#include <G4FastList.hh>
Classes | |
class | TWatcher |
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 Types | |
typedef std::set< typename G4FastList< OBJECT >::Watcher *, sortWatcher< OBJECT > > | WatcherSet |
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 |
G4shared_ptr< _ListRef < G4FastList< OBJECT > > > | fListRef |
G4FastListNode< OBJECT > | fBoundary |
WatcherSet | 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 |
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.
typedef G4FastList_const_iterator<OBJECT> G4FastList< OBJECT >::const_iterator |
Definition at line 324 of file G4FastList.hh.
typedef G4FastList_iterator<OBJECT> G4FastList< OBJECT >::iterator |
Definition at line 323 of file G4FastList.hh.
typedef G4FastListNode<OBJECT> G4FastList< OBJECT >::node |
Definition at line 325 of file G4FastList.hh.
typedef OBJECT G4FastList< OBJECT >::object |
Definition at line 322 of file G4FastList.hh.
|
protected |
Definition at line 317 of file G4FastList.hh.
G4FastList< OBJECT >::G4FastList | ( | ) |
G4FastList< OBJECT >::~G4FastList | ( | ) |
|
private |
|
staticprotected |
|
inline |
Definition at line 340 of file G4FastList.hh.
Referenced by G4ITTrackHolder::AddWatcher(), and G4FastList< OBJECT >::Watcher< G4Track >::Watch().
|
inline |
Definition at line 352 of file G4FastList.hh.
|
inline |
Referenced by G4ManyFastLists< G4Track >::Add(), G4ManyFastLists< G4Track >::AddGlobalWatcher(), G4ManyFastLists< G4Track >::ClearLists(), G4ManyFastLists< G4Track >::Holds(), G4ITTrackHolder::KillTracks(), G4ManyFastLists_iterator< OBJECT >::operator--(), G4ManyFastLists< G4Track >::RemoveLists(), and G4ManyFastLists< G4Track >::size().
|
inline |
|
protected |
void G4FastList< OBJECT >::clear | ( | ) |
Complexity = linear in size between __first and __last.
Referenced by G4ManyFastLists< G4Track >::RemoveLists().
|
protected |
|
protected |
|
inline |
Referenced by G4ManyFastLists< G4Track >::Add(), G4ManyFastLists_iterator< OBJECT >::HasReachedEnd(), and G4ManyFastLists_iterator< OBJECT >::operator--().
|
inline |
Referenced by G4ManyFastLists< G4Track >::Add(), G4ManyFastLists< G4Track >::AddGlobalWatcher(), G4ManyFastLists< G4Track >::ClearLists(), G4ManyFastLists_iterator< OBJECT >::HasReachedEnd(), G4ManyFastLists< G4Track >::Holds(), G4ITTrackHolder::KillTracks(), G4ManyFastLists_iterator< OBJECT >::operator--(), G4ManyFastLists< G4Track >::RemoveLists(), G4ManyFastLists< G4Track >::size(), and G4FastList< OBJECT >::Watcher< G4Track >::~Watcher().
|
inline |
iterator G4FastList< OBJECT >::erase | ( | 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.
|
protected |
|
protected |
|
static |
|
static |
|
inline |
Definition at line 335 of file G4FastList.hh.
Referenced by G4FastList< G4Track >::Holds(), and PriorityList::PushToListOfSecondaries().
|
static |
Complexity = constant.
bool G4FastList< OBJECT >::Holds | ( | const OBJECT * | ) | const |
return an iterator that contains an empty node use for boundary checking only
|
protected |
iterator G4FastList< OBJECT >::insert | ( | iterator | , |
OBJECT * | |||
) |
|
private |
|
private |
|
private |
iterator G4FastList< OBJECT >::pop | ( | OBJECT * | ) |
Referenced by G4ManyFastLists< G4Track >::NotifyDeletingList(), and G4ManyFastLists< G4Track >::Remove().
iterator G4FastList< OBJECT >::pop | ( | G4FastListNode< OBJECT > * | ) |
iterator G4FastList< OBJECT >::pop | ( | iterator | __first, |
iterator | __last | ||
) |
|
static |
OBJECT* G4FastList< OBJECT >::pop_back | ( | ) |
|
inline |
Referenced by G4ManyFastLists< G4Track >::Add(), G4ITTrackHolder::PushToKill(), PriorityList::PushToListOfSecondaries(), PriorityList::PushToMainList(), and PriorityList::PushToWaitingList().
|
inline |
void G4FastList< OBJECT >::remove | ( | OBJECT * | ) |
|
inline |
Definition at line 345 of file G4FastList.hh.
Referenced by G4ManyFastLists< G4Track >::Remove(), and G4FastList< OBJECT >::Watcher< G4Track >::StopWatching().
|
inline |
Definition at line 330 of file G4FastList.hh.
Referenced by G4ManyFastLists< G4Track >::RemoveLists().
|
static |
|
inline |
Definition at line 359 of file G4FastList.hh.
Referenced by PriorityList::GetNTracks(), G4ITTrackHolder::KillTracks(), and G4ITTrackHolder::MergeNextTimeToMainList().
void G4FastList< OBJECT >::transferTo | ( | G4FastList< OBJECT > * | ) |
Referenced by PriorityList::MergeWithMainList(), PriorityList::TransferSecondariesToMainList(), and PriorityList::TransferToMainList().
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 228 of file G4FastList.hh.
|
protected |
Definition at line 226 of file G4FastList.hh.
Referenced by G4FastList< G4Track >::Flag(), and G4FastList< G4Track >::Holds().
|
protected |
Definition at line 223 of file G4FastList.hh.
Referenced by G4FastList< G4FastList< G4Track > >::size().
|
protected |
Definition at line 319 of file G4FastList.hh.
Referenced by G4FastList< G4FastList< G4Track > >::GetListNode().
|
protected |
Definition at line 318 of file G4FastList.hh.