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

error.h
1#ifndef CC_ERROR_H
2#define CC_ERROR_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/* FIXME: missing stuff from SoError: type-system. 20020526 mortene. */
28
29/* ********************************************************************** */
30
31#include <Inventor/C/base/string.h>
32#include <stdarg.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif /* __cplusplus */
37
38/* ********************************************************************** */
39
40typedef struct cc_error {
41 cc_string debugstring;
42} cc_error;
43
44typedef void cc_error_cb(const cc_error * err, void * data);
45
46/* ********************************************************************** */
47
48COIN_DLL_API void cc_error_init(cc_error * me);
49COIN_DLL_API void cc_error_clean(cc_error * me);
50COIN_DLL_API void cc_error_copy(const cc_error * src, cc_error * dst);
51
52 /* const SbString & getDebugString(void) const; */
53COIN_DLL_API const cc_string * cc_error_get_debug_string(const cc_error * me);
54
55/* static void setHandlerCallback(SoErrorCB * const func, void * const data); */
56
57COIN_DLL_API void cc_error_set_handler_callback(cc_error_cb * func, void * data);
58
59/* static SoErrorCB * getHandlerCallback(void); */
60
61COIN_DLL_API cc_error_cb * cc_error_get_handler_callback(void);
62
63/* static void * getHandlerData(void); */
64
65COIN_DLL_API void * cc_error_get_handler_data(void);
66
67/* static void post(const char * const format, ...); */
68COIN_DLL_API void cc_error_post(const char * format, ...);
69COIN_DLL_API void cc_error_post_arglist(const char * format, va_list args);
70
71 /* protected: */
72 /* void setDebugString(const char * const str); */
73
74COIN_DLL_API void cc_error_set_debug_string(cc_error * me, const char * str);
75
76 /* protected: */
77 /* void appendToDebugString(const char * const str); */
78
79COIN_DLL_API void cc_error_append_to_debug_string(cc_error * me, const char * str);
80
81 /* protected: */
82 /* void handleError(void); */
83
84COIN_DLL_API void cc_error_handle(cc_error * me);
85
86 /* protected: */
87 /* virtual SoErrorCB * getHandler(void * & data) const; */
88COIN_DLL_API cc_error_cb * cc_error_get_handler(void ** data);
89
90 /* protected: */
91 /* static void defaultHandlerCB(const SoError * error, void * userdata); */
92COIN_DLL_API void cc_error_default_handler_cb(const cc_error * err, void * data);
93
94/* ********************************************************************** */
95
96#ifdef __cplusplus
97} /* extern "C" */
98#endif /* __cplusplus */
99
100#endif /* !CC_ERROR_H */
The cc_string type is a C ADT for ASCII string management.
Definition string.h:41

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

Generated on Wed Jul 17 2024 for Coin by Doxygen 1.12.0.