File Information
Library: IoT/Settings
Package: Generated
Header: IoT/Settings/SettingsServiceRemoteObject.h
Description
The SettingsService provides a service interface to the configuration system. Specifically it allows to change configuration parameters and to save changed parameters in a file.
Inheritance
Direct Base Classes: ISettingsService, Poco::RemotingNG::RemoteObject
All Base Classes: ISettingsService, Poco::OSP::Service, Poco::RefCountedObject, Poco::RemotingNG::Identifiable, Poco::RemotingNG::RemoteObject
Member Summary
Member Functions: getBool, getDouble, getInt16, getInt32, getInt64, getString, getUInt16, getUInt32, getUInt64, haveKey, haveSettingsKey, keys, remoting__typeId, remove, save, setBool, setDouble, setInt16, setInt32, setInt64, setString, setUInt16, setUInt32, setUInt64, settingsKeys
Inherited Functions: duplicate, getBool, getDouble, getInt16, getInt32, getInt64, getString, getUInt16, getUInt32, getUInt64, haveKey, haveSettingsKey, isA, keys, mutex, referenceCount, release, remoting__enableRemoteEvents, remoting__getURI, remoting__hasEvents, remoting__objectId, remoting__setURI, remoting__typeId, remove, save, setBool, setDouble, setInt16, setInt32, setInt64, setString, setUInt16, setUInt32, setUInt64, settingsKeys, type
Types Aliases
Ptr
using Ptr = Poco::AutoPtr < SettingsServiceRemoteObject >;
Constructors
SettingsServiceRemoteObject
SettingsServiceRemoteObject(
const Poco::RemotingNG::Identifiable::ObjectId & oid,
Poco::SharedPtr < IoT::Settings::SettingsService > pServiceObject
);
Creates a SettingsServiceRemoteObject.
Destructor
~SettingsServiceRemoteObject
virtual ~SettingsServiceRemoteObject();
Destroys the SettingsServiceRemoteObject.
Member Functions
getBool
Poco::Optional < double > getBool(
const std::string & key,
const Poco::Optional < double > & deflt = Poco::Optional < double > ()
) const;
Returns the boolean value of the property with the given key, or the given default value if the key does not exist. If the value contains references to other properties (${<property>}, or ${<property>:-<default>}), these are expanded.
Throws a Poco::SyntaxException if the property value can not be converted to a boolean value.
The following string values can be converted into a boolean:
- numerical values: non-zero becomes true, zero becomes false
- strings: "true", "yes", "on" become true, "false", "no", "off" become false
Case does not matter.
getDouble
Poco::Optional < double > getDouble(
const std::string & key,
const Poco::Optional < double > & deflt = Poco::Optional < double > ()
) const;
Returns the double value of the property with the given key, or the given default value if the key does not exist. If the value contains references to other properties (${<property>}, or ${<property>:-<default>}), these are expanded.
Throws a Poco::SyntaxException if the property value can not be converted to a double value.
getInt16
Poco::Optional < Poco::Int16 > getInt16(
const std::string & key,
const Poco::Optional < Poco::Int16 > & deflt = Poco::Optional < Poco::Int16 > ()
) const;
Returns the 16-bit integer value of the property with the given key, or the given default value if the key does not exist. If the value contains references to other properties (${<property>}, or ${<property>:-<default>}), these are expanded.
Throws a Poco::SyntaxException or a Poco::RangeException if the property value can not be converted to an Int16 value.
getInt32
Poco::Optional < Poco::Int32 > getInt32(
const std::string & key,
const Poco::Optional < Poco::Int32 > & deflt = Poco::Optional < Poco::Int32 > ()
) const;
Returns the 32-bit integer value of the property with the given key, or the given default value if the key does not exist. If the value contains references to other properties (${<property>}, or ${<property>:-<default>}), these are expanded.
Throws a Poco::SyntaxException or a Poco::RangeException if the property value can not be converted to an Int32 value.
getInt64
Poco::Optional < Poco::Int64 > getInt64(
const std::string & key,
const Poco::Optional < Poco::Int64 > & deflt = Poco::Optional < Poco::Int64 > ()
) const;
Returns the 64-bit integer value of the property with the given key, or the given default value if the key does not exist. If the value contains references to other properties (${<property>}, or ${<property>:-<default>}), these are expanded.
Throws a Poco::SyntaxException if the property value can not be converted to an Int64 value.
getString
Poco::Optional < std::string > getString(
const std::string & key,
const Poco::Optional < std::string > & deflt = Poco::Optional < std::string > ()
) const;
Returns the string value of the property with the given key, or the given default value if the key does not exist. If the value contains references to other properties (${<property>}, or ${<property>:-<default>}), these are expanded.
getUInt16
Poco::Optional < Poco::UInt16 > getUInt16(
const std::string & key,
const Poco::Optional < Poco::UInt16 > & deflt = Poco::Optional < Poco::UInt16 > ()
) const;
Returns the 16-bit unsigned integer value of the property with the given key, or the given default value if the key does not exist. If the value contains references to other properties (${<property>}, or ${<property>:-<default>}), these are expanded.
Throws a Poco::SyntaxException or a Poco::RangeException if the property value can not be converted to an UInt16 value.
getUInt32
Poco::Optional < Poco::UInt32 > getUInt32(
const std::string & key,
const Poco::Optional < Poco::UInt32 > & deflt = Poco::Optional < Poco::UInt32 > ()
) const;
Returns the 32-bit unsigned integer value of the property with the given key, or the given default value if the key does not exist. If the value contains references to other properties (${<property>}, or ${<property>:-<default>}), these are expanded.
Throws a Poco::SyntaxException or a Poco::RangeException if the property value can not be converted to an UInt32 value.
getUInt64
Poco::Optional < Poco::UInt64 > getUInt64(
const std::string & key,
const Poco::Optional < Poco::UInt64 > & deflt = Poco::Optional < Poco::UInt64 > ()
) const;
Returns the 64-bit unsigned integer value of the property with the given key, or the given default value if the key does not exist. If the value contains references to other properties (${<property>}, or ${<property>:-<default>}), these are expanded.
Throws a Poco::SyntaxException or a Poco::RangeException if the property value can not be converted to an UInt64 value.
haveKey
virtual bool haveKey(
const std::string & key
) const;
Returns true if the given key exists (either in the settings configuration, or in the global configuration), otherwise false.
haveSettingsKey
virtual bool haveSettingsKey(
const std::string & key
) const;
Returns true if the given key is defined in the settings configuration object, otherwise false.
keys
std::vector < std::string > keys(
const std::string & key = std::string ()
) const;
Returns in range the names of all subkeys under the given key. If an empty key is passed, all root level keys are returned.
See also: IoT::Settings::ISettingsService::keys()
remoting__typeId
virtual const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId() const;
remove
virtual void remove(
const std::string & key
);
Removes the value with the given key from the settings configuration.
save
virtual void save() const;
Saves the settings file to disk.
See also: IoT::Settings::ISettingsService::save()
setBool
virtual void setBool(
const std::string & key,
bool value
);
Sets the property with the given key to the given value. An already existing value for the key is overwritten.
The new value is not persisted. Call save() to persist changes.
setDouble
virtual void setDouble(
const std::string & key,
double value
);
Sets the property with the given key to the given value. An already existing value for the key is overwritten.
The new value is not persisted. Call save() to persist changes.
setInt16
virtual void setInt16(
const std::string & key,
Poco::Int16 value
);
Sets the property with the given key to the given value. An already existing value for the key is overwritten.
The new value is not persisted. Call save() to persist changes.
setInt32
virtual void setInt32(
const std::string & key,
Poco::Int32 value
);
Sets the property with the given key to the given value. An already existing value for the key is overwritten.
The new value is not persisted. Call save() to persist changes.
setInt64
virtual void setInt64(
const std::string & key,
Poco::Int64 value
);
Sets the property with the given key to the given value. An already existing value for the key is overwritten.
The new value is not persisted. Call save() to persist changes.
setString
virtual void setString(
const std::string & key,
const std::string & value
);
Sets the property with the given key to the given value. An already existing value for the key is overwritten.
The new value is not persisted. Call save() to persist changes.
setUInt16
virtual void setUInt16(
const std::string & key,
Poco::UInt16 value
);
Sets the property with the given key to the given value. An already existing value for the key is overwritten.
The new value is not persisted. Call save() to persist changes.
setUInt32
virtual void setUInt32(
const std::string & key,
Poco::UInt32 value
);
Sets the property with the given key to the given value. An already existing value for the key is overwritten.
The new value is not persisted. Call save() to persist changes.
setUInt64
virtual void setUInt64(
const std::string & key,
Poco::UInt64 value
);
Sets the property with the given key to the given value. An already existing value for the key is overwritten.
The new value is not persisted. Call save() to persist changes.
settingsKeys
std::vector < std::string > settingsKeys(
const std::string & key = std::string ()
) const;
Returns in range the names of all subkeys under the given key. If an empty key is passed, all root level keys are returned.
Only keys from the underlying settings configuration object are returned.