G4ProcessVector.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // 
00030 // ------------------------------------------------------------
00031 //      GEANT 4 class header file 
00032 //
00033 // Class Description
00034 //  This class is a container for pointers to physics process objects.
00035 // ------------------------------------------------------------
00036 
00037 #ifndef G4ProcessVector_h
00038 #define G4ProcessVector_h 1
00039 
00040 #include "globals.hh"
00041 #include "G4ios.hh"
00042 #include <vector>
00043 
00044 class G4VProcess;
00045 
00046 class G4ProcessVector 
00047 {
00048   public:
00049     //  Constructors
00050     G4ProcessVector();
00051     explicit G4ProcessVector(size_t);
00052     G4ProcessVector(const G4ProcessVector &);
00053 
00054     //  Destructor.
00055     virtual ~G4ProcessVector();
00056 
00057     //assignment operator
00058     G4ProcessVector & operator=(const G4ProcessVector &right);
00059  
00060     // equal operator
00061     G4bool operator==(const G4ProcessVector &right) const;
00062 
00063   public: // With Description
00064     // Returns the number of items
00065     G4int entries() const;
00066     G4int length() const;
00067     G4int size() const;
00068     
00069     // Returns the position of the element
00070     G4int index(G4VProcess* aProcess) const;
00071  
00072     // Returns "true" if the element exists
00073     G4bool contains(G4VProcess* aProcess) const;
00074 
00075     // Insert an element
00076     G4bool insert(G4VProcess* aProcess);
00077 
00078     // Insert an element at i-th position
00079     G4bool insertAt(G4int i, G4VProcess* aProcess);
00080     
00081     // Remove and returns the i-th element
00082     G4VProcess* removeAt(G4int i);
00083 
00084     // Remove and returns the last element
00085     G4VProcess* removeLast();
00086     
00087     // Clear the collection by removing all items
00088     void clear();
00089     
00090     // returns const reference to the i-th item
00091     G4VProcess* const& operator[](G4int i) const;
00092     G4VProcess* const& operator()(G4int i) const;
00093 
00094     // returns  reference to the i-th item
00095     G4VProcess* & operator[](G4int i);
00096     G4VProcess* & operator()(G4int i);
00097 
00098   protected:
00099     // Use STL Vector 
00100     typedef std::vector<G4VProcess*> G4ProcVector;
00101 
00102     G4ProcVector * pProcVector;
00103 };
00104 
00105 #include "G4ProcessVector.icc"
00106 
00107 #endif
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123 
00124 

Generated on Mon May 27 17:49:26 2013 for Geant4 by  doxygen 1.4.7