Files
geant4/source/geometry/volumes/include/G4NavigationLevel.icc
T
2016-06-10 12:08:39 +02:00

101 lines
3.2 KiB
Plaintext

//
// ********************************************************************
// * 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 86527 2014-11-13 15:06:24Z gcosmo $
//
// 30.09.97 J.Apostolakis Initial version.
//
// ----------------------------------------------------------------------
extern G4GEOM_DLL G4ThreadLocal
G4Allocator<G4NavigationLevel> *aNavigationLevelAllocator;
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)
{
if (!aNavigationLevelAllocator)
{
aNavigationLevelAllocator = new G4Allocator<G4NavigationLevel>;
}
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