Coin Logo http://www.sim.no/
http://www.coin3d.org/

debugerror.h
1 #ifndef CC_DEBUGERROR_H
2 #define CC_DEBUGERROR_H
3 
4 /**************************************************************************\
5  *
6  * This file is part of the Coin 3D visualization library.
7  * Copyright (C) by Kongsberg Oil & Gas Technologies.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * ("GPL") version 2 as published by the Free Software Foundation.
12  * See the file LICENSE.GPL at the root directory of this source
13  * distribution for additional information about the GNU GPL.
14  *
15  * For using Coin with software that can not be combined with the GNU
16  * GPL, and for taking advantage of the additional benefits of our
17  * support services, please contact Kongsberg Oil & Gas Technologies
18  * about acquiring a Coin Professional Edition License.
19  *
20  * See http://www.coin3d.org/ for more information.
21  *
22  * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23  * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24  *
25 \**************************************************************************/
26 
27 #include <Inventor/C/basic.h>
28 #include <Inventor/C/errors/error.h>
29 
30 #include <stdarg.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35 
36 /* ********************************************************************** */
37 
38 typedef enum CC_DEBUGERROR_SEVERITY {
39  CC_DEBUGERROR_ERROR,
40  CC_DEBUGERROR_WARNING,
41  CC_DEBUGERROR_INFO
42 } CC_DEBUGERROR_SEVERITY;
43 
44 typedef struct cc_debugerror {
45  cc_error super; /* make struct is-A cc_error */
46 
47  CC_DEBUGERROR_SEVERITY severity;
48 } cc_debugerror;
49 
50 typedef void cc_debugerror_cb(const cc_debugerror * err, void * data);
51 
52 /* ********************************************************************** */
53 
54 /* FIXME: missing stuff from SoDebugError: type-system,
55  COIN_DEBUG_BREAK handling, ... 20020524 mortene. */
56 
57 /* ********************************************************************** */
58 
59 COIN_DLL_API void cc_debugerror_post(const char * source, const char * format, ...);
60 COIN_DLL_API void cc_debugerror_postwarning(const char * source, const char * format, ...);
61 COIN_DLL_API void cc_debugerror_postinfo(const char * source, const char * format, ...);
62 
63 
64 COIN_DLL_API void cc_debugerror_init(cc_debugerror * me);
65 COIN_DLL_API void cc_debugerror_clean(cc_debugerror * me);
66 
67 COIN_DLL_API CC_DEBUGERROR_SEVERITY cc_debugerror_get_severity(const cc_debugerror * me);
68 
69 COIN_DLL_API void cc_debugerror_set_handler_callback(cc_debugerror_cb * function, void * data);
70 COIN_DLL_API cc_debugerror_cb * cc_debugerror_get_handler_callback(void);
71 COIN_DLL_API void * cc_debugerror_get_handler_data(void);
72 
73 COIN_DLL_API cc_debugerror_cb * cc_debugerror_get_handler(void ** data);
74 
75 /* ********************************************************************** */
76 
77 #ifdef __cplusplus
78 } /* extern "C" */
79 #endif /* __cplusplus */
80 
81 #endif /* ! CC_DEBUGERROR_H */

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Fri Sep 9 2016 for Coin by Doxygen 1.8.5.