OpenVPN 3 Core Library
Loading...
Searching...
No Matches
usecount.hpp
Go to the documentation of this file.
1
// OpenVPN -- An application to securely tunnel IP networks
2
// over a single port, with support for SSL/TLS-based
3
// session authentication and key exchange,
4
// packet encryption, packet authentication, and
5
// packet compression.
6
//
7
// Copyright (C) 2012- OpenVPN Inc.
8
//
9
// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10
//
11
12
// General purpose class for scope accounting.
13
14
#pragma once
15
16
namespace
openvpn
{
17
18
class
UseCount
19
{
20
public
:
26
explicit
UseCount
(
int
&count)
27
:
count_
(count)
28
{
29
++
count_
;
30
}
31
32
/* make this class not copyable. */
33
UseCount
(
const
UseCount
&) =
delete
;
34
UseCount
&
operator=
(
UseCount
&) =
delete
;
35
36
~UseCount
()
37
{
38
--
count_
;
39
}
40
41
private
:
42
int
&
count_
;
43
};
44
45
}
// namespace openvpn
openvpn::UseCount
Definition
usecount.hpp:19
openvpn::UseCount::count_
int & count_
Definition
usecount.hpp:42
openvpn::UseCount::UseCount
UseCount(int &count)
Definition
usecount.hpp:26
openvpn::UseCount::UseCount
UseCount(const UseCount &)=delete
openvpn::UseCount::~UseCount
~UseCount()
Definition
usecount.hpp:36
openvpn::UseCount::operator=
UseCount & operator=(UseCount &)=delete
openvpn
Definition
ovpncli.cpp:97
openvpn
common
usecount.hpp
Generated by
1.9.8