45 logger->
log1(
"Initializing palette database...");
57 if (it == lines.end())
62 if (*it !=
"GIMP Palette")
69 while (it != lines.end())
71 const std::string line = *it;
72 if (!line.empty() && line[0] ==
'#')
80 while (it != lines.end())
82 const std::string line = *it;
85 if (line.empty() || line[0] ==
'#')
92 if (sscanf(line.c_str(),
"%10u %10u %10u\t%100s",
93 &r, &g, &b, name) == 4)
105 logger->
log1(
"Unloading palette database...");
111 const std::map<std::string, DyeColor>::const_iterator it =
114 return &(*it).second;
#define reportAlways(...)
std::string getStringValue(const std::string &key) const
void log(const char *const log_text,...)
void log1(const char *const log_text)
const DyeColor * getColor(const std::string &name)
bool loadTextFile(const std::string &fileName, StringVect &lines)
std::map< std::string, DyeColor > mColors
StringVect::const_iterator StringVectCIter
std::vector< std::string > StringVect