示例#1
0
wxString EditorConfig::GetString(const wxString& key, const wxString& defaultValue)
{
    // Check the cache first
    std::map<wxString, wxString>::iterator iter = m_cacheStringValues.find(key);
    if(iter != m_cacheStringValues.end()) return iter->second;

    SimpleStringValue data;
    if(!ReadObject(key, &data)) { return defaultValue; }

    m_cacheStringValues[key] = data.GetValue();
    return data.GetValue();
}
示例#2
0
wxString EditorConfig::GetStringValue(const wxString& key)
{
    SimpleStringValue data;
    ReadObject(key, &data);
    return data.GetValue();
}