Geant4-11
Public Types | Public Member Functions | Protected Attributes | Private Attributes
G4FastList< OBJECT >::TWatcher< WATCHER_TYPE > Class Template Reference

#include <G4FastList.hh>

Inheritance diagram for G4FastList< OBJECT >::TWatcher< WATCHER_TYPE >:
G4FastList< OBJECT >::Watcher

Public Types

typedef G4FastList< OBJECT > list
 
enum  Priority {
  eExtreme , eHigh , eNormal , eLow ,
  eVeryLow
}
 

Public Member Functions

Priority GetPriority () const
 
virtual G4String GetWatcherName ()
 
virtual void NotifyAddObject (OBJECT *, G4FastList< OBJECT > *)
 
void NotifyDeletingList (G4FastList< OBJECT > *)
 
virtual void NotifyRemoveObject (OBJECT *, G4FastList< OBJECT > *)
 
void StopWatching (G4FastList< OBJECT > *fastList, bool removeWatcher=true)
 
 TWatcher ()
 
void Watch (G4FastList< OBJECT > *fastList)
 
virtual ~TWatcher ()
 

Protected Attributes

Priority fPriority
 

Private Attributes

std::set< G4FastList< OBJECT > * > fWatching
 

Detailed Description

template<class OBJECT>
template<typename WATCHER_TYPE>
class G4FastList< OBJECT >::TWatcher< WATCHER_TYPE >

Definition at line 302 of file G4FastList.hh.

Member Typedef Documentation

◆ list

template<class OBJECT >
typedef G4FastList<OBJECT> G4FastList< OBJECT >::Watcher::list
inherited

Definition at line 244 of file G4FastList.hh.

Member Enumeration Documentation

◆ Priority

template<class OBJECT >
enum G4FastList::Watcher::Priority
inherited
Enumerator
eExtreme 
eHigh 
eNormal 
eLow 
eVeryLow 

Definition at line 235 of file G4FastList.hh.

Constructor & Destructor Documentation

◆ TWatcher()

template<class OBJECT >
template<typename WATCHER_TYPE >
G4FastList< OBJECT >::TWatcher< WATCHER_TYPE >::TWatcher ( )
inline

Definition at line 305 of file G4FastList.hh.

◆ ~TWatcher()

template<class OBJECT >
template<typename WATCHER_TYPE >
virtual G4FastList< OBJECT >::TWatcher< WATCHER_TYPE >::~TWatcher ( )
inlinevirtual

Definition at line 306 of file G4FastList.hh.

306{}

Member Function Documentation

◆ GetPriority()

template<class OBJECT >
Priority G4FastList< OBJECT >::Watcher::GetPriority ( ) const
inlineinherited

Definition at line 265 of file G4FastList.hh.

265 {
266 return fPriority;
267 }

References G4FastList< OBJECT >::Watcher::fPriority.

Referenced by sortWatcher< OBJECT >::operator()().

◆ GetWatcherName()

template<class OBJECT >
template<typename WATCHER_TYPE >
virtual G4String G4FastList< OBJECT >::TWatcher< WATCHER_TYPE >::GetWatcherName ( )
inlinevirtual

Reimplemented from G4FastList< OBJECT >::Watcher.

Definition at line 307 of file G4FastList.hh.

308 {
309 return typeid(WATCHER_TYPE).name();
310 }
const char * name(G4int ptype)

References G4InuclParticleNames::name().

◆ NotifyAddObject()

template<class OBJECT >
virtual void G4FastList< OBJECT >::Watcher::NotifyAddObject ( OBJECT *  ,
G4FastList< OBJECT > *   
)
inlinevirtualinherited

Definition at line 274 of file G4FastList.hh.

274{;}

◆ NotifyDeletingList()

template<class OBJECT >
void G4FastList< OBJECT >::Watcher::NotifyDeletingList ( G4FastList< OBJECT > *  )
inlineinherited

Definition at line 271 of file G4FastList.hh.

271{;}

◆ NotifyRemoveObject()

template<class OBJECT >
virtual void G4FastList< OBJECT >::Watcher::NotifyRemoveObject ( OBJECT *  ,
G4FastList< OBJECT > *   
)
inlinevirtualinherited

Definition at line 275 of file G4FastList.hh.

275{;}

◆ StopWatching()

template<class OBJECT >
void G4FastList< OBJECT >::Watcher::StopWatching ( G4FastList< OBJECT > *  fastList,
bool  removeWatcher = true 
)
inlineinherited

Definition at line 286 of file G4FastList.hh.

287 {
288 typename std::set<G4FastList<OBJECT>*>::iterator it = fWatching.find(fastList);
289 if(it == fWatching.end()) return; //TODO: exception?
290 fWatching.erase(it);
291 if(removeWatcher) fastList->RemoveWatcher(this);
292 }
std::set< G4FastList< OBJECT > * > fWatching
Definition: G4FastList.hh:298
void RemoveWatcher(Watcher *watcher)
Definition: G4FastList.hh:343
G4FastList_iterator< OBJECT > iterator
Definition: G4FastList.hh:321

References G4FastList< OBJECT >::Watcher::fWatching, and G4FastList< OBJECT >::RemoveWatcher().

Referenced by G4ManyFastLists< OBJECT >::Remove().

◆ Watch()

template<class OBJECT >
void G4FastList< OBJECT >::Watcher::Watch ( G4FastList< OBJECT > *  fastList)
inlineinherited

Definition at line 280 of file G4FastList.hh.

281 {
282 fWatching.insert(fastList);
283 fastList->AddWatcher(this);
284 }
void AddWatcher(Watcher *watcher)
Definition: G4FastList.hh:338

References G4FastList< OBJECT >::AddWatcher(), and G4FastList< OBJECT >::Watcher::fWatching.

Referenced by G4ManyFastLists< OBJECT >::Add(), and G4ManyFastLists< OBJECT >::AddGlobalWatcher().

Field Documentation

◆ fPriority

template<class OBJECT >
Priority G4FastList< OBJECT >::Watcher::fPriority
protectedinherited

◆ fWatching

template<class OBJECT >
std::set<G4FastList<OBJECT>*> G4FastList< OBJECT >::Watcher::fWatching
privateinherited

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