Reqrite project as BEd specific.

This commit is contained in:
2026-08-13 16:17:32 +01:00
parent cc5d475ab8
commit cd13557e15
46 changed files with 1115 additions and 1026 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
#include "buffer.h"
#include "pch.h"
namespace crib::internal::vase {
namespace bed::internal::vase {
struct AppendBuffer : Buffer {
char *buf = nullptr;
uint64_t allocated_capacity = 0;
@@ -22,4 +22,4 @@ struct AppendBuffer : Buffer {
private:
void grow(uint64_t len);
};
} // namespace crib::internal::vase
} // namespace bed::internal::vase
+2 -2
View File
@@ -2,10 +2,10 @@
#include "pch.h"
namespace crib::internal::vase {
namespace bed::internal::vase {
struct Buffer {
virtual const char *read(uint64_t pos) = 0;
virtual uint64_t length() = 0;
virtual ~Buffer() = default;
};
} // namespace crib::internal::vase
} // namespace bed::internal::vase
+2 -2
View File
@@ -3,7 +3,7 @@
#include "buffer.h"
#include "pch.h"
namespace crib::internal::vase {
namespace bed::internal::vase {
struct OriginalBuffer : Buffer {
const char *buf;
uint64_t len;
@@ -16,4 +16,4 @@ struct OriginalBuffer : Buffer {
const char *read(uint64_t pos) override;
uint64_t length() override;
};
} // namespace crib::internal::vase
} // namespace bed::internal::vase
+1 -1
View File
@@ -2,6 +2,6 @@
#include "pch.h"
namespace crib::internal::vase {
namespace bed::internal::vase {
constexpr uint64_t PETAL_SIZE_MAX = 32 * 1024;
}
-11
View File
@@ -1,11 +0,0 @@
#pragma once
#include "../shard.h"
#include "pch.h"
namespace crib::internal::vase {
enum struct Direction : uint8_t {
Forward,
Backward
};
}
+2 -2
View File
@@ -4,7 +4,7 @@
#include "pch.h"
#include "petal.h"
namespace crib::internal::vase {
namespace bed::internal::vase {
struct LineIterator {
PetalIterator it;
const char *chunk;
@@ -70,4 +70,4 @@ struct Iterator {
private:
LineIterator it;
};
} // namespace crib::internal::vase
} // namespace bed::internal::vase
+3 -3
View File
@@ -1,10 +1,10 @@
#pragma once
#include "../shard.h"
#include "iter.h"
#include "internal/generic.h"
#include "pch.h"
namespace crib::internal::vase {
namespace bed::internal::vase {
struct PetalIterator {
Direction dir;
Shard *root = nullptr;
@@ -26,4 +26,4 @@ struct PetalIterator {
private:
Petal *_next(uint64_t *offset);
};
} // namespace crib::internal::vase
} // namespace bed::internal::vase
+2 -2
View File
@@ -5,7 +5,7 @@
#include "constants.h"
#include "pch.h"
namespace crib::internal::vase {
namespace bed::internal::vase {
struct Shard {
enum struct Kind : uint8_t {
Branch,
@@ -63,4 +63,4 @@ struct Petal : Shard {
source(source), pos(pos) {};
};
} // namespace crib::internal::vase
} // namespace bed::internal::vase
+2 -2
View File
@@ -7,7 +7,7 @@
#include "pch.h"
#include "shard.h"
namespace crib::internal::vase {
namespace bed::internal::vase {
struct Point {
uint64_t row;
uint64_t col;
@@ -114,4 +114,4 @@ private:
std::string_view pattern, Range range, std::string_view options
);
};
} // namespace crib::internal::vase
} // namespace bed::internal::vase