Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4Colour.cc File Reference
#include "G4Colour.hh"
Include dependency graph for G4Colour.cc:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const G4Colour &c)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const G4Colour c 
)

Definition at line 55 of file G4Colour.cc.

55  {
56  os << '(' << c.red << ',' << c.green << ',' << c.blue
57  << ',' << c.alpha << ')';
58  const std::map<G4String, G4Colour>& colourMap = G4Colour::GetMap();
59  // Reverse iterator to pick up English spelling of grey!! :)
60  std::map<G4String, G4Colour>::const_reverse_iterator ri;
61  for (ri = colourMap.rbegin(); ri != colourMap.rend(); ++ri) {
62  if (c == ri->second) {
63  os << " (" << ri->first << ')';
64  break;
65  }
66  }
67 
68  return os;
69 }
static const std::map< G4String, G4Colour > & GetMap()
Definition: G4Colour.cc:147

Here is the call graph for this function: