8 #ifndef STOCKTYPEINFO_SERIALIZATION_H_ 9 #define STOCKTYPEINFO_SERIALIZATION_H_ 11 #include "../config.h" 12 #include "../StockTypeInfo.h" 13 #include "../utilities/util.h" 15 #if HKU_SUPPORT_SERIALIZATION 16 #include <boost/serialization/nvp.hpp> 17 #include <boost/serialization/split_free.hpp> 20 namespace serialization {
23 #if defined(BOOST_WINDOWS) && (PY_VERSION_HEX < 0x03000000) 24 #ifndef HKU_GB_TO_UTF8 25 #define HKU_GB_TO_UTF8(s) hku::GBToUTF8(s) 28 #ifndef HKU_UTF8_TO_GB 29 #define HKU_UTF8_TO_GB(s) hku::UTF8ToGB(s) 32 #ifndef HKU_GB_TO_UTF8 33 #define HKU_GB_TO_UTF8(s) (s) 36 #ifndef HKU_UTF8_TO_GB 37 #define HKU_UTF8_TO_GB(s) (s) 41 template<
class Archive>
50 ar & BOOST_SERIALIZATION_NVP(type);
51 ar & BOOST_SERIALIZATION_NVP(description);
52 ar & BOOST_SERIALIZATION_NVP(tick);
53 ar & BOOST_SERIALIZATION_NVP(tickValue);
54 ar & BOOST_SERIALIZATION_NVP(precision);
55 ar & BOOST_SERIALIZATION_NVP(minTradeNumber);
56 ar & BOOST_SERIALIZATION_NVP(maxTradeNumber);
59 template<
class Archive>
65 size_t minTradeNumber, maxTradeNumber;
66 ar & BOOST_SERIALIZATION_NVP(type);
67 ar & BOOST_SERIALIZATION_NVP(description);
68 ar & BOOST_SERIALIZATION_NVP(tick);
69 ar & BOOST_SERIALIZATION_NVP(tickValue);
70 ar & BOOST_SERIALIZATION_NVP(precision);
71 ar & BOOST_SERIALIZATION_NVP(minTradeNumber);
72 ar & BOOST_SERIALIZATION_NVP(maxTradeNumber);
74 tick, tickValue, precision, minTradeNumber, maxTradeNumber);
unsigned hku_uint32
Definition: DataType.h:48
#define HKU_GB_TO_UTF8(s)
Definition: StockTypeInfo_serialization.h:33
Definition: Block_serialization.h:17
std::string string
Definition: DataType.h:55
证券类型信息
Definition: StockTypeInfo.h:32
#define HKU_UTF8_TO_GB(s)
Definition: StockTypeInfo_serialization.h:37
int precision() const
获取价格精度
Definition: StockTypeInfo.h:55
void load(Archive &ar, hku::Block &blk, unsigned int version)
Definition: Block_serialization.h:34
size_t maxTradeNumber() const
获取每笔最大交易数量
Definition: StockTypeInfo.h:61
size_t minTradeNumber() const
获取每笔最小交易数量
Definition: StockTypeInfo.h:58
price_t tick() const
获取最小跳动量
Definition: StockTypeInfo.h:46
void save(Archive &ar, const hku::Block &blk, unsigned int version)
Definition: Block_serialization.h:20
double price_t
Definition: DataType.h:53
const string & description() const
获取证券类型描述信息
Definition: StockTypeInfo.h:43
price_t tickValue() const
每tick价格
Definition: StockTypeInfo.h:49
hku_uint32 type() const
获取证券类型
Definition: StockTypeInfo.h:40