|
||||
File indexing completed on 2025-01-18 09:58:43
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 // G4NavigationLevel inline implementation 0027 // 0028 // 30.09.97 J.Apostolakis Initial version 0029 // ---------------------------------------------------------------------- 0030 0031 extern G4GEOM_DLL G4Allocator<G4NavigationLevel>*& aNavigationLevelAllocator(); 0032 0033 inline 0034 G4VPhysicalVolume* G4NavigationLevel::GetPhysicalVolume() const 0035 { 0036 return fLevelRep->GetPhysicalVolume(); 0037 } 0038 0039 inline 0040 const G4AffineTransform& G4NavigationLevel::GetTransform() const 0041 { 0042 return fLevelRep->GetTransform() ; 0043 } 0044 0045 inline 0046 const G4AffineTransform* G4NavigationLevel::GetPtrTransform() const 0047 { 0048 return fLevelRep->GetTransformPtr() ; 0049 } 0050 0051 inline 0052 EVolume G4NavigationLevel::GetVolumeType() const 0053 { 0054 return fLevelRep->GetVolumeType() ; 0055 } 0056 0057 inline 0058 G4int G4NavigationLevel::GetReplicaNo() const 0059 { 0060 return fLevelRep->GetReplicaNo() ; 0061 } 0062 0063 // There is no provision in case this class is subclassed. 0064 // If it is subclassed, this will fail and may not give errors! 0065 // 0066 inline 0067 void* G4NavigationLevel::operator new(size_t) 0068 { 0069 if (aNavigationLevelAllocator() == nullptr) 0070 { 0071 aNavigationLevelAllocator() = new G4Allocator<G4NavigationLevel>; 0072 } 0073 return (void *) aNavigationLevelAllocator()->MallocSingle(); 0074 } 0075 0076 // Added for use by STL (used for pre-allocation). 0077 // 0078 inline 0079 void* G4NavigationLevel::operator new(size_t, void* a) 0080 { 0081 return a; 0082 } 0083 0084 inline 0085 void G4NavigationLevel::operator delete(void* aLevel) 0086 { 0087 aNavigationLevelAllocator()->FreeSingle((G4NavigationLevel *) aLevel); 0088 } 0089 0090 // Added for use by STL (used for free-ing pre-allocated?). 0091 // 0092 #ifndef G4NOT_ISO_DELETES 0093 inline 0094 void G4NavigationLevel::operator delete(void *, void *) 0095 { 0096 } 0097 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |