1 | /* |
2 | --------------------------------------------------------------------------- |
3 | Open Asset Import Library (assimp) |
4 | --------------------------------------------------------------------------- |
5 | |
6 | Copyright (c) 2006-2017, assimp team |
7 | |
8 | |
9 | All rights reserved. |
10 | |
11 | Redistribution and use of this software in source and binary forms, |
12 | with or without modification, are permitted provided that the following |
13 | conditions are met: |
14 | |
15 | * Redistributions of source code must retain the above |
16 | copyright notice, this list of conditions and the |
17 | following disclaimer. |
18 | |
19 | * Redistributions in binary form must reproduce the above |
20 | copyright notice, this list of conditions and the |
21 | following disclaimer in the documentation and/or other |
22 | materials provided with the distribution. |
23 | |
24 | * Neither the name of the assimp team, nor the names of its |
25 | contributors may be used to endorse or promote products |
26 | derived from this software without specific prior |
27 | written permission of the assimp team. |
28 | |
29 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
30 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
31 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
32 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
33 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
34 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
35 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
36 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
37 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
38 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
39 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
40 | --------------------------------------------------------------------------- |
41 | */ |
42 | |
43 | /** @file Win32DebugLogStream.h |
44 | * @brief Implementation of Win32DebugLogStream |
45 | */ |
46 | #ifndef AI_WIN32DEBUGLOGSTREAM_H_INC |
47 | #define AI_WIN32DEBUGLOGSTREAM_H_INC |
48 | |
49 | #ifdef _WIN32 |
50 | |
51 | #include <assimp/LogStream.hpp> |
52 | #include "windows.h" |
53 | |
54 | namespace Assimp { |
55 | |
56 | // --------------------------------------------------------------------------- |
57 | /** @class Win32DebugLogStream |
58 | * @brief Logs into the debug stream from win32. |
59 | */ |
60 | class Win32DebugLogStream : public LogStream { |
61 | public: |
62 | /** @brief Default constructor */ |
63 | Win32DebugLogStream(); |
64 | |
65 | /** @brief Destructor */ |
66 | ~Win32DebugLogStream(); |
67 | |
68 | /** @brief Writer */ |
69 | void write(const char* messgae); |
70 | }; |
71 | |
72 | // --------------------------------------------------------------------------- |
73 | inline |
74 | Win32DebugLogStream::Win32DebugLogStream(){ |
75 | // empty |
76 | } |
77 | |
78 | // --------------------------------------------------------------------------- |
79 | inline |
80 | Win32DebugLogStream::~Win32DebugLogStream(){ |
81 | // empty |
82 | } |
83 | |
84 | // --------------------------------------------------------------------------- |
85 | inline |
86 | void Win32DebugLogStream::write(const char* message) { |
87 | ::OutputDebugStringA( message); |
88 | } |
89 | |
90 | // --------------------------------------------------------------------------- |
91 | } // Namespace Assimp |
92 | |
93 | #endif // ! _WIN32 |
94 | #endif // guard |
95 | |