Blender  V3.3
Modifiers.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
10 #include "TimeStamp.h"
11 
12 #ifdef WITH_CXX_GUARDEDALLOC
13 # include "MEM_guardedalloc.h"
14 #endif
15 
16 namespace Freestyle {
17 
18 /* ----------------------------------------- *
19  * *
20  * modifiers *
21  * *
22  * ----------------------------------------- */
23 
27 template<class Edge> struct EdgeModifier : public unary_function<Edge, void> {
29  EdgeModifier() : unary_function<Edge, void>()
30  {
31  }
32 
34  virtual void operator()(Edge &iEdge)
35  {
36  }
37 
38 #ifdef WITH_CXX_GUARDEDALLOC
39  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:EdgeModifier")
40 #endif
41 };
42 
44 template<class Edge> struct TimestampModifier : public EdgeModifier<Edge> {
47  {
48  }
49 
51  virtual void operator()(Edge &iEdge)
52  {
53  TimeStamp *timestamp = TimeStamp::instance();
54  iEdge.setTimeStamp(timestamp->getTimeStamp());
55  }
56 };
57 
58 } /* namespace Freestyle */
Read Guarded memory(de)allocation.
Class defining a singleton used as timestamp.
static TimeStamp * instance()
Definition: TimeStamp.h:18
unsigned getTimeStamp() const
Definition: TimeStamp.h:23
SyclQueue void void size_t num_bytes void
inherits from class Rep
Definition: AppCanvas.cpp:18
virtual void operator()(Edge &iEdge)
Definition: Modifiers.h:34
virtual void operator()(Edge &iEdge)
Definition: Modifiers.h:51