mksqlite  2.5
A MATLAB interface to SQLite
Macros | Typedefs | Functions | Variables
global.hpp File Reference

Global definitions. More...

#include <yvals.h>
#include "mex.h"
#include <windows.h>
#include "config.h"
#include <cstddef>
#include <cmath>
#include <cassert>
#include <climits>
#include <cstdint>
#include "heap_check.hpp"
+ Include dependency graph for global.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _GLOBAL_H
 
#define STRICT
 
#define NOMINMAX
 
#define MEM_ALLOC(count, bytes)   ( (void*)new char[(count) * (bytes)] )
 standard memory allocator
 
#define MEM_FREE(ptr)   ( delete[] ptr )
 standard memory free function
 
#define MEM_REALLOC(ptr, size)   HC_ASSERT_ERROR
 standard memory deallocator
 
#define MAT_ARRAY_TYPE   mxArray
 standard type for internally handled MATLAB array types (not used yet)
 
#define MAT_ALLOC(m, n, typeID)   mxCreateNumericMatrix( m, n, typeID, mxREAL )
 standard allocator for MAT_ARRAY_TYPE (not used yet)
 
#define MAT_FREE(ptr)   mxDestroyArray( ptr )
 standard deallocator for MAT_ARRAY_TYPE (not used yet) More...
 
#define MEM_ALLOC(n, s)   (HeapCheck.New( (n) * (s), __FILE__, __FUNCTION__, /*notes*/ "", __LINE__ ))
 standard memory allocator
 
#define MEM_REALLOC(p, s)   (HeapCheck.Realloc( (void*)(p), (s), __FILE__, __FUNCTION__, /*notes*/ "", __LINE__ ))
 standard memory deallocator
 
#define MEM_FREE(p)   (HeapCheck.Free( (void*)(p) ))
 standard memory free function
 
#define WALKHEAP   (HeapCheck.Walk())
 
#define FREEHEAP   (HeapCheck.Release())
 
#define PRINTF   mexPrintf
 Global text output function.
 
IEEE representation functions
#define DBL_ISFINITE   mxIsFinite
 
#define DBL_ISINF   mxIsInf
 
#define DBL_ISNAN   mxIsNaN
 
#define DBL_INF   mxGetInf()
 
#define DBL_NAN   mxGetNaN()
 
#define DBL_EPS   mxGetEps()
 
Versionstrings

mksqlite version string is defined in config.h (CONFIG_MKSQLITE_VERSION_STRING)

#define SQLITE_VERSION_STRING   SQLITE_VERSION
 
#define DEELX_VERSION_STRING   "1.3"
 

Typedefs

typedef unsigned char byte
 byte type
 

Functions

mxArray * mxSerialize (const mxArray *)
 Serialize a MATLAB array.
 
mxArray * mxDeserialize (const void *, size_t)
 Deserialize a MATLAB array.
 
mxArray * mxCreateSharedDataCopy (const mxArray *pr)
 Create a "shadowed" MATLAB array.
 

Variables

int g_convertUTF8 = CONFIG_CONVERT_UTF8
 Flag: String representation (utf8 or ansi)
 
const double g_NaN = DBL_NAN
 global NaN representation
 
int g_namelengthmax = 63
 MATALAB specific globals. More...
 
int g_NULLasNaN = CONFIG_NULL_AS_NAN
 Flag: return NULL as NaN.
 
int g_check4uniquefields = CONFIG_CHECK_4_UNIQUE_FIELDS
 Flag: Check for unique fieldnames.
 
int g_streaming = CONFIG_STREAMING
 Flag: Allow streaming.
 
int g_result_type = CONFIG_RESULT_TYPE
 Data organisation of returning query results.
 
int g_param_wrapping = CONFIG_PARAM_WRAPPING
 Wrap parameters.
 
Compression settings for typed BLOBs
int g_compression_level = CONFIG_COMPRESSION_LEVEL
 
const char * g_compression_type = CONFIG_COMPRESSION_TYPE
 
int g_compression_check = CONFIG_COMPRESSION_CHECK
 

Detailed Description

Global definitions.

Authors
Martin Kortmann mail@.nosp@m.kort.nosp@m.mann..nosp@m.de, Andreas Martin andim.nosp@m.arti.nosp@m.n@use.nosp@m.rs.s.nosp@m.ource.nosp@m.forg.nosp@m.e.net
Version
2.5
Date
2008-2017
Precondition
Warning
Bug:

Definition in file global.hpp.

Macro Definition Documentation

◆ _GLOBAL_H

#define _GLOBAL_H

include guard (redundant)

Definition at line 20 of file global.hpp.

◆ FREEHEAP

#define FREEHEAP   (HeapCheck.Release())

When heap checking is on (CONFIG_USE_HEAP_CHECK), frees heap space where allocation was monitored.

Definition at line 160 of file global.hpp.

◆ MAT_FREE

#define MAT_FREE (   ptr)    mxDestroyArray( ptr )

standard deallocator for MAT_ARRAY_TYPE (not used yet)

Use utils_free_ptr() instead of MEM_FREE, when a NULL check must be performed on ptr and &ptr must be set to NULL after freeing.

Definition at line 132 of file global.hpp.

◆ WALKHEAP

#define WALKHEAP   (HeapCheck.Walk())

When heap checking is on (CONFIG_USE_HEAP_CHECK), reports the monitored heap allocation state (MATLAB command window).

Definition at line 159 of file global.hpp.

Variable Documentation

◆ g_namelengthmax

int g_namelengthmax = 63

MATALAB specific globals.

Max. length for fieldnames in MATLAB

Definition at line 260 of file global.hpp.

Referenced by SQLiface::getColNames().