1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-09-05 12:27:59 +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
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) bool InMemoryConfiguration::is_present(std::string property_name)
{ {
return (properties_.find(property_name) != properties_.end()); return (properties_.find(property_name) != properties_.end());

View File

@@ -63,6 +63,7 @@ public:
float property(std::string property_name, float default_value); float property(std::string property_name, float default_value);
double property(std::string property_name, double default_value); double property(std::string property_name, double default_value);
void set_property(std::string property_name, std::string 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); bool is_present(std::string property_name);
private: private: