Piles
home
docs
piles
GitHub
DbStruct Pile
version 0.0.1
This pile contains classes that can be used to
Main Page
Related Pages
Classes
Files
File List
File Members
dbstruct-private.h
Go to the documentation of this file.
1
10
#ifndef GUARD_DBSTRUCT_PRIVATE_H_INCLUDE
11
#define GUARD_DBSTRUCT_PRIVATE_H_INCLUDE
12
13
#include <dbstruct/dbstruct-config.h>
14
15
#if 1
16
# define DBSTRUCT_DEBUGM printf
17
#else
18
# define DBSTRUCT_DEBUGM black_hole
19
#endif
20
21
#if 0
22
# define DBSTRUCT_TRACE_ENTRY printf("DBSTRUCT ENTRY %s in %s[%d]\n", __func__, __FILE__, __LINE__)
23
#else
24
# define DBSTRUCT_TRACE_ENTRY
25
#endif
26
27
#if 0
28
# define DBSTRUCT_TRACE_EXIT printf("DBSTRUCT EXIT %s in %s[%d]\n", __func__, __FILE__, __LINE__)
29
#else
30
# define DBSTRUCT_TRACE_EXIT
31
#endif
32
33
#ifdef _MSC_VER
34
# ifndef __func__
35
# define __func__ __FUNCTION__
36
# endif
37
#endif
38
39
#ifndef TMP_A
40
# define TMP_A(__s__) __s__.toLatin1 ().constData ()
41
#endif
42
43
#ifndef STRINGIFY
44
# define STRINGIFY(s) STRINGIFY_HELPER(s)
45
# define STRINGIFY_HELPER(s) #s
46
#endif
47
48
#ifndef DBG_ASSERT
49
#ifdef DBSTRUCT_DEBUG
50
# define DBG_ASSERT(a) if (!(a)) {\
51
printf("\nDBG_ASSERT Failed: " STRINGIFY(a) "\n"); \
52
printf("%s[%d]: %s\n\n",__FILE__, __LINE__, __func__); \
53
}
54
#else
55
# define DBG_ASSERT(a)
56
#endif
57
#endif
58
59
static
inline
void
black_hole (...)
60
{}
61
62
#endif // GUARD_DBSTRUCT_PRIVATE_H_INCLUDE