aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/stream.h
blob: a61e4f21fc9a669083f98898c5f15c204c701e5e (plain)
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
/* This file is part of the sirit project.
 * Copyright (c) 2018 ReinUsesLisp
 * This software may be used and distributed according to the terms of the GNU
 * Lesser General Public License version 3 or any later version.
 */

#pragma once

#include <string_view>
#include <vector>
#include "common_types.h"

namespace Sirit {

class Stream {
public:
    explicit Stream(std::vector<u8>& bytes);
    ~Stream();

    void Write(std::string_view string);

    void Write(u64 value);

    void Write(u32 value);

    void Write(u16 value);

    void Write(u8 value);

private:
    std::vector<u8>& bytes;
};

} // namespace Sirit