36 virtual bool load(std::istream& is);
43 virtual bool save(std::ostream& os);
Class for reading and writing ini-profiles.
Definition IniProfile.h:16
Implementation of a unit conversion server using an ini-file. This conversion class installs a handle...
Definition UnitConversionServer.h:16
virtual bool load(std::istream &is)
Loads the conversion settings.
UnitConversionServer()
Default constructor.
bool isDirty() const
Gets the dirty status of the configuration.
virtual void setUnitSystem(int us)
Sets the unit system to be applied.
virtual bool handler(UnitConversionEvent &ev)
Handler according the unit conversion function type.
EUnitSystem getUnitSystem() const
Gets the unit system being applied.
virtual ~UnitConversionServer()
Virtual destructor.
IniProfile _profile
Definition UnitConversionServer.h:126
static const char * getUnitSystemName(int us)
Gets the section name of the passed enumerate.
virtual bool save(std::ostream &os)
Saves the conversion settings.
IniProfile & getProfile()
Gets the internal storage profile.
EUnitSystem
Different unit conversion systems.
Definition UnitConversionServer.h:65
@ usMetric
Definition UnitConversionServer.h:74
@ usPassThrough
Definition UnitConversionServer.h:69
UnitConversionServer(const UnitConversionServer &)=delete
Copying this class is not possible.
void removeConversion(const std::string &key)
Removes a conversion entry in the profile.
void setConversion(UnitConversionEvent &ev)
Writes or overwrites a conversion entry in the profile.
static const std::vector< UnitSystemPair > & getUnitSystemNames()
std::pair< EUnitSystem, const char * > UnitSystemPair
Type to combine a system enumerate and name.
Definition UnitConversionServer.h:109
#define _GII_CLASS
Definition gii/global.h:38
Definition Application.h:10
Structure passed to handle unit conversions.
Definition UnitConversion.h:14