namespace vase.

This commit is contained in:
2026-08-06 20:36:14 +01:00
parent 0720a254a3
commit 04a27b30aa
18 changed files with 39 additions and 11 deletions
+2
View File
@@ -4,6 +4,7 @@
#include "buffer.h"
#include "pch.h"
namespace crib::internal::vase {
struct AppendBuffer : Buffer {
char *buf = nullptr;
uint64_t allocated_capacity = 0;
@@ -21,3 +22,4 @@ struct AppendBuffer : Buffer {
private:
void grow(uint64_t len);
};
} // namespace crib::internal::vase
+2
View File
@@ -2,8 +2,10 @@
#include "pch.h"
namespace crib::internal::vase {
struct Buffer {
virtual const char *read(uint64_t pos) = 0;
virtual uint64_t length() = 0;
virtual ~Buffer() = default;
};
} // namespace crib::internal::vase
+2
View File
@@ -3,6 +3,7 @@
#include "buffer.h"
#include "pch.h"
namespace crib::internal::vase {
struct OriginalBuffer : Buffer {
const char *buf;
uint64_t len;
@@ -15,3 +16,4 @@ struct OriginalBuffer : Buffer {
const char *read(uint64_t pos) override;
uint64_t length() override;
};
} // namespace crib::internal::vase