Cantera  3.2.0a2
Loading...
Searching...
No Matches
include/cantera/clib/clib_defs.h
Go to the documentation of this file.
1/**
2 * @file clib_defs.h
3 *
4 * @deprecated Deprecated in %Cantera 3.2 and to be removed thereafter.
5 * The legacy CLib is superseded by the generated CLib.
6 */
7
8// This file is part of Cantera. See License.txt in the top-level directory or
9// at https://cantera.org/license.txt for license and copyright information.
10
11#ifndef CLIB_DEFS_H
12#define CLIB_DEFS_H // use same guards as clib_generated
13
14#include "cantera/base/config.h"
15#include <stdlib.h>
16
17// Legacy attribute applied to clib functions. Currently, used only to identify
18// functions that should be considered by the 'sourcegen' parser for inclusion in the
19// C# interface.
20#define CANTERA_CAPI
21
22// Values returned for error conditions
23#ifndef ERR
24# define ERR -999
25#endif
26
27#ifndef DERR
28# define DERR -999.999
29#endif
30
31// Used by external logger
32enum LogLevel { INFO, WARN , ERROR };
33
34//! Represents a callback that is invoked to produce log output.
35//! TODO: Only needed in the main CLib library. Should be moved once the
36//! legacy CLib is removed.
37typedef void
38 (*LogCallback)(enum LogLevel logLevel, const char* category, const char* message);
39
40#endif
void(* LogCallback)(enum LogLevel logLevel, const char *category, const char *message)
Represents a callback that is invoked to produce log output.