hikyuu 2.1.0__cp312-none-win_amd64.whl → 2.1.2__cp312-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. hikyuu/cpp/boost_date_time-mt.dll +0 -0
  2. hikyuu/cpp/boost_serialization-mt.dll +0 -0
  3. hikyuu/cpp/boost_wserialization-mt.dll +0 -0
  4. hikyuu/cpp/core312.pyd +0 -0
  5. hikyuu/cpp/hikyuu.dll +0 -0
  6. hikyuu/cpp/sqlite3.dll +0 -0
  7. hikyuu/examples/notebook/006-TradeManager.ipynb +41 -39
  8. hikyuu/examples/notebook/008-Pickle.ipynb +27 -35
  9. hikyuu/extend.py +3 -1
  10. hikyuu/fetcher/stock/zh_stock_a_qmt.py +49 -0
  11. hikyuu/gui/HikyuuTDX.py +13 -7
  12. hikyuu/gui/data/MainWindow.py +126 -126
  13. hikyuu/gui/spot_server.py +16 -7
  14. hikyuu/gui/start_qmt.py +36 -0
  15. hikyuu/include/hikyuu/DataType.h +2 -1
  16. hikyuu/include/hikyuu/KRecord.h +1 -1
  17. hikyuu/include/hikyuu/Stock.h +1 -1
  18. hikyuu/include/hikyuu/StockManager.h +3 -0
  19. hikyuu/include/hikyuu/StrategyContext.h +7 -2
  20. hikyuu/include/hikyuu/analysis/combinate.h +1 -1
  21. hikyuu/include/hikyuu/config.h +0 -12
  22. hikyuu/include/hikyuu/data_driver/base_info/table/HistoryFinanceTable.h +2 -2
  23. hikyuu/include/hikyuu/doc.h +2 -2
  24. hikyuu/include/hikyuu/global/GlobalSpotAgent.h +1 -0
  25. hikyuu/include/hikyuu/global/GlobalTaskGroup.h +4 -2
  26. hikyuu/include/hikyuu/global/SpotRecord.h +52 -0
  27. hikyuu/include/hikyuu/global/agent/SpotAgent.h +14 -41
  28. hikyuu/include/hikyuu/hikyuu.h +1 -0
  29. hikyuu/include/hikyuu/strategy/{AccountTradeManager.h → BrokerTradeManager.h} +97 -95
  30. hikyuu/include/hikyuu/strategy/RunPortfolioInStrategy.h +36 -0
  31. hikyuu/include/hikyuu/strategy/RunSystemInStrategy.h +37 -0
  32. hikyuu/include/hikyuu/strategy/Strategy.h +174 -0
  33. hikyuu/include/hikyuu/trade_manage/FundsRecord.h +8 -8
  34. hikyuu/include/hikyuu/trade_manage/OrderBrokerBase.h +66 -14
  35. hikyuu/include/hikyuu/trade_manage/PositionRecord.h +12 -12
  36. hikyuu/include/hikyuu/trade_manage/TradeManager.h +9 -0
  37. hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +19 -0
  38. hikyuu/include/hikyuu/utilities/FilterNode.h +267 -0
  39. hikyuu/include/hikyuu/utilities/LRUCache11.h +230 -0
  40. hikyuu/include/hikyuu/{Log.h → utilities/Log.h} +91 -113
  41. hikyuu/include/hikyuu/utilities/Null.h +1 -0
  42. hikyuu/include/hikyuu/utilities/Parameter.h +2 -1
  43. hikyuu/include/hikyuu/utilities/ResourcePool.h +636 -0
  44. hikyuu/include/hikyuu/utilities/SpendTimer.h +10 -9
  45. hikyuu/include/hikyuu/utilities/TimerManager.h +25 -11
  46. hikyuu/include/hikyuu/utilities/any_to_string.h +142 -0
  47. hikyuu/include/hikyuu/utilities/arithmetic.h +71 -35
  48. hikyuu/include/hikyuu/utilities/base64.h +59 -0
  49. hikyuu/include/hikyuu/utilities/config.h +41 -0
  50. hikyuu/include/hikyuu/utilities/datetime/Datetime.h +42 -31
  51. hikyuu/include/hikyuu/utilities/datetime/TimeDelta.h +24 -13
  52. hikyuu/include/hikyuu/utilities/db_connect/DBCondition.h +48 -48
  53. hikyuu/include/hikyuu/utilities/db_connect/DBConnect.h +10 -0
  54. hikyuu/include/hikyuu/utilities/db_connect/DBConnectBase.h +5 -22
  55. hikyuu/include/hikyuu/utilities/db_connect/DBUpgrade.h +3 -3
  56. hikyuu/include/hikyuu/utilities/db_connect/SQLException.h +1 -1
  57. hikyuu/include/hikyuu/utilities/db_connect/SQLResultSet.h +1 -1
  58. hikyuu/include/hikyuu/utilities/db_connect/SQLStatementBase.h +7 -7
  59. hikyuu/include/hikyuu/utilities/db_connect/TableMacro.h +1 -2
  60. hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLConnect.h +9 -9
  61. hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLStatement.h +18 -18
  62. hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteConnect.h +3 -3
  63. hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteStatement.h +2 -2
  64. hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteUtil.h +6 -6
  65. hikyuu/include/hikyuu/{exception.h → utilities/exception.h} +15 -16
  66. hikyuu/include/hikyuu/utilities/http_client/HttpClient.h +229 -0
  67. hikyuu/include/hikyuu/utilities/http_client/nng_wrap.h +517 -0
  68. hikyuu/include/hikyuu/utilities/http_client/url.h +25 -0
  69. hikyuu/include/hikyuu/utilities/{IniParser.h → ini_parser/IniParser.h} +10 -5
  70. hikyuu/include/hikyuu/utilities/ini_parser/__init__.py +1 -0
  71. hikyuu/include/hikyuu/utilities/md5.h +41 -0
  72. hikyuu/include/hikyuu/utilities/mo/__init__.py +1 -0
  73. hikyuu/include/hikyuu/utilities/mo/mo.h +48 -0
  74. hikyuu/include/hikyuu/utilities/mo/moFileReader.h +836 -0
  75. hikyuu/include/hikyuu/{global → utilities}/node/NodeClient.h +25 -18
  76. hikyuu/include/hikyuu/{global → utilities}/node/NodeError.h +1 -1
  77. hikyuu/include/hikyuu/{global → utilities}/node/NodeMessage.h +3 -2
  78. hikyuu/include/hikyuu/utilities/node/NodeServer.h +246 -0
  79. hikyuu/include/hikyuu/utilities/node/__init__.py +1 -0
  80. hikyuu/include/hikyuu/utilities/os.h +16 -15
  81. hikyuu/include/hikyuu/utilities/snowflake.h +110 -0
  82. hikyuu/include/hikyuu/utilities/string_view.h +70 -0
  83. hikyuu/include/hikyuu/utilities/thread/MQStealThreadPool.h +3 -3
  84. hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +3 -3
  85. hikyuu/include/hikyuu/utilities/thread/StealThreadPool.h +3 -3
  86. hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +3 -3
  87. hikyuu/include/hikyuu/version.h +4 -4
  88. hikyuu/interactive.py +42 -137
  89. hikyuu/sqlite3.dll +0 -0
  90. hikyuu/strategy/__init__.py +0 -1
  91. hikyuu/strategy/strategy_demo1.py +53 -0
  92. hikyuu/strategy/strategy_demo2.py +47 -0
  93. hikyuu/strategy/strategy_demo3.py +24 -0
  94. hikyuu/trade_manage/broker.py +27 -11
  95. hikyuu/trade_manage/broker_easytrader.py +52 -6
  96. hikyuu/trade_manage/broker_mail.py +17 -20
  97. hikyuu/vcruntime140.dll +0 -0
  98. hikyuu/vcruntime140_1.dll +0 -0
  99. hikyuu-2.1.2.dist-info/METADATA +115 -0
  100. {hikyuu-2.1.0.dist-info → hikyuu-2.1.2.dist-info}/RECORD +105 -79
  101. {hikyuu-2.1.0.dist-info → hikyuu-2.1.2.dist-info}/top_level.txt +4 -2
  102. hikyuu/README.rst +0 -79
  103. hikyuu/include/hikyuu/strategy/StrategyBase.h +0 -156
  104. hikyuu/strategy/demo/__init__.py +0 -3
  105. hikyuu/strategy/strategy.py +0 -27
  106. hikyuu-2.1.0.dist-info/METADATA +0 -126
  107. /hikyuu/include/hikyuu/{global/node → utilities/http_client}/__init__.py +0 -0
  108. {hikyuu-2.1.0.dist-info → hikyuu-2.1.2.dist-info}/LICENSE +0 -0
  109. {hikyuu-2.1.0.dist-info → hikyuu-2.1.2.dist-info}/WHEEL +0 -0
  110. {hikyuu-2.1.0.dist-info → hikyuu-2.1.2.dist-info}/entry_points.txt +0 -0
@@ -16,13 +16,19 @@
16
16
  #include "config.h"
17
17
  #include "exception.h"
18
18
 
19
+ #ifndef HKU_LOG_ACTIVE_LEVEL
20
+ #define HKU_LOG_ACTIVE_LEVEL 0
21
+ #endif
22
+
19
23
  // clang-format off
20
- #if USE_SPDLOG_LOGGER
21
- #include <spdlog/spdlog.h>
22
- #include <spdlog/fmt/ostr.h>
23
- #if HKU_USE_SPDLOG_ASYNC_LOGGER
24
- #include "spdlog/async.h"
25
- #endif
24
+ #ifndef SPDLOG_ACTIVE_LEVEL
25
+ #define SPDLOG_ACTIVE_LEVEL HKU_LOG_ACTIVE_LEVEL
26
+ #endif
27
+
28
+ #include <spdlog/spdlog.h>
29
+ #include <spdlog/fmt/ostr.h>
30
+ #if HKU_USE_SPDLOG_ASYNC_LOGGER
31
+ #include "spdlog/async.h"
26
32
  #endif
27
33
  // clang-format on
28
34
 
@@ -30,30 +36,24 @@
30
36
  #include <fmt/format.h>
31
37
  #include <fmt/chrono.h>
32
38
 
33
- #ifdef HKU_ENABLE_STACK_TRACE
39
+ #ifndef HKU_ENABLE_STACK_TRACE
40
+ #define HKU_ENABLE_STACK_TRACE 0
41
+ #endif
42
+
43
+ #if HKU_ENABLE_STACK_TRACE
34
44
  #include <boost/stacktrace.hpp>
35
45
  #endif
36
46
 
37
- #ifndef HKU_API
38
- #define HKU_API
47
+ #ifndef HKU_UTILS_API
48
+ #define HKU_UTILS_API
39
49
  #endif
40
50
 
41
51
  namespace hku {
42
52
 
43
- /**
44
- * @ingroup Utilities
45
- * @addtogroup logging Logging tools 日志工具
46
- * @details 打印等级:
47
- * TRACE < DEBUG < INFO < WARN < ERROR < FATAL
48
- * @{
49
- */
50
-
51
- bool HKU_API isLogInMainThread();
52
-
53
53
  /**********************************************
54
54
  * Use SPDLOG for logging
55
55
  *********************************************/
56
- #if USE_SPDLOG_LOGGER
56
+
57
57
  /** 日志级别 */
58
58
  enum LOG_LEVEL {
59
59
  LOG_TRACE = SPDLOG_LEVEL_TRACE, ///< 跟踪
@@ -65,19 +65,27 @@ enum LOG_LEVEL {
65
65
  LOG_OFF = SPDLOG_LEVEL_OFF, ///< 关闭日志打印
66
66
  };
67
67
 
68
+ /**
69
+ * 初始化 logger
70
+ * @param not_use_color 不使用彩色输出
71
+ * @param filename 日志文件名,为空时默认为当前目录下 "./hikyuu.log",需自行保存存放目录存在且可写入
72
+ */
73
+ void HKU_UTILS_API initLogger(bool not_use_color = false,
74
+ const std::string& filename = std::string());
75
+
68
76
  /**
69
77
  * 获取当前日志级别
70
78
  * @return
71
79
  */
72
- LOG_LEVEL HKU_API get_log_level();
80
+ LOG_LEVEL HKU_UTILS_API get_log_level();
73
81
 
74
82
  /**
75
83
  * 设置日志级别
76
84
  * @param level 指定的日志级别
77
85
  */
78
- void HKU_API set_log_level(LOG_LEVEL level);
86
+ void HKU_UTILS_API set_log_level(LOG_LEVEL level);
79
87
 
80
- std::shared_ptr<spdlog::logger> HKU_API getHikyuuLogger();
88
+ std::shared_ptr<spdlog::logger> HKU_UTILS_API getHikyuuLogger();
81
89
 
82
90
  #define HKU_TRACE(...) SPDLOG_LOGGER_TRACE(hku::getHikyuuLogger(), __VA_ARGS__)
83
91
  #define HKU_DEBUG(...) SPDLOG_LOGGER_DEBUG(hku::getHikyuuLogger(), __VA_ARGS__)
@@ -86,76 +94,6 @@ std::shared_ptr<spdlog::logger> HKU_API getHikyuuLogger();
86
94
  #define HKU_ERROR(...) SPDLOG_LOGGER_ERROR(hku::getHikyuuLogger(), __VA_ARGS__)
87
95
  #define HKU_FATAL(...) SPDLOG_LOGGER_CRITICAL(hku::getHikyuuLogger(), __VA_ARGS__)
88
96
 
89
- void initLogger(bool inJupyter = false);
90
-
91
- #else
92
- enum LOG_LEVEL {
93
- LOG_TRACE = 0,
94
- LOG_DEBUG = 1,
95
- LOG_INFO = 2,
96
- LOG_WARN = 3,
97
- LOG_ERROR = 4,
98
- LOG_FATAL = 5,
99
- LOG_OFF = 6,
100
- };
101
-
102
- LOG_LEVEL HKU_API get_log_level();
103
- void HKU_API set_log_level(LOG_LEVEL level);
104
- void initLogger(bool inJupyter = false);
105
-
106
- /** 获取系统当前时间,精确到毫秒,如:2001-01-02 13:01:02.001 */
107
- std::string HKU_API getLocalTime();
108
-
109
- #if LOG_ACTIVE_LEVEL <= 0
110
- #define HKU_TRACE(...) \
111
- fmt::print("[{}] [HKU-T] - {} ({}:{})\n", getLocalTime(), fmt::format(__VA_ARGS__), __FILE__, \
112
- __LINE__);
113
- #else
114
- #define HKU_TRACE(...)
115
- #endif
116
-
117
- #if LOG_ACTIVE_LEVEL <= 1
118
- #define HKU_DEBUG(...) \
119
- fmt::print("[{}] [HKU-D] - {} ({}:{})\n", getLocalTime(), fmt::format(__VA_ARGS__), __FILE__, \
120
- __LINE__);
121
- #else
122
- #define HKU_DEBUG(...)
123
- #endif
124
-
125
- #if LOG_ACTIVE_LEVEL <= 2
126
- #define HKU_INFO(...) \
127
- fmt::print("[{}] [HKU-I] - {} ({}:{})\n", getLocalTime(), fmt::format(__VA_ARGS__), __FILE__, \
128
- __LINE__);
129
- #else
130
- #define HKU_INFO(...)
131
- #endif
132
-
133
- #if LOG_ACTIVE_LEVEL <= 3
134
- #define HKU_WARN(...) \
135
- fmt::print("[{}] [HKU-W] - {} ({}:{})\n", getLocalTime(), fmt::format(__VA_ARGS__), __FILE__, \
136
- __LINE__);
137
- #else
138
- #define HKU_WARN(...)
139
- #endif
140
-
141
- #if LOG_ACTIVE_LEVEL <= 4
142
- #define HKU_ERROR(...) \
143
- fmt::print("[{}] [HKU-E] - {} ({}:{})\n", getLocalTime(), fmt::format(__VA_ARGS__), __FILE__, \
144
- __LINE__);
145
- #else
146
- #define HKU_ERROR(...)
147
- #endif
148
-
149
- #if LOG_ACTIVE_LEVEL <= 5
150
- #define HKU_FATAL(...) \
151
- fmt::print("[{}] [HKU-F] - {} ({}:{})\n", getLocalTime(), fmt::format(__VA_ARGS__), __FILE__, \
152
- __LINE__);
153
- #else
154
- #define HKU_FATAL(...)
155
- #endif
156
-
157
- #endif /* USE_SPDLOG_LOGGER */
158
-
159
97
  ///////////////////////////////////////////////////////////////////////////////
160
98
  //
161
99
  // clang/gcc 下使用 __PRETTY_FUNCTION__ 会包含函数参数,可以在编译时指定
@@ -166,7 +104,7 @@ std::string HKU_API getLocalTime();
166
104
  #define HKU_FUNCTION __FUNCTION__
167
105
  #endif
168
106
 
169
- #ifndef HKU_ENABLE_STACK_TRACE
107
+ #if !HKU_ENABLE_STACK_TRACE
170
108
  /**
171
109
  * 若表达式为 false,将抛出 hku::exception 异常, 并附带传入信息
172
110
  * @note 用于外部入参及结果检查
@@ -212,23 +150,9 @@ std::string HKU_API getLocalTime();
212
150
  __FILE__, __LINE__)); \
213
151
  } \
214
152
  } while (0)
215
- #endif // #ifndef HKU_ENABLE_STACK_TRACE
153
+ #endif // #if !HKU_ENABLE_STACK_TRACE
216
154
 
217
- #if HKU_DEBUG_MODE
218
- #define HKU_ASSERT_DEBUG(expr)
219
- #else
220
- /** 仅在 debug 模式下生效 */
221
- #define HKU_ASSERT_DEBUG(expr) \
222
- do { \
223
- if (!(expr)) { \
224
- std::string err_msg(fmt::format("HKU_ASSERT({})", #expr)); \
225
- throw hku::exception( \
226
- fmt::format("{} [{}] ({}:{})", err_msg, HKU_FUNCTION, __FILE__, __LINE__)); \
227
- } \
228
- } while (0)
229
-
230
- #endif /* #if HKU_DEBUG_MODE */
231
- #ifdef HKU_ENABLE_STACK_TRACE
155
+ #if HKU_ENABLE_STACK_TRACE
232
156
  /**
233
157
  * 若表达式为 false,将抛出 hku::exception 异常
234
158
  * @note 仅用于内部入参检查,编译时可通过 HKU_DISABLE_ASSERT 宏关闭
@@ -253,9 +177,9 @@ std::string HKU_API getLocalTime();
253
177
  } \
254
178
  } while (0)
255
179
 
256
- #endif // #ifndef HKU_ENABLE_STACK_TRACE
180
+ #endif // #if HKU_ENABLE_STACK_TRACE
257
181
 
258
- #ifndef HKU_ENABLE_STACK_TRACE
182
+ #if !HKU_ENABLE_STACK_TRACE
259
183
  /** 抛出 hku::exception 及传入信息 */
260
184
  #define HKU_THROW(...) \
261
185
  do { \
@@ -286,7 +210,7 @@ std::string HKU_API getLocalTime();
286
210
  throw except( \
287
211
  fmt::format("EXCEPTION: {} [{}] ({}:{})", errmsg, HKU_FUNCTION, __FILE__, __LINE__)); \
288
212
  } while (0)
289
- #endif // #ifndef HKU_ENABLE_STACK_TRACE
213
+ #endif // #if !HKU_ENABLE_STACK_TRACE
290
214
 
291
215
  /**
292
216
  * 满足指定条件时,打印 TRACE 信息
@@ -420,12 +344,66 @@ std::string HKU_API getLocalTime();
420
344
 
421
345
  /** 用于 catch (...) 中打印,减少编译后代码大小 */
422
346
  extern std::string g_unknown_error_msg;
347
+ #define HKU_THROW_UNKNOWN HKU_THROW(g_unknown_error_msg);
423
348
  #define HKU_TRACE_UNKNOWN HKU_TRACE(g_unknown_error_msg)
424
349
  #define HKU_DEBUG_UNKNOWN HKU_DEBUG(g_unknown_error_msg)
425
350
  #define HKU_INFO_UNKNOWN HKU_INFO(g_unknown_error_msg)
426
351
  #define HKU_ERROR_UNKNOWN HKU_ERROR(g_unknown_error_msg)
427
352
  #define HKU_FATAL_UNKNOWN HKU_FATAL(g_unknown_error_msg)
428
353
 
354
+ #if CPP_STANDARD >= CPP_STANDARD_17
355
+ #define CLASS_LOGGER_IMP(cls) \
356
+ protected: \
357
+ inline static const char* ms_logger = #cls;
358
+ #else
359
+ #define CLASS_LOGGER_IMP(cls) \
360
+ protected: \
361
+ const char* ms_logger = #cls;
362
+ #endif
363
+
364
+ #define CLS_TRACE(...) HKU_TRACE(fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
365
+ #define CLS_DEBUG(...) HKU_DEBUG(fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
366
+ #define CLS_INFO(...) HKU_INFO(fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
367
+ #define CLS_WARN(...) HKU_WARN(fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
368
+ #define CLS_ERROR(...) HKU_ERROR(fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
369
+ #define CLS_FATAL(...) HKU_FATAL(fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
370
+
371
+ #define CLS_TRACE_IF(expr, ...) \
372
+ HKU_TRACE_IF(expr, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
373
+ #define CLS_DEBUG_IF(expr, ...) \
374
+ HKU_DEBUG_IF(expr, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
375
+ #define CLS_INFO_IF(expr, ...) \
376
+ HKU_INFO_IF(expr, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
377
+ #define CLS_WARN_IF(expr, ...) \
378
+ HKU_WARN_IF(expr, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
379
+ #define CLS_ERROR_IF(expr, ...) \
380
+ HKU_ERROR_IF(expr, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
381
+ #define CLS_FATAL_IF(expr, ...) \
382
+ HKU_FATAL_IF(expr, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
383
+
384
+ #define CLS_IF_RETURN(expr, ret) HKU_IF_RETURN(expr, ret)
385
+ #define CLS_TRACE_IF_RETURN(expr, ret, ...) \
386
+ HKU_TRACE_IF_RETURN(expr, ret, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
387
+ #define CLS_DEBUG_IF_RETURN(expr, ret, ...) \
388
+ HKU_DEBUG_IF_RETURN(expr, ret, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
389
+ #define CLS_INFO_IF_RETURN(expr, ret, ...) \
390
+ HKU_INFO_IF_RETURN(expr, ret, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
391
+ #define CLS_WARN_IF_RETURN(expr, ret, ...) \
392
+ HKU_WARN_IF_RETURN(expr, ret, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
393
+ #define CLS_ERROR_IF_RETURN(expr, ret, ...) \
394
+ HKU_ERROR_IF_RETURN(expr, ret, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
395
+ #define CLS_FATAL_IF_RETURN(expr, ret, ...) \
396
+ HKU_FATAL_IF_RETURN(expr, ret, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
397
+
398
+ #define CLS_ASSERT HKU_ASSERT
399
+ #define CLS_CHECK(expr, ...) \
400
+ HKU_CHECK(expr, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
401
+ #define CLS_CHECK_THROW(expr, except, ...) \
402
+ HKU_CHECK_THROW(expr, except, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
403
+ #define CLS_THROW(...) HKU_THROW(fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
404
+ #define CLS_THROW_EXCEPTION(except, ...) \
405
+ HKU_THROW_EXCEPTION(except, fmt::format("[{}] {}", ms_logger, fmt::format(__VA_ARGS__)))
406
+
429
407
  /** @} */
430
408
 
431
409
  } /* namespace hku */
@@ -10,6 +10,7 @@
10
10
  #define NULL_H_
11
11
 
12
12
  #include <cstddef>
13
+ #include <cstdint>
13
14
  #include <limits>
14
15
  #include <type_traits>
15
16
  #include "osdef.h"
@@ -17,7 +17,8 @@
17
17
  #include <map>
18
18
  #include <boost/any.hpp>
19
19
 
20
- #include "../config.h"
20
+ #include "hikyuu/config.h"
21
+ #include "hikyuu/utilities/config.h"
21
22
 
22
23
  #if HKU_SUPPORT_SERIALIZATION
23
24
  #include <boost/lexical_cast.hpp>