powerd++
0.4.4
|
This is a wrapper around Sysctl that allows semantically transparent use of a sysctl. More...
#include <sysctl.hpp>
Public Member Functions | |
constexpr | Sync () |
The default constructor. More... | |
constexpr | Sync (SysctlT const &sysctl) noexcept |
The constructor copies the given Sysctl instance. More... | |
Sync & | operator= (T const &value) |
Transparently assiges values of type T to the represented Sysctl instance. More... | |
operator T () const | |
Implicitly cast to the represented type. More... | |
Private Attributes | |
SysctlT | sysctl |
A sysctl to represent. | |
This is a wrapper around Sysctl that allows semantically transparent use of a sysctl.
Note that both assignment and read access (implemented through type casting to T) may throw an exception.
T | The type to represent the sysctl as |
SysctlT | The Sysctl type |
|
inlineconstexpr |
The default constructor.
This is available to defer initialisation to a later moment. This might be useful when initialising global or static instances by a character string repesented name.
|
inlineconstexprnoexcept |
|
inline |
Implicitly cast to the represented type.
|
inline |
Transparently assiges values of type T to the represented Sysctl instance.
value | The value to assign |