Blender
V2.93
source
blender
freestyle
intern
system
TimeStamp.h
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*/
16
17
#pragma once
18
24
#ifdef WITH_CXX_GUARDEDALLOC
25
# include "
MEM_guardedalloc.h
"
26
#endif
27
28
namespace
Freestyle
{
29
30
class
TimeStamp
{
31
public
:
32
static
inline
TimeStamp
*
instance
()
33
{
34
return
&_instance;
35
}
36
37
inline
unsigned
getTimeStamp
()
const
38
{
39
return
_time_stamp;
40
}
41
42
inline
void
increment
()
43
{
44
++_time_stamp;
45
}
46
47
inline
void
reset
()
48
{
49
_time_stamp = 1;
50
}
51
52
protected
:
53
TimeStamp
()
54
{
55
_time_stamp = 1;
56
}
57
58
TimeStamp
(
const
TimeStamp
&)
59
{
60
}
61
62
private
:
63
static
TimeStamp
_instance;
64
unsigned
_time_stamp;
65
66
#ifdef WITH_CXX_GUARDEDALLOC
67
MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:TimeStamp"
)
68
#endif
69
};
70
71
}
/* namespace Freestyle */
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
Freestyle::TimeStamp
Definition:
TimeStamp.h:30
Freestyle::TimeStamp::TimeStamp
TimeStamp(const TimeStamp &)
Definition:
TimeStamp.h:58
Freestyle::TimeStamp::reset
void reset()
Definition:
TimeStamp.h:47
Freestyle::TimeStamp::TimeStamp
TimeStamp()
Definition:
TimeStamp.h:53
Freestyle::TimeStamp::instance
static TimeStamp * instance()
Definition:
TimeStamp.h:32
Freestyle::TimeStamp::increment
void increment()
Definition:
TimeStamp.h:42
Freestyle::TimeStamp::getTimeStamp
unsigned getTimeStamp() const
Definition:
TimeStamp.h:37
Freestyle
inherits from class Rep
Definition:
AppCanvas.cpp:32
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1