///////////////////////////////////////////////
// CIOMessageMap.h
class __declspec(novtable) CIOMessageMap
{
public:
virtual bool ProcessIOMessage(IOType clientIO, ClientContext*
pContext, DWORD dwSize) = 0;
};
#define BEGIN_IO_MSG_MAP() \
public: \
bool ProcessIOMessage(IOType clientIO, ClientContext* pContext, DWORD
dwSize = 0) \
{ \
bool bRet = false;
#define IO_MESSAGE_HANDLER(msg, func) \
if (msg == clientIO) \
bRet = func(pContext, dwSize);
#define END_IO_MSG_MAP() \
return bRet; \
}
Why class CIOMessageMap should be declared by declspec(novtable)?
The macros implements the member function of CIOMessageMap --
ProcessIOMessage();But in other places of project,there no any
inheritances of CIOMessageMap.
Who can tell me the advantages about this coding style?
There are will best in detail.