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,v 1.10 2006/06/29 21:07:40 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-02 $ |
---|
29 | // |
---|
30 | // |
---|
31 | // ------------------------------------------------------------ |
---|
32 | // GEANT 4 class header file |
---|
33 | // |
---|
34 | // Class Description |
---|
35 | // This class is a container for pointers to physics process objects. |
---|
36 | // ------------------------------------------------------------ |
---|
37 | |
---|
38 | #ifndef G4ProcessVector_h |
---|
39 | #define G4ProcessVector_h 1 |
---|
40 | |
---|
41 | #include "globals.hh" |
---|
42 | #include "G4ios.hh" |
---|
43 | #include <vector> |
---|
44 | |
---|
45 | class G4VProcess; |
---|
46 | |
---|
47 | class G4ProcessVector |
---|
48 | { |
---|
49 | public: |
---|
50 | // Constructors |
---|
51 | G4ProcessVector(size_t dummy=0); |
---|
52 | G4ProcessVector(const G4ProcessVector &); |
---|
53 | |
---|
54 | // Destructor. |
---|
55 | virtual ~G4ProcessVector(); |
---|
56 | |
---|
57 | //assignment operator |
---|
58 | G4ProcessVector & operator=(G4ProcessVector &right); |
---|
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 |
---|
82 | G4VProcess* removeAt(G4int i); |
---|
83 | |
---|
84 | // Remove and returns the last element |
---|
85 | G4VProcess* removeLast(); |
---|
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 |
---|
95 | G4VProcess* & operator[](G4int i); |
---|
96 | G4VProcess* & operator()(G4int i); |
---|
97 | |
---|
98 | protected: |
---|
99 | // Use STL Vector |
---|
100 | typedef std::vector<G4VProcess*> G4ProcVector; |
---|
101 | |
---|
102 | G4ProcVector * pProcVector; |
---|
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 | |
---|