Joedb 9.5.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Blob.h
Go to the documentation of this file.
1#ifndef joedb_Blob_declared
2#define joedb_Blob_declared
3
4#include <stdint.h>
5
6namespace joedb
7{
8 /// @ingroup joedb
9 class Blob
10 {
11 private:
12 int64_t position;
13 int64_t size;
14
15 public:
16 explicit Blob(int64_t position, int64_t size):
17 position(position),
18 size(size)
19 {
20 }
21
22 Blob(): Blob(0, 0)
23 {
24 }
25
26 bool is_null() const {return position == 0;}
27 bool operator<(Blob blob) const {return position < blob.position;}
28
29 int64_t get_position() const noexcept {return position;}
30 int64_t get_size() const noexcept {return size;}
31 int64_t get_end() const noexcept {return position + size;}
32 };
33}
34
35#endif
Blob(int64_t position, int64_t size)
Definition Blob.h:16
bool is_null() const
Definition Blob.h:26
int64_t get_position() const noexcept
Definition Blob.h:29
int64_t get_end() const noexcept
Definition Blob.h:31
bool operator<(Blob blob) const
Definition Blob.h:27
int64_t get_size() const noexcept
Definition Blob.h:30
Definition Blob.h:7