This repository has been archived on 2025-03-27. You can view files and clone it, but cannot push or open issues or pull requests.

81 lines
1.3 KiB
C++

#include <cstdint>
#include "rawlist.h"
extern "C" struct Reference {
size_t type;
void* address;
};
namespace Type {
namespace Tag {
enum {
Null = 0x00,
Varying = 0x01,
Boolean = 0x02,
Natural = 0x10,
Integer = 0x11,
Decimal = 0x12,
Block = 0x1e,
Sequence = 0x1f,
Array = 0x22,
List = 0x23,
Sparse = 0x24,
Record = 0x7e,
Schema = 0x7f,
};
}
typedef bool Boolean;
typedef uint64_t Natural;
typedef int64_t Integer;
struct Sequence {
RawList data;
};
struct List {
RawList data;
};
struct Sparse {
struct Header {
size_t start;
size_t length;
size_t index;
Header() {
start = 0;
length = 0;
index = 0;
}
};
RawList data;
RawList header;
};
struct Schema {
struct Mapping {
size_t key;
size_t index;
};
RawList data;
RawList map;
};
struct SchemaBinding {
struct Row {
size_t type;
size_t offset;
};
size_t binding;
size_t alignment;
size_t size;
std::vector<Row> data;
};
}