Blender
V4.3
source
blender
freestyle
intern
system
BaseObject.h
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
13
#ifdef WITH_CXX_GUARDEDALLOC
14
# include "
MEM_guardedalloc.h
"
15
#endif
16
17
#include "
BLI_sys_types.h
"
18
19
namespace
Freestyle
{
20
21
class
BaseObject
{
22
public
:
23
inline
BaseObject
()
24
{
25
_ref_counter = 0;
26
}
27
28
virtual
~BaseObject
() {}
29
33
virtual
int
destroy
()
34
{
35
return
release
();
36
}
37
39
inline
int
addRef
()
40
{
41
return
++_ref_counter;
42
}
43
45
inline
int
release
()
46
{
47
if
(_ref_counter) {
48
_ref_counter--;
49
}
50
return
_ref_counter;
51
}
52
53
private
:
54
uint
_ref_counter;
55
56
#ifdef WITH_CXX_GUARDEDALLOC
57
MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:BaseObject"
)
58
#endif
59
};
60
61
}
/* namespace Freestyle */
BLI_sys_types.h
uint
unsigned int uint
Definition
BLI_sys_types.h:68
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
Freestyle::BaseObject
Definition
BaseObject.h:21
Freestyle::BaseObject::BaseObject
BaseObject()
Definition
BaseObject.h:23
Freestyle::BaseObject::destroy
virtual int destroy()
Definition
BaseObject.h:33
Freestyle::BaseObject::~BaseObject
virtual ~BaseObject()
Definition
BaseObject.h:28
Freestyle::BaseObject::addRef
int addRef()
Definition
BaseObject.h:39
Freestyle::BaseObject::release
int release()
Definition
BaseObject.h:45
Freestyle
inherits from class Rep
Definition
AppCanvas.cpp:20
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0