1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Tim King |
4 |
|
* |
5 |
|
* This file is part of the cvc5 project. |
6 |
|
* |
7 |
|
* Copyright (c) 2009-2021 by the authors listed in the file AUTHORS |
8 |
|
* in the top-level source directory and their institutional affiliations. |
9 |
|
* All rights reserved. See the file COPYING in the top-level source |
10 |
|
* directory for licensing information. |
11 |
|
* **************************************************************************** |
12 |
|
* |
13 |
|
* Utilities for using ostreams. |
14 |
|
*/ |
15 |
|
#include "util/ostream_util.h" |
16 |
|
|
17 |
|
#include <ostream> |
18 |
|
|
19 |
|
namespace cvc5 { |
20 |
|
|
21 |
|
StreamFormatScope::StreamFormatScope(std::ostream& out) |
22 |
|
: d_out(out), d_format_flags(out.flags()), d_precision(out.precision()) |
23 |
|
{ |
24 |
|
} |
25 |
|
|
26 |
|
StreamFormatScope::~StreamFormatScope() |
27 |
|
{ |
28 |
|
d_out.precision(d_precision); |
29 |
|
d_out.flags(d_format_flags); |
30 |
|
} |
31 |
|
|
32 |
|
} // namespace cvc5 |