OCILIB (C and C++ Driver for Oracle)  4.7.6
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
config.hpp
1 /*
2  * OCILIB - C Driver for Oracle (C Wrapper for Oracle OCI)
3  *
4  * Website: http://www.ocilib.net
5  *
6  * Copyright (c) 2007-2023 Vincent ROGIER <vince.rogier@ocilib.net>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #pragma once
22 
23 #include <string>
24 #include <vector>
25 
26 // ReSharper disable CppClangTidyCppcoreguidelinesMacroUsage
27 
28 /* Including C API declarations */
29 
30 extern "C" {
31 #include "ocilib.h"
32 }
33 
34 /* Try to guess C++ Compiler capabilities ... */
35 
36 #define OCILIBPP_CPP_98 199711L
37 #define OCILIBPP_CPP_11 201103L
38 #define OCILIBPP_CPP_14 201402L
39 
40 #if __cplusplus < OCILIBPP_CPP_11
41 
42  // GCC
43 #if defined(__GNUC__)
44 #if defined(__GXX_EXPERIMENTAL_CXX0X__)
45 #define OCILIBPP_HAS_CXX
46 #endif
47 // MSVC
48 #elif defined(_MSC_VER)
49 #if _MSVC_LANG >= OCILIBPP_CPP_11
50 #define OCILIBPP_HAS_CXX
51 #endif
52 #endif
53 
54 #else
55 
56 #define OCILIBPP_HAS_CXX
57 
58 #endif
59 
60 #ifdef OCILIBPP_HAS_CXX
61 
62 #define OCILIBPP_HAS_ENABLEIF
63 #define OCILIBPP_HAS_VARIADIC
64 
65 #ifdef OCILIBCPP_DEBUG_MEMORY
66 
67 #include <iostream>
68 #define OCILIBPP_DEBUG_MEMORY_ENABLED
69 
70 #endif
71 
72 #else
73 
74 #define OCILIBPP_DEFINE_CXX_KEYWORDS
75 
76 #endif
77 
78 #ifdef OCILIBPP_TEST_CPP98
79 
80 #ifdef OCILIBPP_DEFINE_CXX_KEYWORDS
81 #undef OCILIBPP_DEFINE_CXX_KEYWORDS
82 #endif
83 
84 #ifdef OCILIBPP_HAS_ENABLEIF
85 #undef OCILIBPP_HAS_ENABLEIF
86 #endif
87 
88 #ifdef OCILIBPP_HAS_VARIADIC
89 #undef OCILIBPP_HAS_VARIADIC
90 #endif
91 
92 #ifdef OCILIBPP_DEBUG_MEMORY_ENABLED
93 #undef OCILIBPP_DEBUG_MEMORY_ENABLED
94 #endif
95 
96 #endif
97 
98 #ifdef OCILIBPP_DEFINE_CXX_KEYWORDS
99 
100 #define nullptr 0
101 #define override
102 #define noexcept
103 
104 #endif
105 
106 namespace ocilib
107 {
108 
120 typedef std::basic_string<otext, std::char_traits<otext>, std::allocator<otext> > ostring;
121 
129 typedef void * AnyPointer;
130 
138 typedef std::vector<unsigned char> Raw;
139 
148 
157 
165 typedef const void * ThreadId;
166 
174 typedef void * CallbackPointer;
175 
176 /* class forward declarations */
177 
178 class Exception;
179 class Connection;
180 class Transaction;
181 class Environment;
182 class Statement;
183 class Resultset;
184 class Date;
185 class Timestamp;
186 class Interval;
187 class Number;
188 class TypeInfo;
189 class Reference;
190 class Object;
191 template<class>
192 class Element;
193 template<class>
194 class Iterator;
195 template<class>
196 class Collection;
197 template<class, int>
198 class Lob;
199 class File;
200 class Pool;
201 template<class, int>
202 class Long;
203 class Column;
204 class Subscription;
205 class Event;
206 class Agent;
207 class Message;
208 class Enqueue;
209 class Dequeue;
210 class Queue;
211 class QueueTable;
212 class DirectPath;
213 class Thread;
214 class ThreadKey;
215 class Mutex;
216 class BindInfo;
217 
218 
224 #define SILENT_CATCH(exp) try { exp; } catch (...) {}
225 
226 }
AQ identified agent for messages delivery.
Definition: types.hpp:7332
Provides SQL bind information.
Definition: types.hpp:5382
Object identifying the SQL data types VARRAY and NESTED TABLE.
Definition: types.hpp:5029
Encapsulate a Resultset column or object member properties.
Definition: types.hpp:6867
A connection or session with a specific database.
Definition: types.hpp:1580
Object identifying the SQL data type DATE.
Definition: types.hpp:2678
Dequeue object for dequeuing messages into an Oracle Queue.
Definition: types.hpp:7938
Oracle Direct path loading encapsulation.
Definition: types.hpp:8617
Enqueue object for queuing messages into an Oracle Queue.
Definition: types.hpp:7771
Static class in charge of library initialization / cleanup.
Definition: types.hpp:490
Subscription Event.
Definition: types.hpp:7205
Exception class handling all OCILIB errors.
Definition: types.hpp:358
Object identifying the SQL data type BFILE.
Definition: types.hpp:4342
Object identifying the SQL data type INTERVAL.
Definition: types.hpp:3114
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
Definition: types.hpp:4020
Object identifying the SQL data type LONG.
Definition: types.hpp:5298
AQ message.
Definition: types.hpp:7422
Static class allowing managing mutexes.
Definition: types.hpp:1244
Object identifying the SQL data type NUMBER.
Definition: types.hpp:2500
Object identifying the SQL data type OBJECT.
Definition: types.hpp:4668
A connection or session Pool.
Definition: types.hpp:1352
Class allowing the administration of Oracle Queues.
Definition: types.hpp:8288
Class allowing the administration of Oracle Queue tables.
Definition: types.hpp:8430
Object identifying the SQL data type REF.
Definition: types.hpp:4848
Database resultset.
Definition: types.hpp:6508
Object used for executing SQL or PL/SQL statement and returning the produced results.
Definition: types.hpp:5559
Subscription to database or objects changes.
Definition: types.hpp:7071
static class allowing to manipulate threads
Definition: types.hpp:1171
Static class allowing to set/get thread local storage (TLS) values for a given unique key.
Definition: types.hpp:1296
Object identifying the SQL data type TIMESTAMP.
Definition: types.hpp:3513
Oracle Transaction object.
Definition: types.hpp:2381
Provides type information on Oracle Database objects.
Definition: types.hpp:4531
struct OCI_Thread OCI_Thread
OCILIB encapsulation of OCI Threads.
Definition: types.h:410
struct OCI_Mutex OCI_Mutex
OCILIB encapsulation of OCI mutexes.
Definition: types.h:400
OCILIB ++ Namespace.
std::basic_string< otext, std::char_traits< otext >, std::allocator< otext > > ostring
string class wrapping the OCILIB otext * type and OTEXT() macros ( see Character sets )
Definition: config.hpp:120
const void * ThreadId
Thread Unique ID.
Definition: config.hpp:165
void * CallbackPointer
Alias used for storing user callback method pointers.
Definition: config.hpp:174
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
Definition: config.hpp:138
OCI_Mutex * MutexHandle
Alias for an OCI_Mutex pointer.
Definition: config.hpp:147
void * AnyPointer
Alias for the generic void pointer.
Definition: config.hpp:129
OCI_Thread * ThreadHandle
Alias for an OCI_Thread pointer.
Definition: config.hpp:156