Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes
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 box)

Definition at line 40 of file G4ITManager_iterator.cc.

References fCurrentBox, and fNextIT.

41 {
42  if(box)
43  {
44  fCurrentBox = box ;
45  }
46  else
47  {
48  fCurrentBox = 0;
49  }
50 
51  fNextIT = 0;
52 }
virtual G4VITManager::iterator::~iterator ( )
inlinevirtual

Definition at line 101 of file G4ITManager.hh.

101 {;}

Member Function Documentation

G4bool G4VITManager::iterator::begin ( )
virtual

Definition at line 55 of file G4ITManager_iterator.cc.

56 {
57  if(fCurrentBox)
58  {
60 
61  if(fNextIT)
62  {
63 // G4cout << "G4VITManager::allbox_iterator, fNextIT :" << fNextIT -> GetName()<< G4endl;
64  return true;
65  }
66  }
67 
68  return false;
69 }
G4IT * GetFirstIT()
Definition: G4ITBox.hh:104
G4bool G4VITManager::iterator::end ( )
virtual

Definition at line 86 of file G4ITManager_iterator.cc.

Referenced by gbinit(), luupda(), pydump(), pyupda(), and shmakf().

87 {
88  if(fNextIT) return false;
89  return true ;
90 }
G4ITBox * G4VITManager::iterator::GetBox ( )

Definition at line 113 of file G4ITManager_iterator.cc.

114 {
115  return fCurrentBox;
116 }
G4IT * G4VITManager::iterator::operator* ( )

Definition at line 106 of file G4ITManager_iterator.cc.

107 {
108  return fNextIT;
109 }
G4VITManager::iterator & G4VITManager::iterator::operator++ ( G4int  )

Definition at line 72 of file G4ITManager_iterator.cc.

73 {
74  if(fCurrentBox)
75  {
76  if(fNextIT)
77  {
78  fNextIT = fNextIT->GetNext();
79  }
80  }
81  return *this;
82 }
G4IT * GetNext()
Definition: G4IT.hh:198
G4VITManager::iterator & G4VITManager::iterator::operator= ( const iterator i)

Definition at line 94 of file G4ITManager_iterator.cc.

References fCurrentBox, and fNextIT.

95 {
96  if(this != &i)
97  {
98  fNextIT = i.fNextIT;
99  fCurrentBox = i.fCurrentBox;
100  }
101  return *this;
102 }
void G4VITManager::iterator::PrintNext ( ) const
protected

Definition at line 120 of file G4ITManager_iterator.cc.

References G4cout, and G4endl.

121 {
122  if(fNextIT)
123  {
124  if(fNextIT->GetTrack())
125  {
126  G4cout
127  << fNextIT->GetTrack()->GetTrackID()
128  << "\t"
129  << fNextIT->GetName()
130  << G4endl;
131  }
132  }
133  else
134  {
135  G4cout<<"fNextIT = 0"<<G4endl;
136  }
137 }
virtual const G4String & GetName() const =0
G4GLOB_DLL std::ostream G4cout
G4int GetTrackID() const
G4Track * GetTrack()
Definition: G4IT.hh:208
#define G4endl
Definition: G4ios.hh:61

Field Documentation

G4ITBox* G4VITManager::iterator::fCurrentBox
protected
G4IT* G4VITManager::iterator::fNextIT
protected

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