ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
CVShareable.h
Go to the documentation of this file.
1
// ----------------------------------------------------------------------------
2
// - CloudViewer: www.cloudViewer.org -
3
// ----------------------------------------------------------------------------
4
// Copyright (c) 2018-2024 www.cloudViewer.org
5
// SPDX-License-Identifier: MIT
6
// ----------------------------------------------------------------------------
7
8
#pragma once
9
10
// Local
11
#include "
CVCoreLib.h
"
12
13
// system
14
#include <cassert>
15
16
// Activate shared objects tracking (for debug purposes)
17
#ifdef CV_DEBUG
18
// #define CV_TRACK_ALIVE_SHARED_OBJECTS
19
#endif
20
21
// CCShareable object (with counter)
22
class
CV_CORE_LIB_API
CCShareable
{
23
public
:
25
CCShareable
();
26
28
30
virtual
void
link();
31
33
35
virtual
void
release();
36
38
40
inline
virtual
unsigned
getLinkCount
()
const
{
return
m_linkCount; }
41
42
#ifdef CV_TRACK_ALIVE_SHARED_OBJECTS
44
static
unsigned
GetAliveCount();
45
#endif
46
47
protected
:
49
51
virtual
~
CCShareable
();
52
54
unsigned
m_linkCount
;
55
};
CV_CORE_LIB_API
#define CV_CORE_LIB_API
Definition:
CVCoreLibWin.h:15
CVCoreLib.h
CCShareable
Definition:
CVShareable.h:22
CCShareable::getLinkCount
virtual unsigned getLinkCount() const
Returns the current link count.
Definition:
CVShareable.h:40
CCShareable::m_linkCount
unsigned m_linkCount
Links counter.
Definition:
CVShareable.h:54
core
include
CVShareable.h
Generated on Wed Jan 28 2026 09:00:53 for ACloudViewer by
1.9.1