Hikyuu
BlockInfoDriver.h
浏览该文件的文档.
1 /*
2  * BlockInfoDriver.h
3  *
4  * Created on: 2015年2月10日
5  * Author: fasiondog
6  */
7 
8 #ifndef DATA_DRIVER_BLOCKINFODRIVER_H_
9 #define DATA_DRIVER_BLOCKINFODRIVER_H_
10 
11 #include "../utilities/Parameter.h"
12 #include "../Block.h"
13 
14 namespace hku {
15 
18 
19 public:
20  BlockInfoDriver(const string& name);
21  virtual ~BlockInfoDriver() {};
22 
23  const string& name() const;
24 
30  bool init(const Parameter& params);
31 
35  virtual bool _init() = 0;
36 
43  virtual Block getBlock(const string& category, const string& name) = 0;
44 
50  virtual BlockList getBlockList(const string& category) = 0;
51 
56  virtual BlockList getBlockList() = 0;
57 
58 private:
59  bool checkType();
60 
61 protected:
62  string m_name;
63 };
64 
65 typedef shared_ptr<BlockInfoDriver> BlockInfoDriverPtr;
66 
67 
68 HKU_API std::ostream & operator<<(std::ostream&, const BlockInfoDriver&);
69 HKU_API std::ostream & operator<<(std::ostream&, const BlockInfoDriverPtr&);
70 
71 
72 inline const string& BlockInfoDriver::name() const {
73  return m_name;
74 }
75 
76 } /* namespace hku */
77 #endif /* DATA_DRIVER_BLOCKINFODRIVER_H_ */
string m_name
Definition: BlockInfoDriver.h:62
供需要命名参数设定的类使用
Definition: Parameter.h:101
Definition: BlockInfoDriver.h:16
vector< Block > BlockList
Definition: Block.h:126
virtual ~BlockInfoDriver()
Definition: BlockInfoDriver.h:21
const string & name() const
Definition: BlockInfoDriver.h:72
#define HKU_API
Definition: DataType.h:12
HKU_API std::ostream & operator<<(std::ostream &os, const Block &blk)
Definition: Block.cpp:13
#define PARAMETER_SUPPORT
Definition: Parameter.h:233
shared_ptr< BlockInfoDriver > BlockInfoDriverPtr
Definition: BlockInfoDriver.h:65
Hikyuu核心命名空间,包含股票数据的管理、指标实现、交易系统框架等
Definition: Block.cpp:11
板块类,可视为证券的容器
Definition: Block.h:19