Loading...
Searching...
No Matches
ForthInputBuffer.h
Go to the documentation of this file.
1// BSD 3-Clause License; see https://github.com/scikit-hep/awkward/blob/main/LICENSE
2
3#ifndef AWKWARD_FORTHINPUTBUFFER_H_
4#define AWKWARD_FORTHINPUTBUFFER_H_
5
6#include <memory>
7
8#include "awkward/common.h"
9#include "awkward/util.h"
10
11namespace awkward {
18 public:
20 ForthInputBuffer(const std::shared_ptr<void> ptr,
21 int64_t offset,
22 int64_t length);
23
25 uint8_t
26 peek_byte(int64_t after, util::ForthError& err) noexcept;
27
29 void*
30 read(int64_t num_bytes, util::ForthError& err) noexcept;
31
33 uint8_t
34 read_byte(util::ForthError& err) noexcept;
35
37 int64_t
38 read_enum(const std::vector<std::string>& strings, int64_t start, int64_t stop) noexcept;
39
41 uint64_t
42 read_varint(util::ForthError& err) noexcept;
43
45 int64_t
46 read_zigzag(util::ForthError& err) noexcept;
47
49 int64_t
50 read_textint(util::ForthError& err) noexcept;
51
53 double
54 read_textfloat(util::ForthError& err) noexcept;
55
57 void
58 read_quotedstr(char* string_buffer, int64_t max_string_size, int64_t& length,
59 util::ForthError& err) noexcept;
60
62 void
63 seek(int64_t to, util::ForthError& err) noexcept;
64
66 void
67 skip(int64_t num_bytes, util::ForthError& err) noexcept;
68
70 void
71 skipws() noexcept;
72
74 bool
75 end() const noexcept;
76
78 int64_t
79 pos() const noexcept;
80
82 int64_t
83 len() const noexcept;
84
86 std::shared_ptr<void>
87 ptr() noexcept;
88
89 private:
90 std::shared_ptr<void> ptr_;
91 int64_t offset_;
92 int64_t length_;
93 int64_t pos_;
94 };
95}
96
97#endif // AWKWARD_FORTHINPUTBUFFER_H_
HERE.
Definition ForthInputBuffer.h:17
uint8_t read_byte(util::ForthError &err) noexcept
HERE.
void seek(int64_t to, util::ForthError &err) noexcept
HERE.
int64_t read_enum(const std::vector< std::string > &strings, int64_t start, int64_t stop) noexcept
HERE.
void skip(int64_t num_bytes, util::ForthError &err) noexcept
HERE.
int64_t read_zigzag(util::ForthError &err) noexcept
HERE.
ForthInputBuffer(const std::shared_ptr< void > ptr, int64_t offset, int64_t length)
HERE.
double read_textfloat(util::ForthError &err) noexcept
HERE.
void read_quotedstr(char *string_buffer, int64_t max_string_size, int64_t &length, util::ForthError &err) noexcept
HERE.
void * read(int64_t num_bytes, util::ForthError &err) noexcept
HERE.
int64_t read_textint(util::ForthError &err) noexcept
HERE.
uint8_t peek_byte(int64_t after, util::ForthError &err) noexcept
HERE.
void skipws() noexcept
HERE.
uint64_t read_varint(util::ForthError &err) noexcept
HERE.
#define EXPORT_SYMBOL
Definition common.h:25
Definition ArrayBuilder.h:14