/********************************************************************* * * 文 件: StorageDump.h * * 版权所有: Shanghai Baosight Software Co., Ltd. * %USER% *********************************************************************/ #ifndef _COIL_STORAGE_DUMP_H #define _COIL_STORAGE_DUMP_H #include #include #include #include #include #include using namespace baosight; /********************************************************************* * 类 名: StorageDump * 版权所有: Shanghai Baosight Software Co., Ltd. * *********************************************************************/ class StorageDump { public: StorageDump(const string& db,const string& user, const string& password); virtual ~StorageDump(); /********************************************************************** * 概述: 功能分派 * **********************************************************************/ int dispatch(int eventNo,const ::Ice::ByteSeq& seq); private: int SetPDIMem(const string& entId,const string& sql); //get color from L2 int GetColor(void); private: bool getNextPDO(PDO* pdo); int getL2PDO(const string& entId,PDO* pdo); //dump by table int dumpTable(int eventNo,const string& where); int dumpTable(const string& srcsql,const string& disttable); private: //dump database data int dumpData(const string& srcsql,const string& distsql); short Proxy(int eventNo,const string& proxyName, const char* str,int length); private: CMemTable* pt_pdo; CMemTable* pt_pdi; CMemTrk* mp_trk; AutoTele* mp_atele; iDA::Connection m_con; iDA::Command m_cmd; }; #endif