• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Class permissions</title>
5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../index.html" title="Chapter 1. Boost.Log v2">
8<link rel="up" href="../../utilities.html#header.boost.log.utility.permissions_hpp" title="Header &lt;boost/log/utility/permissions.hpp&gt;">
9<link rel="prev" href="open_mode/open_or_create.html" title="Global open_or_create">
10<link rel="next" href="abstract_ordering.html" title="Class template abstract_ordering">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
14<hr>
15<div class="spirit-nav">
16<a accesskey="p" href="open_mode/open_or_create.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.permissions_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="abstract_ordering.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
17</div>
18<div class="refentry">
19<a name="boost.log.permissions"></a><div class="titlepage"></div>
20<div class="refnamediv">
21<h2><span class="refentrytitle">Class permissions</span></h2>
22<p>boost::log::permissions — Access permissions wrapper. </p>
23</div>
24<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
25<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../utilities.html#header.boost.log.utility.permissions_hpp" title="Header &lt;boost/log/utility/permissions.hpp&gt;">boost/log/utility/permissions.hpp</a>&gt;
26
27</span>
28<span class="keyword">class</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">{</span>
29<span class="keyword">public</span><span class="special">:</span>
30  <span class="comment">// types</span>
31  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span> <a name="boost.log.permissions.native_type"></a><span class="identifier">native_type</span><span class="special">;</span>  <span class="comment">// The type of security permissions, specific to the operating system. </span>
32
33  <span class="comment">// <a class="link" href="permissions.html#boost.log.permissionsconstruct-copy-destruct">construct/copy/destruct</a></span>
34  <a class="link" href="permissions.html#idm46079573356528-bb"><span class="identifier">permissions</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
35  <a class="link" href="permissions.html#idm46079573354128-bb"><span class="identifier">permissions</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
36  <a class="link" href="permissions.html#idm46079573349648-bb"><span class="identifier">permissions</span></a><span class="special">(</span><span class="identifier">native_type</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
37  <a class="link" href="permissions.html#idm46079573347968-bb"><span class="identifier">permissions</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">permissions</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
38  <a class="link" href="permissions.html#idm46079573346256-bb"><span class="identifier">permissions</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
39  <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <a class="link" href="permissions.html#idm46079573352176-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
40  <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <a class="link" href="permissions.html#idm46079573344304-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
41
42  <span class="comment">// <a class="link" href="permissions.html#idm46079573370320-bb">public member functions</a></span>
43  <span class="keyword">void</span> <a class="link" href="permissions.html#idm46079573369760-bb"><span class="identifier">set_native</span></a><span class="special">(</span><span class="identifier">native_type</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
44  <span class="identifier">native_type</span> <a class="link" href="permissions.html#idm46079573367504-bb"><span class="identifier">get_native</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
45  <span class="keyword">void</span> <a class="link" href="permissions.html#idm46079573365936-bb"><span class="identifier">set_default</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
46  <span class="keyword">void</span> <a class="link" href="permissions.html#idm46079573363024-bb"><span class="identifier">set_unrestricted</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
47  <span class="keyword">void</span> <a class="link" href="permissions.html#idm46079573360384-bb"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
48
49  <span class="comment">// <a class="link" href="permissions.html#idm46079573341776-bb">friend functions</a></span>
50  <span class="keyword">friend</span> <span class="keyword">void</span> <a class="link" href="permissions.html#idm46079573341216-bb"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
51<span class="special">}</span><span class="special">;</span></pre></div>
52<div class="refsect1">
53<a name="idm44984852627856"></a><h2>Description</h2>
54<p>On Windows platforms, it represents a pointer to <code class="computeroutput">SECURITY_ATTRIBUTES</code>. The user is responsible for allocating and reclaiming resources associated with the pointer, <code class="computeroutput">permissions</code> instance does not own them.</p>
55<p>On POSIX platforms, it represents a <code class="computeroutput">mode_t</code> value. </p>
56<div class="refsect2">
57<a name="idm44984852624560"></a><h3>
58<a name="boost.log.permissionsconstruct-copy-destruct"></a><code class="computeroutput">permissions</code>
59        public
60       construct/copy/destruct</h3>
61<div class="orderedlist"><ol class="orderedlist" type="1">
62<li class="listitem">
63<pre class="literallayout"><a name="idm46079573356528-bb"></a><span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
64<p>Default constructor. The method constructs an object that represents a null <code class="computeroutput">SECURITY_ATTRIBUTES</code> pointer on Windows platforms, and a <code class="computeroutput">mode_t</code> value <code class="computeroutput">0644</code> on POSIX platforms. </p>
65</li>
66<li class="listitem">
67<pre class="literallayout"><a name="idm46079573354128-bb"></a><span class="identifier">permissions</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
68<p>Copy constructor. </p>
69</li>
70<li class="listitem">
71<pre class="literallayout"><a name="idm46079573349648-bb"></a><span class="identifier">permissions</span><span class="special">(</span><span class="identifier">native_type</span> perms<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
72<p>Initializing constructor. </p>
73</li>
74<li class="listitem">
75<pre class="literallayout"><a name="idm46079573347968-bb"></a><span class="identifier">permissions</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">permissions</span> <span class="keyword">const</span> <span class="special">&amp;</span> perms<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
76<p>Initializing constructor. </p>
77</li>
78<li class="listitem">
79<pre class="literallayout"><a name="idm46079573346256-bb"></a><span class="identifier">permissions</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
80<p>Move constructor. </p>
81</li>
82<li class="listitem">
83<pre class="literallayout"><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <a name="idm46079573352176-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
84<p>Copy assignment. </p>
85</li>
86<li class="listitem">
87<pre class="literallayout"><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <a name="idm46079573344304-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
88<p>Move assignment. </p>
89</li>
90</ol></div>
91</div>
92<div class="refsect2">
93<a name="idm44984852571376"></a><h3>
94<a name="idm46079573370320-bb"></a><code class="computeroutput">permissions</code> public member functions</h3>
95<div class="orderedlist"><ol class="orderedlist" type="1">
96<li class="listitem">
97<pre class="literallayout"><span class="keyword">void</span> <a name="idm46079573369760-bb"></a><span class="identifier">set_native</span><span class="special">(</span><span class="identifier">native_type</span> perms<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
98<p>Sets permissions from the OS-specific permissions. </p>
99</li>
100<li class="listitem">
101<pre class="literallayout"><span class="identifier">native_type</span> <a name="idm46079573367504-bb"></a><span class="identifier">get_native</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
102<p>Returns the underlying OS-specific permissions. </p>
103</li>
104<li class="listitem">
105<pre class="literallayout"><span class="keyword">void</span> <a name="idm46079573365936-bb"></a><span class="identifier">set_default</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
106<p>Sets the default permissions, which are equivalent to <code class="computeroutput">NULL</code> <code class="computeroutput">SECURITY_ATTRIBUTES</code> on Windows and <code class="computeroutput">0644</code> on POSIX platforms. </p>
107</li>
108<li class="listitem">
109<pre class="literallayout"><span class="keyword">void</span> <a name="idm46079573363024-bb"></a><span class="identifier">set_unrestricted</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
110<p>Sets unrestricted permissions, which are equivalent to <code class="computeroutput">SECURITY_ATTRIBUTES</code> with <code class="computeroutput">NULL</code> DACL on Windows and <code class="computeroutput">0666</code> on POSIX platforms. </p>
111</li>
112<li class="listitem">
113<pre class="literallayout"><span class="keyword">void</span> <a name="idm46079573360384-bb"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
114<p>The method swaps the object with <span class="emphasis"><em>that</em></span>.</p>
115<p>
116</p>
117<div class="variablelist"><table border="0" class="variablelist compact">
118<colgroup>
119<col align="left" valign="top">
120<col>
121</colgroup>
122<tbody><tr>
123<td><p><span class="term">Parameters:</span></p></td>
124<td><div class="variablelist"><table border="0" class="variablelist compact">
125<colgroup>
126<col align="left" valign="top">
127<col>
128</colgroup>
129<tbody><tr>
130<td><p><span class="term"><code class="computeroutput">that</code></span></p></td>
131<td><p>The other object to swap with. </p></td>
132</tr></tbody>
133</table></div></td>
134</tr></tbody>
135</table></div>
136</li>
137</ol></div>
138</div>
139<div class="refsect2">
140<a name="idm44984852532432"></a><h3>
141<a name="idm46079573341776-bb"></a><code class="computeroutput">permissions</code> friend functions</h3>
142<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
143<pre class="literallayout"><span class="keyword">friend</span> <span class="keyword">void</span> <a name="idm46079573341216-bb"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> a<span class="special">,</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> b<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Swaps the two <code class="computeroutput">permissions</code> objects. </li></ol></div>
144</div>
145</div>
146</div>
147<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
148<td align="left"></td>
149<td align="right"><div class="copyright-footer">Copyright © 2007-2019 Andrey Semashev<p>
150        Distributed under the Boost Software License, Version 1.0. (See accompanying
151        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
152      </p>
153</div></td>
154</tr></table>
155<hr>
156<div class="spirit-nav">
157<a accesskey="p" href="open_mode/open_or_create.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.permissions_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="abstract_ordering.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
158</div>
159</body>
160</html>
161