AnyCAD C++ API  2018
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
APIDebug.h
浏览该文件的文档.
1 #pragma once
2 
3 namespace AnyCAD{ namespace API{
4 
5 
7  {
8  public:
9  static bool Assert(bool condition, const String& messge, const char* lpszFileName, int nLine);
10  private:
11  };
12 
13 #define _any_assert_ex(condition, message, lpszFileName, nLine)\
14  AnyCAD::API::Debugger::Assert(condition, message, lpszFileName, nLine)
15 
16 
18  // validate if expression is true
19 #define AnyAssert(condition, message) \
20  _any_assert_ex(!!(condition), message, __FILE__, __LINE__);
21 
22  // validate if expression is true
23 #define AnyAssertReturn(condition, message, returnValue) \
24  if(!_any_assert_ex(!!(condition), message, __FILE__, __LINE__))\
25  {\
26  return returnValue;\
27 }
28 
29  // validate if expression is true
30 #define AnyAssertReturnVoid(condition, message) \
31  if(!_any_assert_ex(!!(condition), message, __FILE__, __LINE__))\
32  {\
33  return;\
34 }
35 
36  // validate if expression is true
37 #define AnyAssertContinue(condition, message) \
38  if(!_any_assert_ex(!!(condition), message, __FILE__, __LINE__))\
39  {\
40  continue;\
41 }
42 }}
#define AnyPlatformAPI_API
Definition: AnyPlatformAPI.h:8
Definition: APIDebug.h:6
std::string String
Definition: APIString.h:10