Salome HOME
Boost has been removed from code
[modules/shaper.git] / src / Config / Config_Prop.cpp
1 // File:        Config_Prop.cpp
2 // Created:     18 Sep 2014
3 // Author:      Mikhail PONIKAROV
4
5
6 #include "Config_Prop.h"
7 #include "Events_Loop.h"
8 #include "Events_Message.h"
9
10 void Config_Prop::setValue(const std::string& theValue)
11 {
12   if (theValue != myValue) {
13     myValue = theValue;
14     static const Events_ID aChangedEvent = Events_Loop::loop()->eventByName("PreferenceChanged");
15     Events_Loop::loop()->send(std::shared_ptr<Events_Message>(
16       new Events_Message(aChangedEvent, this)));
17   }
18 }
19
20 void Config_Prop::setDefaultValue(const std::string& theValue)
21 {
22   if (theValue != myDefaultValue) {
23     myDefaultValue = theValue;
24   }
25 }