CommonLib
Toggle main menu visibility
Loading...
Searching...
No Matches
registry.h
Go to the documentation of this file.
1
#
pragma
once
2
3
#
include
<
filesystem
>
4
5
namespace
hedgedev::csl::cfg::
registry
6
{
7
///
8
/// Reads a value from the registry.
9
///
10
/// \param in_path The path to the registry key containing the value.
11
/// \param in_value_name The name of the registry value.
12
/// \param out_result The value to set.
13
///
14
/// \returns `true` if the value was read successfully. Otherwise, `false`.
15
///
16
template
<
typename
T>
17
inline
bool
read
(
const
std::filesystem::path& in_path,
const
std::filesystem::path& in_value_name, T& out_result);
18
19
///
20
/// Reads a value from the registry.
21
///
22
/// \param in_path The path to the registry value.
23
/// \param out_result The value to set.
24
///
25
/// \returns `true` if the value was read successfully. Otherwise, `false`.
26
///
27
template
<
typename
T>
28
inline
bool
read
(
const
std::filesystem::path& in_path, T& out_result);
29
30
///
31
/// Writes a value to the registry.
32
///
33
/// \param in_path The path to the registry key containing the value.
34
/// \param in_value_name The name of the registry value.
35
/// \param in_value The value to write.
36
///
37
/// \returns `true` if the value was written successfully. Otherwise, `false`.
38
///
39
template
<
typename
T>
40
inline
bool
write
(
const
std::filesystem::path& in_path,
const
std::filesystem::path& in_value_name,
const
T& in_value);
41
42
///
43
/// Writes a value to the registry.
44
///
45
/// \param in_path The path to the registry value.
46
/// \param in_value The value to write.
47
///
48
/// \returns `true` if the value was written successfully. Otherwise, `false`.
49
///
50
template
<
typename
T>
51
inline
bool
write
(
const
std::filesystem::path& in_path,
const
T& in_value);
52
}
53
54
#
ifdef
WIN32
55
#
include
"os/registry_win32.inl"
56
#
endif
hedgedev::csl::cfg::registry::write
bool write(const std::filesystem::path &in_path, const std::filesystem::path &in_value_name, const T &in_value)
Definition
registry_win32.inl:130
hedgedev::csl::cfg::registry::write
bool write(const std::filesystem::path &in_path, const T &in_value)
Definition
registry_win32.inl:187
hedgedev::csl::cfg::registry::read
bool read(const std::filesystem::path &in_path, const std::filesystem::path &in_value_name, T &out_result)
Definition
registry_win32.inl:49
hedgedev::csl::cfg::registry::read
bool read(const std::filesystem::path &in_path, T &out_result)
Definition
registry_win32.inl:124
hedgedev
Definition
registry_win32.inl:10
include
cfg
registry.h
Generated by
1.18.0