void ossimKeywordlist::add(const char* prefix, const char* key, ossim_float64 value, bool overwrite, int precision) { if (key) { ossimString k; if (prefix) k = prefix; k += key; ossimString v = ossimString::toString(value, precision); KeywordMap::iterator i = getMapEntry(k); if(i == m_map.end()) { m_map.insert(std::make_pair(k, v)); } else if (overwrite) { (*i).second = v; } } }
void ossimKeywordlist::add(const char* prefix, const char* key, char value, bool overwrite) { if (key) { ossimString k; if (prefix) k = prefix; k += key; char tmp[2]; tmp[0] = value; tmp[1] = '\0'; ossimString v = tmp; KeywordMap::iterator i = getMapEntry(k); if(i == m_map.end()) { m_map.insert(std::make_pair(k, v)); } else if(overwrite) { (*i).second = v; } } }
void ossimKeywordlist::add(const char* prefix, const char* key, const char* value, bool overwrite) { if (key) { ossimString k; if (prefix) k = prefix; k += key; ossimString v; if (value) v = value; if ( m_expandEnvVars == true ) { v = v.expandEnvironmentVariable(); } KeywordMap::iterator i = getMapEntry(k); if(i == m_map.end()) { m_map.insert(std::make_pair(k, v)); } else if(overwrite) { (*i).second = v; } } }
void TSMaterialManager::mapMaterial(const String & textureName, const String & materialName) { if (getMapEntry(textureName).isNotEmpty()) { if (!textureName.equal("unmapped_mat", String::NoCase)) Log::warnf(LogEntry::General, "Warning, overwriting material for: %s", textureName.c_str()); } mMaterialMap[String::ToLower(textureName)] = materialName; }
void ossimKeywordlist::add(const char* key, ossim_int64 value, bool overwrite) { if (key) { ossimString k = key; ossimString v = ossimString::toString(value); KeywordMap::iterator i = getMapEntry(k); if(i == m_map.end()) { m_map.insert(std::make_pair(k, v)); } else if (overwrite) { (*i).second = v; } } }
void ossimKeywordlist::addPair(const std::string& key, const std::string& value, bool overwrite) { if ( key.size() ) { ossimString v = value; if ( m_expandEnvVars == true ) { v = v.expandEnvironmentVariable(); } KeywordMap::iterator i = getMapEntry(key); if (i == m_map.end()) { m_map.insert(std::make_pair(key, v.string())); } else if (overwrite) { (*i).second = v.string(); } } }