AssertManager.h
1 //##################################################################################################
2 //
3 // Ceetron 3D Components
4 // Component: Core
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 //
14 // W A R N I N G
15 // -------------
16 //
17 // This file is not part of Ceetron 3D Components. It exists purely as an implementation detail.
18 // This header file may change from version to version without notice, or even be removed.
19 //
20 
21 #pragma once
22 
23 #ifdef WIN32
24 #if (_MSC_VER < 1910)
25 #pragma warning (disable: 4800)
26 #endif
27 #endif
28 
29 // Also brings in assert
30 
31 #include "CeeCore/Str.h"
32 #include "CeeCore/RefCountedObject.h"
33 #include <iostream>
34 #include <stdexcept>
35 
36 namespace cee
37 {
38 
39 class CEE_CORE_EXPORT AssertManager : public RefCountedObject
40 {
41 
42 public:
43 
44  static void setParamAssertThrowsException(bool throws);
45  static bool paramAssertThrowsException();
46  static void throwParamAssertException(void* pointer, const char* fileName, int lineNumber, const char* expression, const char* message);
47  static void handleParamAssert(const void* pointer, const char* fileName, int lineNumber, const char* expression, const char* message);
48  static void throwParamAssertException(bool test, const char* fileName, int lineNumber, const char* expression, const char* message);
49 
50 private:
51  AssertManager();
52  static bool setGetParamAssertThrowsException(bool throws, bool set);
53  friend class CoreComponent;
54 
55 };
56 }
57 
Static class for initialization of the Core component.
Definition: CoreComponent.h:31
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppLogging.cpp:20
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
Class for managing assert behavior.
Definition: AssertManager.h:39