CppCommon
1.0.4.1
C++ Common Library
include
common
writer.h
Go to the documentation of this file.
1
9
#ifndef CPPCOMMON_WRITER_H
10
#define CPPCOMMON_WRITER_H
11
12
#include <string>
13
#include <vector>
14
15
namespace
CppCommon
{
16
18
22
class
Writer
23
{
24
public
:
25
Writer
() noexcept = default;
26
Writer
(const
Writer
&) noexcept = default;
27
Writer
(
Writer
&&) noexcept = default;
28
virtual ~
Writer
() noexcept = default;
29
30
Writer
& operator=(const
Writer
&) noexcept = default;
31
Writer
& operator=(
Writer
&&) noexcept = default;
32
34
39
virtual
size_t
Write
(const
void
* buffer,
size_t
size) = 0;
40
42
46
size_t
Write
(const std::
string
& text);
48
52
size_t
Write
(const std::vector<std::
string
>& lines);
53
55
virtual
void
Flush
() {}
56
};
57
58
}
// namespace CppCommon
59
60
#endif
// CPPCOMMON_WRITER_H
CppCommon::Writer
Writer interface.
Definition:
writer.h:23
CppCommon::Writer::Write
virtual size_t Write(const void *buffer, size_t size)=0
Write a byte buffer base method.
CppCommon::Writer::Writer
Writer() noexcept=default
CppCommon::Writer::Flush
virtual void Flush()
Flush the writer.
Definition:
writer.h:55
CppCommon
C++ Common project definitions.
Definition:
token_bucket.h:15
Generated by
1.9.1