|
||||
File indexing completed on 2025-01-18 09:58:58
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4ProcessVector 0027 // 0028 // Class description: 0029 // 0030 // A container for pointers to physics process objects. 0031 0032 // Authors: G.Cosmo, H.Kurashige - 1998 0033 // -------------------------------------------------------------------- 0034 #ifndef G4ProcessVector_hh 0035 #define G4ProcessVector_hh 1 0036 0037 #include <vector> 0038 0039 #include "globals.hh" 0040 #include "G4ios.hh" 0041 0042 class G4VProcess; 0043 0044 class G4ProcessVector 0045 { 0046 public: 0047 0048 G4ProcessVector(); 0049 explicit G4ProcessVector(std::size_t); 0050 G4ProcessVector(const G4ProcessVector &); 0051 // Constructors 0052 0053 virtual ~G4ProcessVector(); 0054 // Destructor 0055 0056 G4ProcessVector& operator=(const G4ProcessVector& right); 0057 // Assignment operator 0058 0059 inline G4bool operator==(const G4ProcessVector& right) const; 0060 // Equality operator 0061 0062 inline std::size_t entries() const; 0063 inline std::size_t length() const; 0064 inline std::size_t size() const; 0065 // Returns the number of items 0066 0067 std::size_t index(G4VProcess* aProcess) const; 0068 // Returns the position of the element 0069 0070 G4bool contains(G4VProcess* aProcess) const; 0071 // Returns "true" if the element exists 0072 0073 inline G4bool insert(G4VProcess* aProcess); 0074 // Insert an element 0075 0076 G4bool insertAt(G4int i, G4VProcess* aProcess); 0077 // Insert an element at i-th position 0078 0079 G4VProcess* removeAt(G4int i); 0080 // Remove and returns the i-th element 0081 0082 inline G4VProcess* removeLast(); 0083 // Remove and returns the last element 0084 0085 inline void clear(); 0086 // Clear the collection by removing all items 0087 0088 inline G4VProcess* const& operator[](G4int i) const; 0089 inline G4VProcess* const& operator()(G4int i) const; 0090 // Returns const reference to the i-th item 0091 0092 inline G4VProcess* & operator[](G4int i); 0093 inline G4VProcess* & operator()(G4int i); 0094 // Returns reference to the i-th item 0095 0096 protected: 0097 0098 using G4ProcVector = std::vector<G4VProcess*>; 0099 0100 G4ProcVector* pProcVector = nullptr; 0101 }; 0102 0103 #include "G4ProcessVector.icc" 0104 0105 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |