Welcome to mirror list, hosted at ThFree Co, Russian Federation.

strings_bundle.cpp « base - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fcfdecb7a82cb1a9411d10e5643bb18485fdc5df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "base/strings_bundle.hpp"


void StringsBundle::SetDefaultString(string const & name, string const & value)
{
  m_defValues[name] = value;
}

void StringsBundle::SetString(string const & name, string const & value)
{
  m_values[name] = value;
}

string const StringsBundle::GetString(string const & name) const
{
  TStringMap::const_iterator it = m_values.find(name);
  if (it != m_values.end())
    return it->second;
  else
  {
    it = m_defValues.find(name);
    if (it != m_defValues.end())
      return it->second;
  }
  return "";
}