Manages FlatImage permissions stored in reserved space.
More...
#include <permissions.hpp>
|
| | Permissions (fs::path const &path_file_binary) |
| | Constructs a Permissions manager for the given binary.
|
| |
| Value< void > | set_all (bool value) |
| | Sets all permissions to the specified value.
|
| |
| Value< void > | set (std::set< Permission > const &permissions) |
| | Sets the specified permissions (replaces existing)
|
| |
| Value< void > | add (std::set< Permission > const &permissions) |
| | Adds permissions to existing configuration.
|
| |
| Value< void > | del (std::set< Permission > const &permissions) |
| | Removes permissions from existing configuration.
|
| |
| bool | contains (Permission const &permission) const noexcept |
| | Checks if a specific permission is enabled.
|
| |
| Value< std::set< std::string > > | to_strings () const noexcept |
| | Converts enabled permissions to string representations.
|
| |
Manages FlatImage permissions stored in reserved space.
Definition at line 141 of file permissions.hpp.
◆ Permissions()
| ns_reserved::ns_permissions::Permissions::Permissions |
( |
fs::path const & | path_file_binary | ) |
|
|
inline |
Constructs a Permissions manager for the given binary.
- Parameters
-
| path_file_binary | Path to the FlatImage binary file |
Definition at line 169 of file permissions.hpp.
◆ add()
| Value< void > ns_reserved::ns_permissions::Permissions::add |
( |
std::set< Permission > const & | permissions | ) |
|
|
inlinenodiscard |
Adds permissions to existing configuration.
- Parameters
-
| permissions | Set of permissions to add |
- Returns
- Value<void> Success or error
Definition at line 202 of file permissions.hpp.
◆ contains()
| bool ns_reserved::ns_permissions::Permissions::contains |
( |
Permission const & | permission | ) |
const |
|
inlinenodiscardnoexcept |
Checks if a specific permission is enabled.
- Parameters
-
| permission | Permission to check |
- Returns
- True if the permission is enabled, false otherwise
Definition at line 222 of file permissions.hpp.
◆ del()
| Value< void > ns_reserved::ns_permissions::Permissions::del |
( |
std::set< Permission > const & | permissions | ) |
|
|
inlinenodiscard |
Removes permissions from existing configuration.
- Parameters
-
| permissions | Set of permissions to remove |
- Returns
- Value<void> Success or error
Definition at line 212 of file permissions.hpp.
◆ set()
| Value< void > ns_reserved::ns_permissions::Permissions::set |
( |
std::set< Permission > const & | permissions | ) |
|
|
inlinenodiscard |
Sets the specified permissions (replaces existing)
- Parameters
-
| permissions | Set of permissions to enable |
- Returns
- Value<void> Success or error
Definition at line 192 of file permissions.hpp.
◆ set_all()
| Value< void > ns_reserved::ns_permissions::Permissions::set_all |
( |
bool | value | ) |
|
|
inlinenodiscard |
Sets all permissions to the specified value.
- Parameters
-
| value | True to enable all permissions, false to disable |
- Returns
- Value<void> Success or error
Definition at line 178 of file permissions.hpp.
◆ to_strings()
| Value< std::set< std::string > > ns_reserved::ns_permissions::Permissions::to_strings |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Converts enabled permissions to string representations.
- Returns
- Value containing a set of permission names
Definition at line 235 of file permissions.hpp.
The documentation for this class was generated from the following file: