Geant4-11
Public Types | Public Member Functions | Data Fields | Protected Member Functions | Private Member Functions
G4ManyFastLists_iterator< OBJECT > Struct Template Reference

#include <G4ManyFastLists.hh>

Public Types

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

Public Member Functions

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

Data Fields

ManyLists::iterator fCurrentListIt
 
G4FastList_iterator< OBJECT > fIterator
 
ManyListsfLists
 

Protected Member Functions

void HasReachedEnd ()
 

Private Member Functions

 G4ManyFastLists_iterator ()=default
 

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/3]

template<class OBJECT >
G4ManyFastLists_iterator< OBJECT >::G4ManyFastLists_iterator ( )
privatedefault

◆ G4ManyFastLists_iterator() [2/3]

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() [3/3]

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 }

References G4ManyFastLists_iterator< OBJECT >::fIterator.

◆ GetTrackList()

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

Definition at line 262 of file G4ManyFastLists.hh.

263 {
264 return *fCurrentListIt;
265 }

References G4ManyFastLists_iterator< OBJECT >::fCurrentListIt.

◆ 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()

References G4FastList< OBJECT >::empty(), G4FastList< OBJECT >::end(), G4ManyFastLists_iterator< OBJECT >::fIterator, and G4ManyFastLists_iterator< OBJECT >::fLists.

◆ 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

References G4ManyFastLists_iterator< OBJECT >::operator==().

◆ 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 }

References G4ManyFastLists_iterator< OBJECT >::fIterator.

◆ 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 }

References G4ManyFastLists_iterator< OBJECT >::fIterator.

◆ 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 }

References G4ManyFastLists_iterator< OBJECT >::operator++().

◆ 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()

References G4FastList< OBJECT >::begin(), G4FastList< OBJECT >::empty(), G4FastList< OBJECT >::end(), G4ManyFastLists_iterator< OBJECT >::fCurrentListIt, G4ManyFastLists_iterator< OBJECT >::fIterator, and G4ManyFastLists_iterator< OBJECT >::fLists.

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 }

References G4ManyFastLists_iterator< OBJECT >::operator--().

◆ 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 }

References G4ManyFastLists_iterator< OBJECT >::fIterator.

◆ 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 }

References G4ManyFastLists_iterator< OBJECT >::fIterator.

◆ 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

References G4ManyFastLists_iterator< OBJECT >::fCurrentListIt, and G4ManyFastLists_iterator< OBJECT >::fIterator.

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

◆ UpdateToNextValidList()

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

Field Documentation

◆ fCurrentListIt

template<class OBJECT >
ManyLists::iterator G4ManyFastLists_iterator< OBJECT >::fCurrentListIt

◆ fIterator

template<class OBJECT >
G4FastList_iterator<OBJECT> G4ManyFastLists_iterator< OBJECT >::fIterator

◆ fLists

template<class OBJECT >
ManyLists* G4ManyFastLists_iterator< OBJECT >::fLists

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