hikyuu2/libs/hikyuu/data_driver/BlockInfoDriver.h

74 lines
1.4 KiB
C++
Raw Normal View History

2016-04-03 00:08:31 +08:00
/*
* BlockInfoDriver.h
*
* Created on: 2015210
2016-04-14 01:36:53 +08:00
* Author: fasiondog
2016-04-03 00:08:31 +08:00
*/
#ifndef DATA_DRIVER_BLOCKINFODRIVER_H_
#define DATA_DRIVER_BLOCKINFODRIVER_H_
#include "../utilities/Parameter.h"
2016-04-03 00:08:31 +08:00
#include "../Block.h"
namespace hku {
class HKU_API BlockInfoDriver {
PARAMETER_SUPPORT
2016-04-03 00:08:31 +08:00
public:
BlockInfoDriver(const string& name);
2016-04-03 00:08:31 +08:00
virtual ~BlockInfoDriver() {};
const string& name() const;
/**
*
* @param params
* @return
*/
bool init(const Parameter& params);
/**
*
*/
virtual bool _init() = 0;
2016-04-03 00:08:31 +08:00
/**
*
* @param category
* @param name
* @return
*/
virtual Block getBlock(const string& category, const string& name) = 0;
/**
*
* @param category
* @return
*/
virtual BlockList getBlockList(const string& category) = 0;
/**
*
* @return
*/
virtual BlockList getBlockList() = 0;
private:
bool checkType();
2016-04-03 00:08:31 +08:00
protected:
string m_name;
2016-04-03 00:08:31 +08:00
};
typedef shared_ptr<BlockInfoDriver> BlockInfoDriverPtr;
inline const string& BlockInfoDriver::name() const {
return m_name;
}
2016-04-03 00:08:31 +08:00
} /* namespace hku */
#endif /* DATA_DRIVER_BLOCKINFODRIVER_H_ */