Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ManyFastLists_iterator< OBJECT > Struct Template Reference

#include <G4ManyFastLists.hh>

Public Types

typedef G4FastList< G4FastList< OBJECT > > ManyLists
 
typedef G4ManyFastLists_iterator _Self
 
typedef G4FastListNode< OBJECT > _Node
 

Public Member Functions

 G4ManyFastLists_iterator (G4FastList_iterator< OBJECT > __x, typename ManyLists::iterator __it, ManyLists *__lists)
 
 G4ManyFastLists_iterator (const G4ManyFastLists_iterator &__x)=default
 
_Selfoperator= (const G4ManyFastLists_iterator &__x)=default
 
_NodeGetNode ()
 
G4FastList< OBJECT > * GetTrackList ()
 
OBJECT * operator* ()
 
const OBJECT * operator* () const
 
OBJECT * operator-> ()
 
const OBJECT * operator-> () const
 
_Self UpdateToNextValidList ()
 
_Selfoperator++ ()
 
_Self operator++ (int)
 
_Selfoperator-- ()
 
_Self operator-- (int)
 
G4bool operator== (const _Self &__x) const
 
G4bool operator!= (const _Self &__x) const
 

Public Attributes

G4FastList_iterator< OBJECT > fIterator
 
ManyLists::iterator fCurrentListIt
 
ManyListsfLists
 

Protected Member Functions

void HasReachedEnd ()
 

Detailed Description

template<class OBJECT>
struct G4ManyFastLists_iterator< OBJECT >

Definition at line 232 of file G4ManyFastLists.hh.

Member Typedef Documentation

◆ _Node

template<class OBJECT >
typedef G4FastListNode<OBJECT> G4ManyFastLists_iterator< OBJECT >::_Node

Definition at line 237 of file G4ManyFastLists.hh.

◆ _Self

template<class OBJECT >
typedef G4ManyFastLists_iterator G4ManyFastLists_iterator< OBJECT >::_Self

Definition at line 236 of file G4ManyFastLists.hh.

◆ ManyLists

template<class OBJECT >
typedef G4FastList<G4FastList<OBJECT> > G4ManyFastLists_iterator< OBJECT >::ManyLists

Definition at line 234 of file G4ManyFastLists.hh.

Constructor & Destructor Documentation

◆ G4ManyFastLists_iterator() [1/2]

template<class OBJECT >
G4ManyFastLists_iterator< OBJECT >::G4ManyFastLists_iterator ( G4FastList_iterator< OBJECT >  __x,
typename ManyLists::iterator  __it,
ManyLists __lists 
)
inlineexplicit

Definition at line 247 of file G4ManyFastLists.hh.

249 :
250 fIterator(__x), fCurrentListIt(__it), fLists(__lists)
251 {
252 }
G4FastList_iterator< OBJECT > fIterator
ManyLists::iterator fCurrentListIt

◆ G4ManyFastLists_iterator() [2/2]

template<class OBJECT >
G4ManyFastLists_iterator< OBJECT >::G4ManyFastLists_iterator ( const G4ManyFastLists_iterator< OBJECT > &  __x)
default

Member Function Documentation

◆ GetNode()

template<class OBJECT >
_Node * G4ManyFastLists_iterator< OBJECT >::GetNode ( )
inline

Definition at line 257 of file G4ManyFastLists.hh.

258 {
259 return fIterator.GetNode();
260 }

◆ GetTrackList()

template<class OBJECT >
G4FastList< OBJECT > * G4ManyFastLists_iterator< OBJECT >::GetTrackList ( )
inline

Definition at line 262 of file G4ManyFastLists.hh.

263 {
264 return *fCurrentListIt;
265 }

◆ HasReachedEnd()

template<class OBJECT >
void G4ManyFastLists_iterator< OBJECT >::HasReachedEnd ( )
inlineprotected

Definition at line 357 of file G4ManyFastLists.hh.

358 {
359 if (fLists->empty() == false)
360 {
361 fIterator = (*(fLists->end()--))->end();
362 }
363 else
364 {
366 }
367 }
bool empty() const
iterator end()

◆ operator!=()

template<class OBJECT >
G4bool G4ManyFastLists_iterator< OBJECT >::operator!= ( const _Self __x) const
inline

Definition at line 351 of file G4ManyFastLists.hh.

352 {
353 return !(this->operator ==(__x));
354 }
G4bool operator==(const _Self &__x) const

◆ operator*() [1/2]

template<class OBJECT >
OBJECT * G4ManyFastLists_iterator< OBJECT >::operator* ( )
inline

Definition at line 267 of file G4ManyFastLists.hh.

268 {
269 return *fIterator;
270 }

◆ operator*() [2/2]

template<class OBJECT >
const OBJECT * G4ManyFastLists_iterator< OBJECT >::operator* ( ) const
inline

Definition at line 271 of file G4ManyFastLists.hh.

272 {
273 return *fIterator;
274 }

◆ operator++() [1/2]

template<class OBJECT >
_Self & G4ManyFastLists_iterator< OBJECT >::operator++ ( )

◆ operator++() [2/2]

template<class OBJECT >
_Self G4ManyFastLists_iterator< OBJECT >::operator++ ( int  )
inline

Definition at line 287 of file G4ManyFastLists.hh.

288 {
289 return operator++();
290 }

◆ operator--() [1/2]

template<class OBJECT >
_Self & G4ManyFastLists_iterator< OBJECT >::operator-- ( )
inline

Definition at line 293 of file G4ManyFastLists.hh.

294 {
295 if (fLists->empty())
296 {
298 return *this;
299 }
300 if (fCurrentListIt == fLists->begin())
301 {
302 if (fIterator == (*fCurrentListIt)->begin())
303 {
305 return *this;
306 }
307 }
308
309 if (fCurrentListIt == fLists->end())
310 {
312 fIterator = (*fCurrentListIt)->end();
313 }
314 else if (fIterator == (*fCurrentListIt)->begin())
315 {
317 fIterator = (*fCurrentListIt)->end();
318 }
319
320 fIterator--;
321
322 while (((*fCurrentListIt)->empty() || fIterator.GetNode() == 0
323 || fIterator.GetNode()->GetObject() == 0)
324 && fCurrentListIt != fLists->begin())
325 {
326 fIterator = (*fCurrentListIt)->begin();
328 fIterator = (*fCurrentListIt)->end();
329 fIterator--;
330 }
331
332 if (fIterator.GetNode() == 0 && fCurrentListIt == fLists->begin())
333 {
335 return *this;
336 }
337
338 return *this;
339 }
iterator begin()

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

◆ operator--() [2/2]

template<class OBJECT >
_Self G4ManyFastLists_iterator< OBJECT >::operator-- ( int  )
inline

Definition at line 341 of file G4ManyFastLists.hh.

342 {
343 return operator--();
344 }

◆ operator->() [1/2]

template<class OBJECT >
OBJECT * G4ManyFastLists_iterator< OBJECT >::operator-> ( )
inline

Definition at line 275 of file G4ManyFastLists.hh.

276 {
277 return *fIterator;
278 }

◆ operator->() [2/2]

template<class OBJECT >
const OBJECT * G4ManyFastLists_iterator< OBJECT >::operator-> ( ) const
inline

Definition at line 279 of file G4ManyFastLists.hh.

280 {
281 return *fIterator;
282 }

◆ operator=()

template<class OBJECT >
_Self & G4ManyFastLists_iterator< OBJECT >::operator= ( const G4ManyFastLists_iterator< OBJECT > &  __x)
default

◆ operator==()

template<class OBJECT >
G4bool G4ManyFastLists_iterator< OBJECT >::operator== ( const _Self __x) const
inline

Definition at line 346 of file G4ManyFastLists.hh.

347 {
348 return (fIterator == __x.fIterator && fCurrentListIt == __x.fCurrentListIt);
349 } // Fast check

Referenced by G4ManyFastLists_iterator< OBJECT >::operator!=().

◆ UpdateToNextValidList()

template<class OBJECT >
_Self G4ManyFastLists_iterator< OBJECT >::UpdateToNextValidList ( )

Member Data Documentation

◆ fCurrentListIt

◆ fIterator

◆ fLists


The documentation for this struct was generated from the following files: