Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ProcessVector.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4ProcessVector.hh 71231 2013-06-12 13:06:28Z gcosmo $
28 //
29 //
30 // ------------------------------------------------------------
31 // GEANT 4 class header file
32 //
33 // Class Description
34 // This class is a container for pointers to physics process objects.
35 // ------------------------------------------------------------
36 
37 #ifndef G4ProcessVector_h
38 #define G4ProcessVector_h 1
39 
40 #include "globals.hh"
41 #include "G4ios.hh"
42 #include <vector>
43 
44 class G4VProcess;
45 
47 {
48  public:
49  // Constructors
51  explicit G4ProcessVector(size_t);
53 
54  // Destructor.
55  virtual ~G4ProcessVector();
56 
57  //assignment operator
59 
60  // equal operator
61  G4bool operator==(const G4ProcessVector &right) const;
62 
63  public: // With Description
64  // Returns the number of items
65  G4int entries() const;
66  G4int length() const;
67  G4int size() const;
68 
69  // Returns the position of the element
70  G4int index(G4VProcess* aProcess) const;
71 
72  // Returns "true" if the element exists
73  G4bool contains(G4VProcess* aProcess) const;
74 
75  // Insert an element
76  G4bool insert(G4VProcess* aProcess);
77 
78  // Insert an element at i-th position
79  G4bool insertAt(G4int i, G4VProcess* aProcess);
80 
81  // Remove and returns the i-th element
83 
84  // Remove and returns the last element
86 
87  // Clear the collection by removing all items
88  void clear();
89 
90  // returns const reference to the i-th item
91  G4VProcess* const& operator[](G4int i) const;
92  G4VProcess* const& operator()(G4int i) const;
93 
94  // returns reference to the i-th item
97 
98  protected:
99  // Use STL Vector
100  typedef std::vector<G4VProcess*> G4ProcVector;
101 
103 };
104 
105 #include "G4ProcessVector.icc"
106 
107 #endif
108 
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
G4bool operator==(const G4ProcessVector &right) const
G4bool insertAt(G4int i, G4VProcess *aProcess)
G4VProcess *const & operator[](G4int i) const
G4VProcess * removeLast()
G4ProcVector * pProcVector
int G4int
Definition: G4Types.hh:78
virtual ~G4ProcessVector()
G4int entries() const
bool G4bool
Definition: G4Types.hh:79
G4ProcessVector & operator=(const G4ProcessVector &right)
G4int length() const
std::vector< G4VProcess * > G4ProcVector
G4bool insert(G4VProcess *aProcess)
G4int size() const
G4bool contains(G4VProcess *aProcess) const
G4VProcess *const & operator()(G4int i) const
G4VProcess * removeAt(G4int i)
G4int index(G4VProcess *aProcess) const