Qore Programming Language  0.8.11.1
Qore.h
Go to the documentation of this file.
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3  Qore.h
4 
5  Qore Programming Language
6 
7  Copyright (C) 2003 - 2014 David Nichols
8 
9  Permission is hereby granted, free of charge, to any person obtaining a
10  copy of this software and associated documentation files (the "Software"),
11  to deal in the Software without restriction, including without limitation
12  the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  and/or sell copies of the Software, and to permit persons to whom the
14  Software is furnished to do so, subject to the following conditions:
15 
16  The above copyright notice and this permission notice shall be included in
17  all copies or substantial portions of the Software.
18 
19  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25  DEALINGS IN THE SOFTWARE.
26 
27  Note that the Qore library is released under a choice of three open-source
28  licenses: MIT (as above), LGPL 2+, or GPL 2+; see README-LICENSE for more
29  information.
30 */
31 
32 #ifndef _QORE_QORE_H
33 
34 #define _QORE_QORE_H
35 
40 // include configuration first if compiling the library
41 #ifdef _QORE_LIB_INTERN
42 #include <qore/intern/config.h>
43 #endif
44 
45 #include <qore/common.h>
46 #include <qore/QoreCounter.h>
47 
49 DLLEXPORT extern QoreCounter thread_counter;
50 
51 #include <qore/QoreEncoding.h>
52 #include <qore/ReferenceHolder.h>
53 #include <qore/AbstractQoreNode.h>
54 #include <qore/QoreNodeEvalOptionalRefHolder.h>
55 #include <qore/QoreListNode.h>
56 #include <qore/QoreHashNode.h>
57 #include <qore/AbstractPrivateData.h>
58 #include <qore/QoreIteratorBase.h>
59 #include <qore/QoreObject.h>
60 #include <qore/QoreProgram.h>
61 #include <qore/ModuleManager.h>
62 #include <qore/QoreLib.h>
63 #include <qore/QoreStringNode.h>
64 #include <qore/DateTimeNode.h>
65 #include <qore/QoreBigIntNode.h>
66 #include <qore/QoreBoolNode.h>
67 #include <qore/QoreFloatNode.h>
68 #include <qore/QoreNumberNode.h>
69 #include <qore/QoreNothingNode.h>
70 #include <qore/QoreNullNode.h>
71 #include <qore/QoreNet.h>
72 #include <qore/QoreURL.h>
73 #include <qore/QoreFile.h>
74 #include <qore/QoreQueueHelper.h>
75 #include <qore/QoreRWLock.h>
76 #include <qore/QoreNamespace.h>
77 #include <qore/ExceptionSink.h>
78 #include <qore/BinaryNode.h>
79 #include <qore/QoreString.h>
80 #include <qore/DateTime.h>
81 #include <qore/QoreType.h>
83 #include <qore/qore_thread.h>
84 #include <qore/QoreThreadLock.h>
85 #include <qore/QoreThreadLocalStorage.h>
86 #include <qore/QoreCondition.h>
87 #include <qore/QoreQueue.h>
88 #include <qore/DBI.h>
89 #include <qore/Datasource.h>
90 #include <qore/SQLStatement.h>
91 #include <qore/QoreClass.h>
92 #include <qore/ScopeGuard.h>
93 #include <qore/SystemEnvironment.h>
94 #include <qore/AutoVLock.h>
95 #include <qore/CallReferenceNode.h>
96 #include <qore/ReferenceNode.h>
97 #include <qore/params.h>
98 #include <qore/QoreTypeSafeReferenceHelper.h>
99 #include <qore/QoreEvents.h>
100 #include <qore/qore-version.h>
101 
103 DLLEXPORT extern const char* qore_version_string;
104 
106 DLLEXPORT extern int qore_version_major;
107 
109 DLLEXPORT extern int qore_version_minor;
110 
112 DLLEXPORT extern int qore_version_sub;
113 
115 DLLEXPORT extern int qore_build_number;
116 
118 DLLEXPORT extern int qore_target_bits;
119 
121 DLLEXPORT extern const char* qore_target_os;
122 
124 DLLEXPORT extern const char* qore_target_arch;
125 
127 DLLEXPORT extern const char* qore_module_dir;
128 
130 DLLEXPORT extern const char* qore_user_module_dir;
131 
133 DLLEXPORT extern const char* qore_module_ver_dir;
134 
136 DLLEXPORT extern const char* qore_user_module_ver_dir;
137 
139 DLLEXPORT extern const char* qore_cplusplus_compiler;
140 
142 DLLEXPORT extern const char* qore_cflags;
143 
145 DLLEXPORT extern const char* qore_ldflags;
146 
148 DLLEXPORT extern const char* qore_build_host;
149 
151 
153 DLLEXPORT extern const char* qore_mpfr_info;
154 
156 DLLEXPORT bool qore_has_debug();
157 
159 DLLEXPORT extern int qore_min_mod_api_major;
160 
162 DLLEXPORT extern int qore_min_mod_api_minor;
163 
165 DLLEXPORT extern const QoreStringMaker mpfrInfo;
166 
167 #define QLO_NONE 0
168 #define QLO_DISABLE_SIGNAL_HANDLING (1 << 0)
169 #define QLO_DISABLE_OPENSSL_INIT (1 << 1)
170 #define QLO_DISABLE_OPENSSL_CLEANUP (1 << 2)
171 
172 #define QLO_DISABLE_OPENSSL_INIT_CLEANUP (QLO_DISABLE_OPENSSL_INIT|QLO_DISABLE_OPENSSL_CLEANUP)
174 
176 #define QLO_CLEANUP_MASK (QLO_DISABLE_OPENSSL_CLEANUP)
177 
179 
188 DLLEXPORT void qore_init(qore_license_t license = QL_GPL, const char* default_encoding = 0, bool show_module_errors = false, int init_options = QLO_NONE);
189 
191 
195 DLLEXPORT void qore_cleanup();
196 
198 
202 DLLEXPORT int qore_get_library_init_options();
203 
205 DLLEXPORT int qore_set_library_cleanup_options(int options);
206 
208 DLLEXPORT bool qore_check_option(int opt);
209 
210 #include <qore/support.h>
211 
212 // include private definitions if compiling the library
213 #ifdef _QORE_LIB_INTERN
214 #include <qore/intern/QoreLibIntern.h>
215 #endif
216 
217 #endif // _QORE_QORE_H
DLLEXPORT int qore_build_number
the build number of the qore library
DLLEXPORT int qore_target_bits
the build target machine word size in bits (32 or 64 normally)
DLLEXPORT void qore_init(qore_license_t license=QL_GPL, const char *default_encoding=0, bool show_module_errors=false, int init_options=QLO_NONE)
initializes the Qore library
a simple thread-safe counter object; objects can block on it until the counter reaches zero ...
Definition: QoreCounter.h:40
DLLEXPORT int qore_set_library_cleanup_options(int options)
the given options will be combined with binary or to the library init options; only options that affe...
DLLEXPORT QoreCounter thread_counter
global background thread counter (for threads started explicitly by Qore)
DLLEXPORT bool qore_check_option(int opt)
returns true if all the bits set in the argument are also set in the qore library init option variabl...
DLLEXPORT const char * qore_module_ver_dir
the qore version-specific module directory
DLLEXPORT const char * qore_target_arch
the build target machine architecture name
DLLEXPORT const char * qore_target_os
the build target Operating System name
DLLEXPORT const char * qore_ldflags
the linker flags used to link qore
DLLEXPORT bool qore_has_debug()
if the qore library includes debugging or not
DLLEXPORT const char * qore_cplusplus_compiler
the c++ compiler used to build qore
describes Qore's DBI interface for writing database drivers
DLLEXPORT const char * qore_version_string
the complete version string of the qore library
DLLEXPORT int qore_version_major
the major version number of the qore library
qore_license_t
qore library and module license type identifiers
Definition: common.h:82
DLLEXPORT int qore_version_minor
the minor version number of the qore library
DLLEXPORT const QoreStringMaker mpfrInfo
a string giving information about the MPFR library used by the qore library
DLLEXPORT const char * qore_module_dir
the qore module directory
DLLEXPORT const char * qore_mpfr_info
information about the MPFR library used by the qore library
DLLEXPORT const char * qore_user_module_dir
the qore user module directory
code to be used under the GPL license
Definition: common.h:83
DLLEXPORT int qore_get_library_init_options()
returns the current library options
DLLEXPORT int qore_min_mod_api_major
the recommended minimum module api major number to use
DLLEXPORT void qore_cleanup()
frees all memory allocated by the library
DLLEXPORT int qore_min_mod_api_minor
the recommended minimum module api minor number to use
DLLEXPORT const char * qore_user_module_ver_dir
the qore version-specific user module directory
DLLEXPORT const char * qore_cflags
the compiler flags used to build qore
#define QLO_NONE
no options (default)
Definition: Qore.h:167
DLLEXPORT int qore_version_sub
the version number below the minor version number of the qore library
DLLEXPORT const char * qore_build_host
information about the build host