OTest2
A C++ testing framework
base64ostream.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Ondrej Starek
3  *
4  * This file is part of OTest2.
5  *
6  * OTest2 is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License,
9  * or (at your option) any later version.
10  *
11  * OTest2 is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with OTest2. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef OTest2__LIB_BASE64OSTREAM_H_
21 #define OTest2__LIB_BASE64OSTREAM_H_
22 
23 #include <ostream>
24 
25 namespace OTest2 {
26 
30 class Base64OStream : public std::ostream {
31  private:
32  class Buffer;
33  Buffer* buffer;
34 
35  public:
45  explicit Base64OStream(
46  std::ostream* decorated_,
47  int line_length_ = 0);
48 
52  virtual ~Base64OStream();
53 
54  /* -- avoid copying */
56  const Base64OStream&) = delete;
58  const Base64OStream&) = delete;
59 
68  bool finish() noexcept;
69 };
70 
71 } /* -- namespace OTest2 */
72 
73 #endif /* -- OTest2__LIB_BASE64OSTREAM_H_ */
OTest2::Base64OStream::finish
bool finish() noexcept
Finish current sequence.
Definition: base64ostream.cpp:190
OTest2::Base64OStream
Base64 output stream.
Definition: base64ostream.h:30
OTest2::Base64OStream::~Base64OStream
virtual ~Base64OStream()
Dtor.
Definition: base64ostream.cpp:186
OTest2::Base64OStream::operator=
Base64OStream & operator=(const Base64OStream &)=delete
OTest2
Definition: assertbean.h:25
OTest2::Base64OStream::Buffer
Base64 output stream buffer.
Definition: base64ostream.cpp:33
OTest2::Base64OStream::Base64OStream
Base64OStream(std::ostream *decorated_, int line_length_=0)
Ctor.
Definition: base64ostream.cpp:179