Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Class permissions

boost::log::permissions — Access permissions wrapper.

Synopsis

// 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;
};

Description

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/destruct

  1. permissions() 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.

  2. permissions(permissions const & that) noexcept;

    Copy constructor.

  3. permissions(native_type perms) noexcept;

    Initializing constructor.

  4. permissions(boost::interprocess::permissions const & perms) noexcept;

    Initializing constructor.

  5. permissions(permissions && that) noexcept;

    Move constructor.

  6. permissions & operator=(permissions const & that) noexcept;

    Copy assignment.

  7. permissions & operator=(permissions && that) noexcept;

    Move assignment.

permissions public member functions

  1. void set_native(native_type perms) noexcept;

    Sets permissions from the OS-specific permissions.

  2. native_type get_native() const noexcept;

    Returns the underlying OS-specific permissions.

  3. void set_default() noexcept;

    Sets the default permissions, which are equivalent to NULL SECURITY_ATTRIBUTES on Windows and 0644 on POSIX platforms.

  4. void set_unrestricted();

    Sets unrestricted permissions, which are equivalent to SECURITY_ATTRIBUTES with NULL DACL on Windows and 0666 on POSIX platforms.

  5. void swap(permissions & that) noexcept;

    The method swaps the object with that.

    Parameters:

    that

    The other object to swap with.

permissions friend functions

  1. friend void swap(permissions & a, permissions & b) noexcept;
    Swaps the two permissions objects.

PrevUpHomeNext