aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream/tempbuf.h
blob: 71a2a08d84edd11696e171bb2bf8860b67d4212a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include "output.h"

#include <util/memory/tempbuf.h>

class TTempBufOutput: public IOutputStream, public TTempBuf {
public: 
    inline TTempBufOutput() = default;
 
    explicit TTempBufOutput(size_t size)
        : TTempBuf(size)
    {
    }

    TTempBufOutput(TTempBufOutput&&) noexcept = default;
    TTempBufOutput& operator=(TTempBufOutput&&) noexcept = default;
 
protected:
    void DoWrite(const void* data, size_t len) override;
};