Blender V4.3
Modifiers.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#include "TimeStamp.h"
13
14#ifdef WITH_CXX_GUARDEDALLOC
15# include "MEM_guardedalloc.h"
16#endif
17
18namespace Freestyle {
19
20/* ----------------------------------------- *
21 * *
22 * modifiers *
23 * *
24 * ----------------------------------------- */
25
29template<class Edge> struct EdgeModifier : public unary_function<Edge, void> {
31 EdgeModifier() : unary_function<Edge, void>() {}
32
34 virtual void operator()(Edge &iEdge) {}
35
36#ifdef WITH_CXX_GUARDEDALLOC
37 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:EdgeModifier")
38#endif
39};
40
42template<class Edge> struct TimestampModifier : public EdgeModifier<Edge> {
45
47 virtual void operator()(Edge &iEdge)
48 {
49 TimeStamp *timestamp = TimeStamp::instance();
50 iEdge.setTimeStamp(timestamp->getTimeStamp());
51 }
52};
53
54} /* namespace Freestyle */
Read Guarded memory(de)allocation.
Class defining a singleton used as timestamp.
uint getTimeStamp() const
Definition TimeStamp.h:27
static TimeStamp * instance()
Definition TimeStamp.h:22
inherits from class Rep
Definition AppCanvas.cpp:20
virtual void operator()(Edge &iEdge)
Definition Modifiers.h:34
virtual void operator()(Edge &iEdge)
Definition Modifiers.h:47