Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
pseudo_retainable.h
Go to the documentation of this file.
1
// Copyright 2018 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#
ifndef
TESTING_PSEUDO_RETAINABLE_H_
6
#
define
TESTING_PSEUDO_RETAINABLE_H_
7
8
class
PseudoRetainable
{
9
public
:
10
PseudoRetainable
() =
default
;
11
void
Retain
()
const
{ ++retain_count_; }
12
void
Release
()
const
{
13
if
(++release_count_ == retain_count_)
14
alive_ =
false
;
15
}
16
bool
alive
()
const
{
return
alive_; }
17
int
retain_count
()
const
{
return
retain_count_; }
18
int
release_count
()
const
{
return
release_count_; }
19
20
private
:
21
mutable
bool
alive_ =
true
;
22
mutable
int
retain_count_ = 0;
23
mutable
int
release_count_ = 0;
24
};
25
26
#
endif
// TESTING_PSEUDO_RETAINABLE_H_
PseudoRetainable
Definition
pseudo_retainable.h:8
PseudoRetainable::Release
void Release() const
Definition
pseudo_retainable.h:12
PseudoRetainable::alive
bool alive() const
Definition
pseudo_retainable.h:16
PseudoRetainable::release_count
int release_count() const
Definition
pseudo_retainable.h:18
PseudoRetainable::Retain
void Retain() const
Definition
pseudo_retainable.h:11
PseudoRetainable::PseudoRetainable
PseudoRetainable()=default
PseudoRetainable::retain_count
int retain_count() const
Definition
pseudo_retainable.h:17
TEST
TEST(FXCRYPT, CryptToBase16)
Definition
fx_crypt_unittest.cpp:34
qtwebengine
src
3rdparty
chromium
third_party
pdfium
testing
pseudo_retainable.h
Generated on Thu Nov 14 2024 00:58:10 for Qt by
1.12.0