StockIo.h
上传用户:egreat
上传日期:2007-07-13
资源大小:29k
文件大小:1k
- #ifndef _STOCK_IO_H_
- #define _STOCK_IO_H_
- #include <boost/date_time/gregorian/gregorian.hpp>
- #include <boost/date_time/posix_time/posix_time_types.hpp>
- #include "stock.h"
- #include "engine.h"
- namespace StockMarket
- {
- extern void AddStockListRequest(bool all);
- extern void AddInstantTransRequest(int count);
- extern void AddGBBQRequest();
- extern int load_data(const gregorian::date& from, const gregorian::date& to);
- extern void save_day_transaction(uint dt, const StockTransact::DateTransact & transact);
- extern void AddHistTransRequest(const gregorian::date& from, const gregorian::date& to);
- extern int load_transact_data(const gregorian::date& from, const gregorian::date& to, StockTransact::TransactMap& outTr);
- extern bool load_one_day_transact_data(const gregorian::date& current, StockTransact::TransactMap& outTr);
- extern bool transact_data_exsist(const gregorian::date& dt);
- extern std::string get_transaction_filename(uint d);
- class malabEng
- {
- public:
- malabEng();
- ~malabEng();
- void putVariable(const mxArray *pInput, const char* var);
- void evalString(const char* var);
- mxArray* getVariable(const char* var);
- void saveVarToFile(const string &filename, const mxArray *var, const string &var_name);
- private:
- Engine *pEngine_;
- };
- typedef SingletonHolder<malabEng> matlab_engine;
-
- }
- #endif