Kross

krossconfig.h
1 /***************************************************************************
2  * krossconfig.h
3  * This file is part of the KDE project
4  * copyright (C)2004-2006 by Sebastian Sauer ([email protected])
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  * You should have received a copy of the GNU Library General Public License
15  * along with this program; see the file COPYING. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  ***************************************************************************/
19 
20 #ifndef KROSS_MAIN_KROSSCONFIG_H
21 #define KROSS_MAIN_KROSSCONFIG_H
22 
23 #include <kross/core/krosscore_export.h>
24 
25 #include <QString>
26 #include <QMetaType>
27 
28 namespace Kross
29 {
30 
31 // Debugging enabled. Comment the line out to disable all kind of debugging.
32 #define KROSS_DEBUG_ENABLED
33 
34 #ifdef KROSS_DEBUG_ENABLED
35 
36 /**
37  * Debugging function.
38  */
39 KROSSCORE_EXPORT void krossdebug(const QString &s);
40 
41 /**
42  * Warning function.
43  */
44 KROSSCORE_EXPORT void krosswarning(const QString &s);
45 
46 #else
47 // Define these to an empty statement if debugging is disabled.
48 #define krossdebug(x)
49 #define krosswarning(x)
50 #endif
51 
52 // Some more debug switches.
53 //#define KROSS_OBJECT_METACALL_DEBUG
54 //#define KROSS_METATYPE_DEBUG
55 //#define KROSS_INTERPRETER_DEBUG
56 //#define KROSS_ACTION_DEBUG
57 //#define KROSS_ACTIONCOLLECTION_DEBUG
58 
59 // The version number of Kross. For example the interpreters use
60 // it do be sure there are linked against the correct core version
61 // and if the numbers don't match, the interpreter is not loaded.
62 #define KROSS_VERSION 12
63 
64 // The export macro for interpreter plugins.
65 #define KROSS_EXPORT_INTERPRETER( InterpreterImpl ) \
66  extern "C" { \
67  Q_DECL_EXPORT void* krossinterpreter(int version, Kross::InterpreterInfo* info) { \
68  if(version != KROSS_VERSION) { \
69  Kross::krosswarning(QString("Interpreter skipped cause provided version %1 does not match expected version %2.").arg(version).arg(KROSS_VERSION)); \
70  return nullptr; \
71  } \
72  return new InterpreterImpl(info); \
73  } \
74  }
75 
76 // The name of the interpreter's library. Those library got loaded
77 // dynamically during runtime. Comment out to disable compiling of
78 // the interpreter-plugin or to hardcode the location of the lib
79 // like I did at the following line.
80 //#define KROSS_PYTHON_LIBRARY "/home/kde4/koffice/_build/lib/krosspython.la"
81 #define KROSS_PYTHON_LIBRARY "krosspython"
82 #define KROSS_RUBY_LIBRARY "krossruby"
83 #define KROSS_JAVA_LIBRARY "libkrossjava"
84 #define KROSS_FALCON_LIBRARY "krossfalcon"
85 #define KROSS_QTSCRIPT_LIBRARY "krossqts"
86 #define KROSS_LUA_LIBRARY "kloss"
87 
88 }
89 
90 #endif
91 
Definition: action.cpp:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Oct 21 2021 23:01:08 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.