NIM 跨平台 C++ SDK
Toggle main menu visibility
首页
相关页面
命名空间
命名空间列表
命名空间成员
全部
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
函数
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
变量
_
a
c
d
g
h
i
k
l
m
n
p
s
t
v
类型定义
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
枚举
a
c
e
m
n
o
p
s
t
u
v
枚举值
a
b
c
d
i
k
n
o
r
s
u
v
类
类列表
类索引
类继承关系
类成员
全部
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
函数
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
变量
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
类型定义
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
枚举
枚举值
a
d
k
m
n
t
相关函数
_
a
b
c
m
o
p
r
s
u
v
文件
文件列表
文件成员
全部
_
a
b
c
d
e
f
h
i
j
k
l
n
o
p
q
s
t
u
w
函数
c
i
n
p
变量
f
h
i
k
o
s
t
w
类型定义
b
h
j
n
q
u
枚举
b
c
l
n
枚举值
a
b
c
k
l
n
s
t
宏定义
_
a
d
e
f
i
j
n
p
t
u
•
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
页
载入中...
搜索中...
未找到
assertions.h
浏览该文件的文档.
1
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
2
// Distributed under MIT license, or public domain if desired and
3
// recognized in your jurisdiction.
4
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5
6
#ifndef NIM_CPP_WRAPPER_UTIL_JSON_ASSERTIONS_H_INCLUDED
7
#define NIM_CPP_WRAPPER_UTIL_JSON_ASSERTIONS_H_INCLUDED
8
9
#include <cstdlib>
10
#include <sstream>
11
12
#if !defined(JSON_IS_AMALGAMATION)
13
#include "
config.h
"
14
#endif
// if !defined(JSON_IS_AMALGAMATION)
15
20
#if JSON_USE_EXCEPTION
21
22
// @todo <= add detail about condition in exception
23
#define JSON_ASSERT(condition) \
24
do { \
25
if (!(condition)) { \
26
nim_cpp_wrapper_util::Json::throwLogicError("assert json failed"
); \
27
} \
28
} while (0)
29
30
#define JSON_FAIL_MESSAGE(message) \
31
do { \
32
OStringStream oss; \
33
oss << message; \
34
nim_cpp_wrapper_util::Json::throwLogicError(oss.str()); \
35
abort(); \
36
} while (0)
37
38
#else
// JSON_USE_EXCEPTION
39
40
#define JSON_ASSERT(condition) assert(condition)
41
42
// The call to assert() will show the failure message in debug builds. In
43
// release builds we abort, for a core-dump or debugger.
44
#define JSON_FAIL_MESSAGE(message) \
45
{ \
46
OStringStream oss; \
47
oss << message; \
48
assert(false && oss.str().c_str()); \
49
abort(); \
50
}
51
52
#endif
53
54
#define JSON_ASSERT_MESSAGE(condition, message) \
55
do { \
56
if (!(condition)) { \
57
JSON_FAIL_MESSAGE(message); \
58
} \
59
} while (0)
60
61
#endif
// JSON_ASSERTIONS_H_INCLUDED
config.h
wrapper
nim_wrapper_util
json
assertions.h
制作者
1.9.6