aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream/null.cpp
blob: 54ae12e8949162d13e2b0fc935f0cebf070ad5a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "null.h"

#include <util/generic/singleton.h>

TNullIO& NPrivate::StdNullStream() noexcept { 
    return *SingletonWithPriority<TNullIO, 4>();
}

TNullInput::TNullInput() noexcept { 
}

TNullInput::~TNullInput() = default;

size_t TNullInput::DoRead(void*, size_t) {
    return 0;
}

size_t TNullInput::DoSkip(size_t) {
    return 0;
}

size_t TNullInput::DoNext(const void**, size_t) {
    return 0;
}

TNullOutput::TNullOutput() noexcept = default; 

TNullOutput::~TNullOutput() = default;

void TNullOutput::DoWrite(const void* /*buf*/, size_t /*len*/) {
}

TNullIO::TNullIO() noexcept { 
}

TNullIO::~TNullIO() = default;