Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 8895f45

Browse files
committed
Adding the ability to set configuration value
This patch allows the pfw test wrapper to set configuration values. Signed-off-by: Thomas Cahuzac <[email protected]>
1 parent 86743f2 commit 8895f45

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

test/functional-tests/include/ParameterFramework.hpp

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace parameterFramework
3939
{
4040

4141
/** This forward declaration is an implementation detail, client should expect its presence.
42-
* @note This forward definition should not be needed as the `friend class ElementHandle`
42+
* @note This forward definition should not be needed as the `friend class ElementHandle`
4343
* declaration in ParameterFramework is itself a forward declaration.
4444
* Unfortunately there seem to be a bug in visual studio 2013, it is required.
4545
*/
@@ -132,6 +132,25 @@ class ParameterFramework : private parameterFramework::ConfigFiles,
132132
{
133133
mayFailCall(&PF::accessParameterValue, path, value, false);
134134
}
135+
136+
/** Wrap PF::accessConfigurationValue in "set" mode (and rename it) to throw an
137+
* exception on failure
138+
*/
139+
void setConfigurationParameter(const std::string domain,
140+
const std::string &configuration, const std::string& path, std::string& value)
141+
{
142+
mayFailCall(&PF::accessConfigurationValue, domain, configuration, path, value, true);
143+
}
144+
145+
/** Wrap PF::accessConfigurationValue in "get" mode (and rename it) to throw an
146+
* exception on failure
147+
*/
148+
void getConfigurationParameter(const std::string &domain,
149+
const std::string &configuration, const std::string& path, std::string& value)
150+
{
151+
mayFailCall(&PF::accessConfigurationValue, domain, configuration, path, value,
152+
false);
153+
}
135154
private:
136155

137156
/** Create an unwrapped element handle.

0 commit comments

Comments
 (0)