8 #ifndef STOCKWEIGHT_SERIALIZATION_H_ 9 #define STOCKWEIGHT_SERIALIZATION_H_ 11 #include "../config.h" 12 #include "../StockWeight.h" 14 #if HKU_SUPPORT_SERIALIZATION 15 #include <boost/serialization/nvp.hpp> 16 #include <boost/serialization/split_free.hpp> 17 #include <boost/serialization/vector.hpp> 20 namespace serialization {
21 template<
class Archive>
31 ar & BOOST_SERIALIZATION_NVP(datetime);
32 ar & BOOST_SERIALIZATION_NVP(countAsGift);
33 ar & BOOST_SERIALIZATION_NVP(countForSell);
34 ar & BOOST_SERIALIZATION_NVP(priceForSell);
35 ar & BOOST_SERIALIZATION_NVP(bonus);
36 ar & BOOST_SERIALIZATION_NVP(increasement);
37 ar & BOOST_SERIALIZATION_NVP(totalCount);
38 ar & BOOST_SERIALIZATION_NVP(freeCount);
41 template<
class Archive>
44 hku::price_t countAsGift, countForSell, priceForSell, bonus;
46 ar & BOOST_SERIALIZATION_NVP(datetime);
47 ar & BOOST_SERIALIZATION_NVP(countAsGift);
48 ar & BOOST_SERIALIZATION_NVP(countForSell);
49 ar & BOOST_SERIALIZATION_NVP(priceForSell);
50 ar & BOOST_SERIALIZATION_NVP(bonus);
51 ar & BOOST_SERIALIZATION_NVP(increasement);
52 ar & BOOST_SERIALIZATION_NVP(totalCount);
53 ar & BOOST_SERIALIZATION_NVP(freeCount);
55 countForSell, priceForSell, bonus, increasement,
56 totalCount, freeCount);
unsigned long long number() const
返回如YYYYMMDDhhmmss格式的数字,方便比较操作, Null<Datetime>()对应的 number 为 Null<unsigned long lo...
Definition: Datetime.cpp:71
price_t totalCount() const
总股本(万股)
Definition: StockWeight.h:50
Definition: Block_serialization.h:17
日期类型
Definition: Datetime.h:33
void load(Archive &ar, hku::Block &blk, unsigned int version)
Definition: Block_serialization.h:34
price_t countForSell() const
每10股配X股
Definition: StockWeight.h:38
price_t bonus() const
每10股红利
Definition: StockWeight.h:44
void save(Archive &ar, const hku::Block &blk, unsigned int version)
Definition: Block_serialization.h:20
double price_t
Definition: DataType.h:53
price_t increasement() const
每10股转增X股
Definition: StockWeight.h:47
price_t countAsGift() const
每10股送X股
Definition: StockWeight.h:35
权息数据结构
Definition: StockWeight.h:19
price_t freeCount() const
流通股(万股)
Definition: StockWeight.h:53
price_t priceForSell() const
配股价
Definition: StockWeight.h:41
unsigned long long hku_uint64
Definition: DataType.h:46
Datetime datetime() const
权息日期
Definition: StockWeight.h:32