#include "G4Colour.hh"
Go to the source code of this file.
Functions | |
std::ostream & | operator<< (std::ostream &os, const G4Colour &c) |
std::ostream& operator<< | ( | std::ostream & | os, | |
const G4Colour & | c | |||
) |
Definition at line 55 of file G4Colour.cc.
References G4Colour::alpha, G4Colour::blue, G4Colour::GetMap(), G4Colour::green, and G4Colour::red.
00055 { 00056 os << '(' << c.red << ',' << c.green << ',' << c.blue 00057 << ',' << c.alpha << ')'; 00058 const std::map<G4String, G4Colour>& colourMap = G4Colour::GetMap(); 00059 // Reverse iterator to pick up English spelling of grey!! :) 00060 std::map<G4String, G4Colour>::const_reverse_iterator ri; 00061 for (ri = colourMap.rbegin(); ri != colourMap.rend(); ++ri) { 00062 if (c == ri->second) { 00063 os << " (" << ri->first << ')'; 00064 break; 00065 } 00066 } 00067 00068 return os; 00069 }