Browse Subversion Repository
Contents of /trunk/Common/NsmPluginMain.h
Parent Directory
| Revision Log
Revision 119 -
( show annotations)
( download)
( as text)
Fri Oct 8 15:41:45 2010 UTC
(13 years, 7 months ago)
by kamoya
File MIME type: text/x-chdr
File size: 1467 byte(s)
avoid ARRAYSIZE macro
| 1 |
#ifndef NSMPLUGINMAIN_H |
| 2 |
#define NSMPLUGINMAIN_H |
| 3 |
|
| 4 |
#include <array> |
| 5 |
|
| 6 |
#include "UNsmConsts.h" |
| 7 |
#include "NsmTypes.h" |
| 8 |
#include "tstring.h" |
| 9 |
|
| 10 |
namespace Regnessem |
| 11 |
{ |
| 12 |
namespace Common |
| 13 |
{ |
| 14 |
class NsmPluginMain |
| 15 |
{ |
| 16 |
private: |
| 17 |
bool Initialized; |
| 18 |
std::array<tstring, NMPI_PLUGINVER + 1> PluginInfo; |
| 19 |
protected: |
| 20 |
virtual void DoInitialize(); |
| 21 |
virtual void DoTerminate(); |
| 22 |
|
| 23 |
static tstring GetDllFileName(); |
| 24 |
static tstring GetWorkDir(); |
| 25 |
static tstring GetIniFileName(); |
| 26 |
public: |
| 27 |
TNsmPluginInitInfo InitInfo; |
| 28 |
|
| 29 |
NsmPluginMain(); |
| 30 |
virtual ~NsmPluginMain(); |
| 31 |
void Initialize(const TNsmPluginInitInfo& initInfo); |
| 32 |
void Terminate(); |
| 33 |
|
| 34 |
HNsmService CreateNsmService(const tstring &serviceName,const TNsmServiceProc procAddr) const; |
| 35 |
HNsmService GetService(const tstring &serviceName) const; |
| 36 |
LONG_PTR CallService(const tstring &serviceName,const WPARAM wParam,const LPARAM lParam) const; |
| 37 |
HNsmEvent CreateNsmEvent(const tstring &eventName) const; |
| 38 |
HNsmEvent GetEvent(const tstring &eventName) const; |
| 39 |
int NotifyEvent(const HNsmEvent eventHandle,const WPARAM wParam,const LPARAM lParam) const; |
| 40 |
int HookEvent(const tstring &eventName,const TNsmEventProc procAddr) const; |
| 41 |
int UnhookEvent(const tstring &eventName,const TNsmEventProc procAddr) const; |
| 42 |
|
| 43 |
tstring GetPluginInfo(int index) const; |
| 44 |
void SetPluginInfo(int index,const tstring &value); |
| 45 |
bool IsInitialized() const; |
| 46 |
}; |
| 47 |
} |
| 48 |
} |
| 49 |
#endif |
|