1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-13 21:34:57 +00:00

Add possibility to override parameters in InMemoryConfiguration class

This commit is contained in:
Carles Fernandez 2018-06-28 09:20:38 +02:00
parent d6cb8aa2c0
commit db5145f1e7
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 8 additions and 0 deletions

View File

@ -117,6 +117,13 @@ void InMemoryConfiguration::set_property(std::string property_name, std::string
}
void InMemoryConfiguration::supersede_property(std::string property_name, std::string value)
{
properties_.erase(property_name);
properties_.insert(std::make_pair(property_name, value));
}
bool InMemoryConfiguration::is_present(std::string property_name)
{
return (properties_.find(property_name) != properties_.end());

View File

@ -63,6 +63,7 @@ public:
float property(std::string property_name, float default_value);
double property(std::string property_name, double default_value);
void set_property(std::string property_name, std::string value);
void supersede_property(std::string property_name, std::string value);
bool is_present(std::string property_name);
private: