⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 model_base.h

📁 股票分析源代码
💻 H
字号:
#ifndef __HBSTOCK2_MODEL_BASE_H__
#define __HBSTOCK2_MODEL_BASE_H__

#include <ace/Refcounted_Auto_Ptr.h>

#include "gnu/app_config.h"

#include "hbstock2/data_config.h"

namespace hbstock2
{
	
/**
* ModelBaseInfo used as a base class for a model.
* it used to set id,name,title and version.
*/
class ModelBaseInfo
{
public:
	ModelBaseInfo();
	~ModelBaseInfo() ;
	ModelBaseInfo(const ModelBaseInfo& other);
	ModelBaseInfo& operator=(const ModelBaseInfo& other);
	void swap(ModelBaseInfo& other);
	
	unsigned int get_id() const; //register ID
	/**
	*  this function will be called by Parameter manger
	*/
	void set_id(unsigned int id);
	
	const std::string get_name() const ;
	void set_name(const char* p_ch_name);
	const std::string get_title() const;
	void set_title(const char* p_ch_title);
	const std::string get_version() const;	
	void set_version(const char* p_ch_version);

private:
	struct DataImpl;
	ACE_Refcounted_Auto_Ptr<DataImpl,Hbstock_Mutex> m_pimpl_ptr;
	//std::auto_ptr<DataImpl> m_pimpl_ptr;	
};


class ModelConfigParameter
{
public :
	ModelConfigParameter();
	virtual ~ModelConfigParameter();
	
	virtual void init_config_parameter();
	virtual void set_default_config_parameter();
	virtual void reload_config_parameter();	
	virtual void print_config_parameter() ;
	gnu::ModuleConfigPtr get_config() const;

protected :
	gnu::ModuleConfigPtr m_module_config_ptr;
};

} // namespace hbstock2
#endif  // #ifndef __HBSTOCK2_MODEL_BASE_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -