RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
24 #ifndef LAUNCHER_PLUGINS_ABSTRACT_USER_PROFILES_HPP
25 #define LAUNCHER_PLUGINS_ABSTRACT_USER_PROFILES_HPP
27 #include <Noncopyable.hpp>
36 namespace launcher_plugins {
50 namespace launcher_plugins {
60 typedef std::function<Error(
const std::string& in_value)> CustomValueValidator;
126 template <
typename T>
153 template <
typename T>
167 const std::string& in_valueName,
168 const CustomValueValidator& in_validator)
const;
189 virtual const std::set<std::string>& getValidFieldNames()
const = 0;
203 virtual Error validateValues()
const = 0;
206 PRIVATE_IMPL(m_impl);
Class which represents a path on the system. May be any type of file (e.g. directory,...
Definition: FilePath.hpp:77
Class which represents a system user.
Definition: User.hpp:55
AbstractUserProfiles()
Default constructor.
virtual ~AbstractUserProfiles()=default
Default virtual destructor for inheritance.
Error getValueForUser(const std::string &in_valueName, const system::User &in_user, T &out_value) const
Gets the value with the specified name for the given user, based on the profiles configuration file.
Error initialize()
Initializes the user profiles. Must be called before attempting to retrieve configuration values.
Class which represents an error.
Definition: Error.hpp:174
Class which can be inherited from to disallow copying of its child classes.
Definition: Noncopyable.hpp:34
static bool isValueNotFoundError(const Error &in_error)
Checks whether the error indicates that the configuration value was not found.
Base class which reads an ini-based user profiles file.
Definition: AbstractUserProfiles.hpp:65
Error validateValue(const std::string &in_valueName) const
Parses all occurrences of the configuration setting with name in_valueName to validate it is correctl...