Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_stream.h
Go to the documentation of this file.
1/*
2 * Created by Phil on 2/12/2013.
3 * Copyright 2013 Two Blue Cubes Ltd. All rights reserved.
4 *
5 * Distributed under the Boost Software License, Version 1.0. (See accompanying
6 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 *
8 */
9#ifndef TWOBLUECUBES_CATCH_STREAM_H_INCLUDED
10#define TWOBLUECUBES_CATCH_STREAM_H_INCLUDED
11
12#include <iosfwd>
13#include <cstddef>
14#include <ostream>
15
16namespace Catch {
17
18 std::ostream& cout();
19 std::ostream& cerr();
20 std::ostream& clog();
21
22 class StringRef;
23
24 struct IStream {
25 virtual ~IStream();
26 virtual std::ostream& stream() const = 0;
27 };
28
29 auto makeStream( StringRef const &filename ) -> IStream const*;
30
32 std::size_t m_index;
33 std::ostream* m_oss;
34 public:
37
38 auto str() const -> std::string;
39
40 template<typename T>
42 *m_oss << value;
43 return *this;
44 }
45 auto get() -> std::ostream& { return *m_oss; }
46 };
47}
48
49#endif // TWOBLUECUBES_CATCH_STREAM_H_INCLUDED
auto str() const -> std::string
auto get() -> std::ostream &
auto operator<<(T const &value) -> ReusableStringStream &
GenericStringRef< CharType > StringRef(const CharType *str)
Mark a character pointer as constant string.
Definition document.h:364
std::ostream & cout()
std::ostream & clog()
std::ostream & cerr()
auto makeStream(StringRef const &filename) -> IStream const *
#define value
Definition pkcs11.h:157
#define T(meth, val, expected)
virtual ~IStream()
virtual std::ostream & stream() const =0