Win32DebugLogStream.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef AI_WIN32DEBUGLOGSTREAM_H_INC
  2. #define AI_WIN32DEBUGLOGSTREAM_H_INC
  3. #include "LogStream.h"
  4. #ifdef _MSC_VER
  5. #include "Windows.h"
  6. #endif
  7. namespace Assimp
  8. {
  9. #ifdef _MSC_VER
  10. // ---------------------------------------------------------------------------
  11. /** @class Win32DebugLogStream
  12. * @brief Logs into the debug stream from win32.
  13. */
  14. class Win32DebugLogStream :
  15. public LogStream
  16. {
  17. public:
  18. /** @brief Default constructor */
  19. Win32DebugLogStream();
  20. /** @brief Destructor */
  21. ~Win32DebugLogStream();
  22. /** @brief Writer */
  23. void write(const std::string &messgae);
  24. };
  25. // ---------------------------------------------------------------------------
  26. // Default constructor
  27. inline Win32DebugLogStream::Win32DebugLogStream()
  28. {
  29. // empty
  30. }
  31. // ---------------------------------------------------------------------------
  32. // Default constructor
  33. inline Win32DebugLogStream::~Win32DebugLogStream()
  34. {
  35. // empty
  36. }
  37. // ---------------------------------------------------------------------------
  38. // Write method
  39. inline void Win32DebugLogStream::write(const std::string &message)
  40. {
  41. OutputDebugString( message.c_str() );
  42. }
  43. // ---------------------------------------------------------------------------
  44. #endif
  45. } // Namespace Assimp
  46. #endif