1 // Copyright (c) 2015-2016 The Khronos Group Inc.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 #ifndef SOURCE_PRINT_H_
16 #define SOURCE_PRINT_H_
23 // Wrapper for out stream selection.
26 out_stream() : pStream(nullptr) {}
27 explicit out_stream(std::stringstream
& stream
) : pStream(&stream
) {}
37 std::stringstream
* pStream
;
41 // Resets console color.
43 operator const char*();
46 // Sets console color to grey.
48 operator const char*();
51 // Sets console color to red.
53 operator const char*();
56 // Sets console color to green.
58 operator const char*();
61 // Sets console color to yellow.
63 operator const char*();
66 // Sets console color to blue.
68 operator const char*();
73 } // namespace spvtools
75 #endif // SOURCE_PRINT_H_