#ifndef _SQL_SQLTHREAD_HPP_ #define _SQL_SQLTHREAD_HPP_ #ifndef _THREAD_MESSAGETHREAD_HPP_ #include #endif template class PureVector; template class SmartPointer; class ThreadCallbackPointer; class SQLDb; class SQLThread : public MessageThread { public: enum Mode{Sync,Async}; SQLThread(void); virtual ~SQLThread(); BOOL open(const String &nameData,const String &userID,const String &password); void insertHandler(ThreadCallbackPointer pThreadCallback); void removeHandler(void); private: SQLThread(const SQLThread &someSQLThread); SQLThread &operator=(const SQLThread &someSQLThread); DWORD threadHandler(ThreadMessage &someThreadMessage); ThreadCallback mThreadHandler; ThreadCallbackPointer mEventHandler; SmartPointer mSQLDb; }; inline SQLThread::SQLThread(void) : mThreadHandler(this,&SQLThread::threadHandler), mlpSQLDb(0) { } inline SQLThread::~SQLThread() { } inline SQLThread(const SQLThread &someSQLThread) { // private implementation } inline SQLThread &operator=(const SQLThread &someSQLThread) { // private implementation } inline void SQLThread::insertHandler(ThreadCallbackPointer pThreadCallback) { mEventHandler=pThreadCallback; } inline void SQLThread::removeHandler(void) { mEventHandler=ThreadCallbackPointer(); } #endif