G4VITManager::iterator Class Reference

#include <G4ITManager.hh>

Inheritance diagram for G4VITManager::iterator:

G4VITManager::allbox_iterator G4VITManager::const_iterator

Public Member Functions

 iterator (G4ITBox *)
virtual ~iterator ()
virtual G4bool begin ()
virtual G4bool end ()
iteratoroperator= (const iterator &i)
iteratoroperator++ (G4int)
G4IToperator * ()
G4ITBoxGetBox ()

Protected Member Functions

void PrintNext () const

Protected Attributes

G4ITfNextIT
G4ITBoxfCurrentBox

Detailed Description

Definition at line 97 of file G4ITManager.hh.


Constructor & Destructor Documentation

G4VITManager::iterator::iterator ( G4ITBox  ) 

Definition at line 40 of file G4ITManager_iterator.cc.

References fCurrentBox, and fNextIT.

00041 {
00042     if(box)
00043     {
00044         fCurrentBox = box ;
00045     }
00046     else 
00047     {
00048         fCurrentBox = 0;        
00049     }
00050 
00051     fNextIT = 0;
00052 }

virtual G4VITManager::iterator::~iterator (  )  [inline, virtual]

Definition at line 101 of file G4ITManager.hh.

00101 {;}


Member Function Documentation

G4bool G4VITManager::iterator::begin (  )  [virtual]

Definition at line 55 of file G4ITManager_iterator.cc.

References fCurrentBox, fNextIT, and G4ITBox::GetFirstIT().

00056 {
00057     if(fCurrentBox)
00058     {
00059         fNextIT = fCurrentBox->GetFirstIT();
00060 
00061         if(fNextIT)
00062         {
00063 //            G4cout << "G4VITManager::allbox_iterator, fNextIT :" <<  fNextIT -> GetName()<< G4endl;
00064             return true;
00065         }
00066     }
00067 
00068     return false;
00069 }

G4bool G4VITManager::iterator::end (  )  [virtual]

Definition at line 86 of file G4ITManager_iterator.cc.

References fNextIT.

00087 {
00088     if(fNextIT) return false;
00089     return true ;
00090 }

G4ITBox * G4VITManager::iterator::GetBox (  ) 

Definition at line 113 of file G4ITManager_iterator.cc.

References fCurrentBox.

00114 {
00115     return fCurrentBox;
00116 }

G4IT * G4VITManager::iterator::operator * (  ) 

Reimplemented in G4VITManager::const_iterator.

Definition at line 106 of file G4ITManager_iterator.cc.

References fNextIT.

00107 {
00108     return fNextIT;
00109 }

G4VITManager::iterator & G4VITManager::iterator::operator++ ( G4int   ) 

Reimplemented in G4VITManager::allbox_iterator.

Definition at line 72 of file G4ITManager_iterator.cc.

References fCurrentBox, and fNextIT.

00073 {
00074     if(fCurrentBox)
00075     {
00076         if(fNextIT)
00077         {
00078             fNextIT = fNextIT->GetNext();
00079         }
00080     }
00081     return *this;
00082 }

G4VITManager::iterator & G4VITManager::iterator::operator= ( const iterator i  ) 

Definition at line 94 of file G4ITManager_iterator.cc.

References fCurrentBox, and fNextIT.

00095 {
00096     if(this != &i)
00097     {
00098         fNextIT = i.fNextIT;
00099         fCurrentBox = i.fCurrentBox;
00100     }
00101     return *this;
00102 }

void G4VITManager::iterator::PrintNext (  )  const [protected]

Definition at line 120 of file G4ITManager_iterator.cc.

References fNextIT, G4cout, G4endl, G4IT::GetName(), G4IT::GetTrack(), and G4Track::GetTrackID().

00121 {
00122     if(fNextIT)
00123     {
00124         if(fNextIT->GetTrack())
00125         {
00126                 G4cout
00127                     << fNextIT->GetTrack()->GetTrackID()
00128                     << "\t"
00129                     << fNextIT->GetName()
00130                     << G4endl;
00131         }
00132     }
00133     else
00134     {
00135         G4cout<<"fNextIT = 0"<<G4endl;
00136     }
00137 }


Field Documentation

G4ITBox* G4VITManager::iterator::fCurrentBox [protected]

Definition at line 116 of file G4ITManager.hh.

Referenced by G4VITManager::allbox_iterator::allbox_iterator(), begin(), GetBox(), iterator(), operator++(), G4VITManager::allbox_iterator::operator++(), operator=(), and G4VITManager::allbox_iterator::operator=().

G4IT* G4VITManager::iterator::fNextIT [protected]

Definition at line 115 of file G4ITManager.hh.

Referenced by G4VITManager::allbox_iterator::allbox_iterator(), begin(), end(), iterator(), operator *(), G4VITManager::const_iterator::operator *(), operator++(), G4VITManager::allbox_iterator::operator++(), operator=(), G4VITManager::allbox_iterator::operator=(), and PrintNext().


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:49 2013 for Geant4 by  doxygen 1.4.7