hikyuu2/hikyuu_cpp/hikyuu/TimeLineRecord.h

72 lines
1.3 KiB
C++
Raw Normal View History

2019-02-08 22:41:20 +08:00
/*
* TimeLineRecord.h
*
* Created on: 2019-1-27
* Author: fasiondog
*/
#pragma once
2019-02-08 22:41:20 +08:00
#ifndef TIMELINERECORD_H_
#define TIMELINERECORD_H_
#include "DataType.h"
namespace hku {
/**
* 线
* @ingroup StockManage
*/
class HKU_API TimeLineRecord {
public:
Datetime datetime;
price_t price;
price_t vol;
TimeLineRecord();
TimeLineRecord(const Datetime& datetime, price_t price, price_t vol);
bool isValid() const;
};
2019-02-09 18:25:16 +08:00
/**
* 线
* @ingroup StockManage
*/
2019-02-11 16:33:55 +08:00
typedef vector<TimeLineRecord> TimeLineList;
2019-02-08 22:41:20 +08:00
/**
2019-02-09 18:25:16 +08:00
* TimeLineRecord信息TimeSharingRecord(datetime, price, vol)
2019-02-08 22:41:20 +08:00
* @ingroup StockManage
*/
2019-11-10 19:45:57 +08:00
HKU_API std::ostream& operator<<(std::ostream&, const TimeLineRecord&);
2019-02-08 22:41:20 +08:00
2019-02-09 18:25:16 +08:00
/**
* TimeLine信息
* @details
* <pre>
* TimeLine{
* size : 738501
* start: YYYY-MM-DD hh:mm:ss
* last : YYYY-MM-DD hh:mm:ss
* }
* </pre>
* @ingroup StockManage
*/
2019-11-10 19:45:57 +08:00
HKU_API std::ostream& operator<<(std::ostream& os, const TimeLineList&);
2019-02-08 22:41:20 +08:00
/**
2019-02-09 18:25:16 +08:00
* TimeLineRecord是否相等使
2019-02-08 22:41:20 +08:00
* @ingroup StockManage
*/
2019-11-10 19:45:57 +08:00
bool HKU_API operator==(const TimeLineRecord& d1, const TimeLineRecord& d2);
2019-02-08 22:41:20 +08:00
} /* namespace hku */
2023-07-28 23:50:26 +08:00
#if FMT_VERSION >= 90000
template <>
struct fmt::formatter<hku::TimeLineRecord> : ostream_formatter {};
#endif
2019-02-08 22:41:20 +08:00
#endif /* TIMELINERECORD_H_ */