...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::log::permissions — Access permissions wrapper.
// In header: <boost/log/utility/permissions.hpp> class permissions { public: // types typedef implementation_defined native_type; // The type of security permissions, specific to the operating system. // construct/copy/destruct permissions() noexcept; permissions(permissions const &) noexcept; permissions(native_type) noexcept; permissions(boost::interprocess::permissions const &) noexcept; permissions(permissions &&) noexcept; permissions & operator=(permissions const &) noexcept; permissions & operator=(permissions &&) noexcept; // public member functions void set_native(native_type) noexcept; native_type get_native() const noexcept; void set_default() noexcept; void set_unrestricted(); void swap(permissions &) noexcept; // friend functions friend void swap(permissions &, permissions &) noexcept; };
On Windows platforms, it represents a pointer to SECURITY_ATTRIBUTES
. The user is responsible for allocating and reclaiming resources associated with the pointer, permissions
instance does not own them.
On POSIX platforms, it represents a mode_t
value.
permissions
public
construct/copy/destructpermissions() noexcept;
Default constructor. The method constructs an object that represents a null SECURITY_ATTRIBUTES
pointer on Windows platforms, and a mode_t
value 0644
on POSIX platforms.
permissions(permissions const & that) noexcept;
Copy constructor.
permissions(native_type perms) noexcept;
Initializing constructor.
permissions(boost::interprocess::permissions const & perms) noexcept;
Initializing constructor.
permissions(permissions && that) noexcept;
Move constructor.
permissions & operator=(permissions const & that) noexcept;
Copy assignment.
permissions & operator=(permissions && that) noexcept;
Move assignment.
permissions
public member functionsvoid set_native(native_type perms) noexcept;
Sets permissions from the OS-specific permissions.
native_type get_native() const noexcept;
Returns the underlying OS-specific permissions.
void set_default() noexcept;
Sets the default permissions, which are equivalent to NULL
SECURITY_ATTRIBUTES
on Windows and 0644
on POSIX platforms.
void set_unrestricted();
Sets unrestricted permissions, which are equivalent to SECURITY_ATTRIBUTES
with NULL
DACL on Windows and 0666
on POSIX platforms.
void swap(permissions & that) noexcept;
The method swaps the object with that.
Parameters: |
|
permissions
friend functionsfriend void swap(permissions & a, permissions & b) noexcept;Swaps the two
permissions
objects.