PageRenderTime 22ms CodeModel.GetById 16ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/TGame/TServerMS/Database/CacheService.cpp

http://awoe.googlecode.com/
C++ | 38 lines | 23 code | 8 blank | 7 comment | 1 complexity | c974aad2655e16be658486cbdb9f6a63 MD5 | raw file
 1/////////////////////////////////////////////////////////////////////
 2// CacheService.cpp
 3//
 4//
 5// 11/16/2010
 6//
 7/////////////////////////////////////////////////////////////////////
 8
 9#include "stdafx.h"
10#include "CacheService.h"
11#include "CacheMsgHandler.h"
12
13
14
15CacheService::CacheService( CacheMsgHandler* pCacheMsgHandler )
16: m_pCacheMsgHandler( pCacheMsgHandler )
17{
18}
19
20CacheService::~CacheService( void )
21{
22	if ( m_pCacheMsgHandler )
23	{
24		delete m_pCacheMsgHandler;
25		m_pCacheMsgHandler = NULL;
26	}	
27}
28
29void CacheService::RegisterMessage( int msgID, CacheMsgHandler* message )
30{
31	m_pCacheMsgHandler->RegisterMessage( msgID, message );
32}
33
34void CacheService::ReceiveMsg( DBMessage* message ) const
35{
36	m_pCacheMsgHandler->handleMsg( message );
37}
38