Blender
V2.93
source
blender
freestyle
intern
system
Exception.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
Exception
{
31
public
:
32
typedef
enum
{
33
NO_EXCEPTION
,
34
UNDEFINED
,
35
}
exception_type
;
36
37
static
int
getException
()
38
{
39
exception_type
e
= _exception;
40
_exception =
NO_EXCEPTION
;
41
return
e
;
42
}
43
44
static
int
raiseException
(
exception_type
exception =
UNDEFINED
)
45
{
46
_exception = exception;
47
return
_exception;
48
}
49
50
static
void
reset
()
51
{
52
_exception =
NO_EXCEPTION
;
53
}
54
55
private
:
56
static
exception_type
_exception;
57
58
#ifdef WITH_CXX_GUARDEDALLOC
59
MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:Exception"
)
60
#endif
61
};
62
63
}
/* namespace Freestyle */
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
e
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
Definition:
bmesh_query_inline.h:48
Freestyle::Exception
Definition:
Exception.h:30
Freestyle::Exception::exception_type
exception_type
Definition:
Exception.h:32
Freestyle::Exception::NO_EXCEPTION
@ NO_EXCEPTION
Definition:
Exception.h:33
Freestyle::Exception::UNDEFINED
@ UNDEFINED
Definition:
Exception.h:34
Freestyle::Exception::reset
static void reset()
Definition:
Exception.h:50
Freestyle::Exception::getException
static int getException()
Definition:
Exception.h:37
Freestyle::Exception::raiseException
static int raiseException(exception_type exception=UNDEFINED)
Definition:
Exception.h:44
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