/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. #include "stdafx.h"
  9. #include "CacheService.h"
  10. #include "CacheMsgHandler.h"
  11. CacheService::CacheService( CacheMsgHandler* pCacheMsgHandler )
  12. : m_pCacheMsgHandler( pCacheMsgHandler )
  13. {
  14. }
  15. CacheService::~CacheService( void )
  16. {
  17. if ( m_pCacheMsgHandler )
  18. {
  19. delete m_pCacheMsgHandler;
  20. m_pCacheMsgHandler = NULL;
  21. }
  22. }
  23. void CacheService::RegisterMessage( int msgID, CacheMsgHandler* message )
  24. {
  25. m_pCacheMsgHandler->RegisterMessage( msgID, message );
  26. }
  27. void CacheService::ReceiveMsg( DBMessage* message ) const
  28. {
  29. m_pCacheMsgHandler->handleMsg( message );
  30. }