2 // ********************************************************************
3 // * License and Disclaimer *
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. *
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. *
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 // ********************************************************************
27 // $Id: G4PhysicsTable.icc 70961 2013-06-07 15:17:02Z gcosmo $
30 // ------------------------------------------------------------
31 // GEANT 4 class inline implementation
33 // History: first implementation, based on object model of
34 // 2nd December 1995, G.Cosmo
36 // ------------------------------------------------------------
39 void G4PhysicsTable::clearAndDestroy()
44 a = G4PhysCollection::back();
45 G4PhysCollection::pop_back();
46 if ( a ) { delete a; }
48 G4PhysCollection::clear();
53 G4PhysicsVector*& G4PhysicsTable::operator()(size_t i)
59 G4PhysicsVector* const& G4PhysicsTable::operator()(size_t i) const
65 void G4PhysicsTable::push_back(G4PhysicsVector* pvec)
67 G4PhysCollection::push_back(pvec);
68 vecFlag.push_back(true);
72 void G4PhysicsTable::insert(G4PhysicsVector* pvec)
74 G4PhysCollection::push_back(pvec);
75 vecFlag.push_back(true);
79 void G4PhysicsTable::insertAt (size_t idx, G4PhysicsVector* pvec)
81 G4PhysicsTableIterator itr=begin();
82 for (size_t i=0; i<idx; ++i) { itr++; }
83 G4PhysCollection::insert(itr, pvec);
85 G4FlagCollection::iterator itrF=vecFlag.begin();
86 for (size_t j=0; j<idx; ++j) { itrF++; }
87 vecFlag.insert(itrF, true);
91 size_t G4PhysicsTable::entries() const
93 return G4PhysCollection::size();
97 size_t G4PhysicsTable::length() const
99 return G4PhysCollection::size();
103 G4bool G4PhysicsTable::isEmpty() const
105 return G4PhysCollection::empty();
109 G4bool G4PhysicsTable::GetFlag(size_t i) const
115 void G4PhysicsTable::ClearFlag(size_t i)