Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
OStream.hpp
1#pragma once
2
3#include <boost/iostreams/filtering_stream.hpp>
4
5#include <string>
6
7namespace util::prometheus {
8
12class OStream {
13public:
19 OStream(bool compressionEnabled);
20
21 OStream(OStream const&) = delete;
22 OStream(OStream&&) = delete;
23 ~OStream() = default;
24
32 template <typename T>
34 operator<<(T const& value)
35 {
36 stream_ << value;
37 return *this;
38 }
39
47 std::string
48 data() &&;
49
50private:
51 bool compressionEnabled_;
52 std::string buffer_;
53 boost::iostreams::filtering_ostream stream_;
54};
55
56} // namespace util::prometheus
OStream(bool compressionEnabled)
Construct a new OStream object.
Definition OStream.cpp:11
OStream & operator<<(T const &value)
Write to the stream.
Definition OStream.hpp:34
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:56