// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // // $Id: G4NavigationLevel.icc,v 1.22 2009/08/04 08:27:20 gcosmo Exp $ // GEANT4 tag $Name: geant4-09-03 $ // // 30.09.97 J.Apostolakis Initial version. // // ---------------------------------------------------------------------- #if defined G4GEOM_ALLOC_EXPORT extern G4DLLEXPORT G4Allocator aNavigationLevelAllocator; #else extern G4DLLIMPORT G4Allocator aNavigationLevelAllocator; #endif inline G4VPhysicalVolume* G4NavigationLevel::GetPhysicalVolume() const { return fLevelRep->GetPhysicalVolume(); } inline const G4AffineTransform& G4NavigationLevel::GetTransform() const { return fLevelRep->GetTransform() ; } inline const G4AffineTransform* G4NavigationLevel::GetPtrTransform() const { return fLevelRep->GetTransformPtr() ; } inline EVolume G4NavigationLevel::GetVolumeType() const { return fLevelRep->GetVolumeType() ; } inline G4int G4NavigationLevel::GetReplicaNo() const { return fLevelRep->GetReplicaNo() ; } // There is no provision in case this class is subclassed. // If it is subclassed, this will fail and may not give errors! // inline void* G4NavigationLevel::operator new(size_t) { return (void *) aNavigationLevelAllocator.MallocSingle(); } // Added for use by STL (used for pre-allocation). // inline void* G4NavigationLevel::operator new(size_t,void *a) { return a; } inline void G4NavigationLevel::operator delete(void *aLevel) { aNavigationLevelAllocator.FreeSingle((G4NavigationLevel *) aLevel); } // Added for use by STL (used for free-ing pre-allocated?). // #ifndef G4NOT_ISO_DELETES inline void G4NavigationLevel::operator delete(void *, void *) { } #endif