| Home | Libraries | People | FAQ | More

## Class permissions

boost::interprocess::permissions

## Synopsis

    // In header: <boost/interprocess/permissions.hpp>

    class permissions {
    public:

      // public member functions
      permissions(os_permissions_type) noexcept;
      permissions() noexcept;
      void set_default() noexcept;
      void set_unrestricted() noexcept;
      void set_permissions(os_permissions_type) noexcept;
      os_permissions_type get_permissions() const noexcept;
    };

## Description

The permissions class represents permissions to be set to shared memory or files, that can be constructed form usual permission representations: a SECURITY_ATTRIBUTES pointer in windows or ORed rwx chmod integer in UNIX.

### `permissions` public member functions

1.     permissions(os_permissions_type type) noexcept;

   Constructs a permissions object from a user provided os-dependent permissions.

2.     permissions() noexcept;

   Constructs a default permissions object: A null security attributes pointer for windows or 0644 for UNIX.

3.     void set_default() noexcept;

   Sets permissions to default values: A null security attributes pointer for windows or 0644 for UNIX.

4.     void set_unrestricted() noexcept;

   Sets permissions to unrestricted access: A null DACL for windows or 0666 for UNIX.

5.     void set_permissions(os_permissions_type perm) noexcept;

   Sets permissions from a user provided os-dependent permissions.

6.     os_permissions_type get_permissions() const noexcept;

   Returns stored os-dependent permissions