Blender  V3.3
Exception.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
10 #ifdef WITH_CXX_GUARDEDALLOC
11 # include "MEM_guardedalloc.h"
12 #endif
13 
14 namespace Freestyle {
15 
16 class Exception {
17  public:
18  typedef enum {
22 
23  static int getException()
24  {
25  exception_type e = _exception;
26  _exception = NO_EXCEPTION;
27  return e;
28  }
29 
30  static int raiseException(exception_type exception = UNDEFINED)
31  {
32  _exception = exception;
33  return _exception;
34  }
35 
36  static void reset()
37  {
38  _exception = NO_EXCEPTION;
39  }
40 
41  private:
42  static exception_type _exception;
43 
44 #ifdef WITH_CXX_GUARDEDALLOC
45  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Exception")
46 #endif
47 };
48 
49 } /* namespace Freestyle */
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
static void reset()
Definition: Exception.h:36
static int getException()
Definition: Exception.h:23
static int raiseException(exception_type exception=UNDEFINED)
Definition: Exception.h:30
inherits from class Rep
Definition: AppCanvas.cpp:18