PLCnext API Documentation 23.6.0.37
Permissions.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Core/Enum.hxx"
9
10// DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED
11
12namespace Arp { namespace System { namespace Commons { namespace Services { namespace Io
13{
14
18enum class Permissions : int32
19{
23 None = 0,
24
28 OthersExe = 1, // (1 << 0)
29
33 OthersWrite = 2, // (1 << 1)
34
38 OthersRead = 4, // (1 << 2)
39
43 OthersAll = 7,
44
48 GroupExe = 8, // (1 << 3)
49
53 GroupWrite = 16, // (1 << 4)
54
58 GroupRead = 32, // (1 << 5)
59
63 GroupAll = 56,
64
68 OwnerExe = 64, // (1 << 6)
69
73 OwnerWrite = 128, // (1 << 7)
74
78 OwnerRead = 256, // (1 << 8)
79
83 OwnerAll = 448,
84
88 AllAll = 511,
89};
90
91constexpr Permissions operator|(Permissions lhs, Permissions rhs)
92{
93 return static_cast<Permissions>(static_cast<int32>(lhs) | static_cast<int32>(rhs));
94}
95
96constexpr Permissions operator&(Permissions lhs, Permissions rhs)
97{
98 return static_cast<Permissions>(static_cast<int32>(lhs) & static_cast<int32>(rhs));
99}
100
101inline Permissions& operator|=(Permissions& lhs, Permissions rhs)
102{
103 return (lhs = static_cast<Permissions>(static_cast<int32>(lhs) | static_cast<int32>(rhs)));
104}
105
106inline Permissions& operator&=(Permissions& lhs, Permissions rhs)
107{
108 return (lhs = static_cast<Permissions>(static_cast<int32>(lhs) & static_cast<int32>(rhs)));
109}
110
111constexpr Permissions operator~(Permissions arg)
112{
113 return static_cast<Permissions>(~static_cast<int32>(arg));
114}
115
117// global stream operators of enum Permissions for logging and parsing
118ARP_CXX_SYMBOL_EXPORT std::ostream& operator<<(std::ostream& os, Permissions value);
119ARP_CXX_SYMBOL_EXPORT std::istream& operator>>(std::istream& is, Permissions& value);
120
121}}}}} // end of namespace Arp::System::Commons::Services::Io
std::int32_t int32
The Arp integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:38
@ System
System components used by the System, Device, Plc or Io domains.
Permissions
Provides attributes for files and directories.
Definition: Permissions.hpp:19
@ OwnerRead
Execute/search permission, owner
@ OthersAll
Read, write, execute/search by others; others_read | others_write | others_exe
@ OwnerAll
Read, write, execute/search by owner; owner_read | owner_write | owner_exe
@ GroupAll
Read, write, execute/search by group; group_read | group_write | group_exe
@ AllAll
owner_all | group_all | others_all
@ GroupWrite
Execute/search permission, group
@ GroupExe
Execute/search permission, group
@ OthersExe
Execute/search permission, others
Root namespace for the PLCnext API