33#ifndef G4MODELCOLOURMAP_HH
34#define G4MODELCOLOURMAP_HH
56 void Print(std::ostream& ostr)
const;
61 std::map<T, G4Colour> fMap;
84 ed <<
"G4Colour with key "<<colour<<
" does not exist ";
86 (
"G4ColourMap::Set(Charge charge, const G4String& colour)",
93 Set(quantity, myColour);
100 fMap[quantity] = colour;
107 typename std::map<T, G4Colour>::const_iterator iter = fMap.find(quantity);
109 if (iter != fMap.end()) {
110 colour = iter->second;
121 typename std::map<T, G4Colour>::const_iterator iter = fMap.begin();
123 while (iter != fMap.end()) {
124 ostr<< iter->first <<
" : "<< iter->second <<
G4endl;
static G4bool GetColour(const G4String &key, G4Colour &result)
G4Colour & operator[](const T &quantity)
bool GetColour(const T &, G4Colour &) const
void Print(std::ostream &ostr) const
void Set(const T &, const G4String &)
virtual ~G4ModelColourMap()
void Set(const T &, const G4Colour &)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::ostringstream G4ExceptionDescription