Blender
V5.0
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
12
13
#include "
MEM_guardedalloc.h
"
14
15
#include "
BLI_sys_types.h
"
16
17
namespace
Freestyle
{
18
19
class
BaseObject
{
20
public
:
21
inline
BaseObject
()
22
{
23
_ref_counter = 0;
24
}
25
26
virtual
~BaseObject
() {}
27
31
virtual
int
destroy
()
32
{
33
return
release
();
34
}
35
37
inline
int
addRef
()
38
{
39
return
++_ref_counter;
40
}
41
43
inline
int
release
()
44
{
45
if
(_ref_counter) {
46
_ref_counter--;
47
}
48
return
_ref_counter;
49
}
50
51
private
:
52
uint
_ref_counter;
53
54
MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:BaseObject"
)
55
};
56
57
}
/* namespace Freestyle */
BLI_sys_types.h
uint
unsigned int uint
Definition
BLI_sys_types.h:64
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
Freestyle::BaseObject::BaseObject
BaseObject()
Definition
BaseObject.h:21
Freestyle::BaseObject::destroy
virtual int destroy()
Definition
BaseObject.h:31
Freestyle::BaseObject::~BaseObject
virtual ~BaseObject()
Definition
BaseObject.h:26
Freestyle::BaseObject::addRef
int addRef()
Definition
BaseObject.h:37
Freestyle::BaseObject::release
int release()
Definition
BaseObject.h:43
Freestyle
inherits from class Rep
Definition
AppCanvas.cpp:20
Generated on
for Blender by
doxygen
1.16.1