Files
geant4/examples/advanced/radiation_monitor/materials/include/RadmonMaterialsManager.icc
T
2016-06-09 15:37:50 +02:00

101 lines
3.7 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. *
// ********************************************************************
//
//
// File name: RadmonMaterialsManager.icc
// Creation date: Sep 2005
// Main author: Riccardo Capra <capra@ge.infn.it>
//
// Id: $Id: RadmonMaterialsManager.icc,v 1.3 2006/06/29 16:16:47 gunter Exp $
// Tag: $Name: geant4-09-01 $
//
#ifndef RADMONMATERIALSMANAGER_HH
#error "RadmonMaterialsManager.icc cannot be included directly. Please use RadmonMaterialsManager.hh"
#else /* RADMONMATERIALSMANAGER_HH */
inline const G4Element & RadmonMaterialsManager :: GetElement(const G4String & elementName) const
{
return const_cast<RadmonMaterialsManager *>(this)->GetElement(elementName);
}
inline G4int RadmonMaterialsManager :: GetNElements() const
{
return G4Element::GetNumberOfElements();
}
inline G4Element & RadmonMaterialsManager :: GetElement(G4int index)
{
return *G4Element::GetElementTable()->operator[](index);
}
inline const G4Element & RadmonMaterialsManager :: GetElement(G4int index) const
{
return const_cast<RadmonMaterialsManager *>(this)->GetElement(index);
}
inline const G4Material & RadmonMaterialsManager :: GetMaterial(const G4String & materialName) const
{
return const_cast<RadmonMaterialsManager *>(this)->GetMaterial(materialName);
}
inline G4int RadmonMaterialsManager :: GetNMaterials() const
{
return G4Material::GetNumberOfMaterials();
}
inline G4Material & RadmonMaterialsManager :: GetMaterial(G4int index)
{
return *G4Material::GetMaterialTable()->operator[](index);
}
inline const G4Material & RadmonMaterialsManager :: GetMaterial(G4int index) const
{
return const_cast<RadmonMaterialsManager *>(this)->GetMaterial(index);
}
inline G4bool RadmonMaterialsManager :: IsIncompleteMaterial(const G4String & materialName) const
{
return const_cast<RadmonMaterialsManager *>(this)->FindIncompleteMaterial(materialName)!=0;
}
#endif /* RADMONMATERIALSMANAGER_HH */