source: trunk/source/geometry/volumes/include/G4NavigationLevelRep.icc @ 1202

Last change on this file since 1202 was 1058, checked in by garnier, 15 years ago

file release beta

File size: 3.2 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
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.                             *
10// *                                                                  *
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.         *
17// *                                                                  *
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// ********************************************************************
25//
26//
27// $Id: G4NavigationLevelRep.icc,v 1.14 2006/06/29 18:57:29 gunter Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30//  1 October 1997 J.Apostolakis Initial version.
31//                       
32// ----------------------------------------------------------------------
33
34#if defined G4GEOM_ALLOC_EXPORT
35  extern G4DLLEXPORT G4Allocator<G4NavigationLevelRep> aNavigLevelRepAllocator;
36#else
37  extern G4DLLIMPORT G4Allocator<G4NavigationLevelRep> aNavigLevelRepAllocator;
38#endif
39
40// Accessors
41// --------------
42
43inline
44G4VPhysicalVolume*
45G4NavigationLevelRep::GetPhysicalVolume()
46{
47  return sPhysicalVolumePtr;
48}
49
50inline
51const G4AffineTransform&
52G4NavigationLevelRep::GetTransform() const
53{
54  return sTransform;
55}
56
57inline
58const G4AffineTransform*
59G4NavigationLevelRep::GetTransformPtr() const
60{
61  return &sTransform;
62}
63
64inline
65EVolume G4NavigationLevelRep::GetVolumeType() const
66{
67  return sVolumeType;
68}
69
70inline
71G4int G4NavigationLevelRep::GetReplicaNo() const
72{
73  return sReplicaNo;
74}
75
76inline
77void G4NavigationLevelRep::AddAReference()
78{
79  fCountRef++;
80}
81
82inline
83G4bool G4NavigationLevelRep::RemoveAReference()
84{
85  return( --fCountRef <= 0 );
86}
87
88// There is no provision that this class is subclassed.
89// If it is subclassed & new data members are added then the
90// following "new" & "delete" will fail and give errors.
91//
92inline
93void* G4NavigationLevelRep::operator new(size_t)
94{
95  return (void *) aNavigLevelRepAllocator.MallocSingle();
96}
97
98inline
99void G4NavigationLevelRep::operator delete(void *aLevelRep)
100{
101  aNavigLevelRepAllocator.FreeSingle((G4NavigationLevelRep *) aLevelRep);
102}
Note: See TracBrowser for help on using the repository browser.