home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2002 May / Game.EXE_05_2002.iso / Alawar / Lib / Log / LogPtr.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-27  |  331 b   |  21 lines

  1. #include "LogPtr.h"
  2. #include "TxtLog.h"
  3. #include <String.hpp>
  4. #include <safe_new.h>
  5.  
  6. Log * LogPtr::log = 0;
  7.  
  8. void LogPtr::destroy()
  9. {
  10.     delete log; log = 0;
  11. }
  12.  
  13. Log * LogPtr::operator->()const
  14. {
  15.     if( !log )
  16.     {
  17.         log = new TxtLog("game.log","To change the Log strategy, modify LogPtr.cpp file");
  18.     }
  19.     return log;
  20. }
  21.