G4NavigationLevelRep.icc

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 //  1 October 1997 J.Apostolakis Initial version. 
00030 //                        
00031 // ----------------------------------------------------------------------
00032 
00033 #if defined G4GEOM_ALLOC_EXPORT
00034   extern G4DLLEXPORT G4Allocator<G4NavigationLevelRep> aNavigLevelRepAllocator;
00035 #else
00036   extern G4DLLIMPORT G4Allocator<G4NavigationLevelRep> aNavigLevelRepAllocator;
00037 #endif
00038 
00039 // Accessors
00040 // --------------
00041 
00042 inline
00043 G4VPhysicalVolume*
00044 G4NavigationLevelRep::GetPhysicalVolume()
00045 { 
00046   return sPhysicalVolumePtr; 
00047 }
00048 
00049 inline
00050 const G4AffineTransform&
00051 G4NavigationLevelRep::GetTransform() const 
00052 { 
00053   return sTransform; 
00054 } 
00055 
00056 inline
00057 const G4AffineTransform*
00058 G4NavigationLevelRep::GetTransformPtr() const 
00059 { 
00060   return &sTransform; 
00061 } 
00062 
00063 inline
00064 EVolume G4NavigationLevelRep::GetVolumeType() const 
00065 { 
00066   return sVolumeType; 
00067 }
00068 
00069 inline
00070 G4int G4NavigationLevelRep::GetReplicaNo() const 
00071 { 
00072   return sReplicaNo; 
00073 }
00074 
00075 inline
00076 void G4NavigationLevelRep::AddAReference() 
00077 {
00078   fCountRef++; 
00079 }
00080 
00081 inline
00082 G4bool G4NavigationLevelRep::RemoveAReference() 
00083 {
00084   return( --fCountRef <= 0 ); 
00085 }
00086 
00087 // There is no provision that this class is subclassed.
00088 // If it is subclassed & new data members are added then the
00089 // following "new" & "delete" will fail and give errors. 
00090 //
00091 inline
00092 void* G4NavigationLevelRep::operator new(size_t)
00093 {
00094   return (void *) aNavigLevelRepAllocator.MallocSingle();
00095 }
00096 
00097 inline
00098 void G4NavigationLevelRep::operator delete(void *aLevelRep)
00099 {
00100   aNavigLevelRepAllocator.FreeSingle((G4NavigationLevelRep *) aLevelRep);
00101 }

Generated on Mon May 27 17:48:57 2013 for Geant4 by  doxygen 1.4.7