CommonLib
Loading...
Searching...
No Matches
hedgedev::csl::cfg::registry Namespace Reference

Functions

bool _try_parse_registry_path (const std::filesystem::path &in_path, HKEY &out_key, std::wstring &out_sub_key)
template<typename T>
bool read (const std::filesystem::path &in_path, const std::filesystem::path &in_value_name, T &out_result)
template<typename T>
bool read (const std::filesystem::path &in_path, T &out_result)
template<typename T>
bool write (const std::filesystem::path &in_path, const std::filesystem::path &in_value_name, const T &in_value)
template<typename T>
bool write (const std::filesystem::path &in_path, const T &in_value)

Function Documentation

◆ _try_parse_registry_path()

bool hedgedev::csl::cfg::registry::_try_parse_registry_path ( const std::filesystem::path & in_path,
HKEY & out_key,
std::wstring & out_sub_key )
inline

◆ read() [1/2]

template<typename T>
bool hedgedev::csl::cfg::registry::read ( const std::filesystem::path & in_path,
const std::filesystem::path & in_value_name,
T & out_result )
inline

Reads a value from the registry.

Parameters
in_pathThe path to the registry key containing the value.
in_value_nameThe name of the registry value.
out_resultThe value to set.
Returns
true if the value was read successfully. Otherwise, false.

◆ read() [2/2]

template<typename T>
bool hedgedev::csl::cfg::registry::read ( const std::filesystem::path & in_path,
T & out_result )
inline

Reads a value from the registry.

Parameters
in_pathThe path to the registry value.
out_resultThe value to set.
Returns
true if the value was read successfully. Otherwise, false.

◆ write() [1/2]

template<typename T>
bool hedgedev::csl::cfg::registry::write ( const std::filesystem::path & in_path,
const std::filesystem::path & in_value_name,
const T & in_value )
inline

Writes a value to the registry.

Parameters
in_pathThe path to the registry key containing the value.
in_value_nameThe name of the registry value.
in_valueThe value to write.
Returns
true if the value was written successfully. Otherwise, false.

◆ write() [2/2]

template<typename T>
bool hedgedev::csl::cfg::registry::write ( const std::filesystem::path & in_path,
const T & in_value )
inline

Writes a value to the registry.

Parameters
in_pathThe path to the registry value.
in_valueThe value to write.
Returns
true if the value was written successfully. Otherwise, false.