PLCnext API Documentation
25.0.2.69
Arp
Base
Core
RaiiGuard.hpp
1
2
//
3
// Copyright Phoenix Contact GmbH & Co. KG
4
//
6
#pragma once
7
#include "
Arp/Base/Core/Arp.hpp
"
8
#include "Arp/Base/Core/delegate.hxx"
9
10
namespace
Arp
{
namespace
Base {
namespace
Core
11
{
12
17
class
ARP_EXPORT
RaiiGuard
18
{
19
public
:
// usings
20
using
Operation
=
delegate
<void(
void
)>;
21
22
public
:
// construction/destruction/assignment
23
explicit
RaiiGuard
(
Operation
destructing);
24
RaiiGuard
(
Operation
constructing,
Operation
destructing);
25
RaiiGuard
(
const
RaiiGuard
& arg) =
delete
;
26
RaiiGuard
(
RaiiGuard
&& arg)
noexcept
=
delete
;
27
RaiiGuard
& operator=(
const
RaiiGuard
& arg) =
delete
;
28
RaiiGuard
& operator=(
RaiiGuard
&& arg)
noexcept
=
delete
;
29
~RaiiGuard
(
void
);
30
31
private
:
// fields
32
Operation
constructing;
33
Operation
destructing;
34
};
35
36
}}}
// end of namespace Arp::Base::Core
37
38
namespace
Arp
{
40
using
Arp::Base::Core::RaiiGuard
;
41
}
Arp.hpp
Arp::Base::Core::RaiiGuard
This class is a utility class which provides a generic guard to implement the RAII idiom.
Definition:
RaiiGuard.hpp:18
Arp::Base::Core::delegate< void(void)>
Arp
Root namespace for the PLCnext API
Generated on Mon May 12 2025 14:03:44 for PLCnext API Documentation by
1.9.4