home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2002 April / Game.EXE_04_2002.iso / Alawar / LogPtr.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2002-02-25  |  328 b   |  21 lines

  1. #include "LogPtr.h"
  2. #include "TxtLog.h"
  3. #include "String.h"
  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.