This commit is contained in:
2024-08-07 09:16:27 -04:00
parent fdfadd5c7e
commit 5f971cf684
5200 changed files with 731717 additions and 0 deletions

65
sql/SQLTHRD.HPP Normal file
View File

@@ -0,0 +1,65 @@
#ifndef _SQL_SQLTHREAD_HPP_
#define _SQL_SQLTHREAD_HPP_
#ifndef _THREAD_MESSAGETHREAD_HPP_
#include <thread/mthread.hpp>
#endif
template <class T>
class PureVector;
template <class T>
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<SQLThread> mThreadHandler;
ThreadCallbackPointer mEventHandler;
SmartPointer<SQLDb> 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