33 #ifndef G4MODELCOLOURMAP_HH
34 #define G4MODELCOLOURMAP_HH
57 void Print(std::ostream& ostr)
const;
62 std::map<T, G4Colour> fMap;
85 ed <<
"G4Colour with key "<<colour<<
" does not exist ";
87 (
"G4ColourMap::Set(Charge charge, const G4String& colour)",
94 Set(quantity, myColour);
101 fMap[quantity] = colour;
104 template <
typename T>
108 template <
typename T>
112 typename std::map<T, G4Colour>::const_iterator iter = fMap.find(quantity);
114 if (iter != fMap.end()) {
115 colour = iter->second;
122 template <
typename T>
126 typename std::map<T, G4Colour>::const_iterator iter = fMap.begin();
128 while (iter != fMap.end()) {
129 ostr<< iter->first <<
" : "<< iter->second <<
G4endl;
G4Colour & operator[](const T &quantity)
const std::map< T, G4Colour > & GetBasicMap() const
std::ostringstream G4ExceptionDescription
static G4bool GetColour(const G4String &key, G4Colour &result)
void Set(const T &, const G4Colour &)
bool GetColour(const T &, G4Colour &) const
void Print(std::ostream &ostr) const
virtual ~G4ModelColourMap()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void Set(G4int Elements, T *To, T Value)