Joedb 10.5.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
joedb::File_Buffer Class Reference

#include <joedb/journal/File_Buffer.h>

Inheritance diagram for joedb::File_Buffer:
Collaboration diagram for joedb::File_Buffer:

Public Member Functions

 File_Buffer (Abstract_File &file)
void flush ()
void set_position (int64_t position)
int64_t get_position () const noexcept
template<typename T>
void write (T x)
template<typename T>
T read ()
template<typename T>
void compact_write (T x)
template<typename T>
T compact_read ()
template<typename T>
T read_strong_type ()
void write_reference (Record_Id id)
Record_Id read_reference ()
void write_string (std::string_view s)
std::string read_string ()
std::string safe_read_string (int64_t max_size)
void write_blob (Blob blob)
Blob read_blob ()
void write_data (const char *data, size_t n)
size_t read_data (char *data, const size_t n)
void ignore (const int64_t n)
 ~File_Buffer ()
Public Member Functions inherited from joedb::File_Iterator
 File_Iterator (Abstract_File &file)
void seek (int64_t new_position) noexcept
int64_t get_position () const noexcept
size_t read (char *data, size_t size)
void full_read (char *data, size_t size)
void write (const char *data, size_t size)

Additional Inherited Members

Protected Attributes inherited from joedb::File_Iterator
Abstract_File & file

Detailed Description

Definition at line 14 of file File_Buffer.h.

Constructor & Destructor Documentation

◆ File_Buffer()

joedb::File_Buffer::File_Buffer ( Abstract_File & file)

Definition at line 7 of file File_Buffer.cpp.

◆ ~File_Buffer()

joedb::File_Buffer::~File_Buffer ( )

Definition at line 70 of file File_Buffer.cpp.

Member Function Documentation

◆ compact_read()

template<typename T>
T joedb::File_Buffer::compact_read ( )
inline

Definition at line 107 of file File_Buffer.h.

◆ compact_write()

template<typename T>
void joedb::File_Buffer::compact_write ( T x)
inline

Definition at line 99 of file File_Buffer.h.

◆ flush()

void joedb::File_Buffer::flush ( )

Definition at line 16 of file File_Buffer.cpp.

◆ get_position()

int64_t joedb::File_Buffer::get_position ( ) const
inlinenoexcept

Definition at line 75 of file File_Buffer.h.

◆ ignore()

void joedb::File_Buffer::ignore ( const int64_t n)
inline

Definition at line 210 of file File_Buffer.h.

◆ read()

template<typename T>
T joedb::File_Buffer::read ( )
inline

Definition at line 90 of file File_Buffer.h.

◆ read_blob()

Blob joedb::File_Buffer::read_blob ( )
inline

Definition at line 150 of file File_Buffer.h.

◆ read_data()

size_t joedb::File_Buffer::read_data ( char * data,
const size_t n )
inline

Definition at line 177 of file File_Buffer.h.

◆ read_reference()

Record_Id joedb::File_Buffer::read_reference ( )
inline

Definition at line 135 of file File_Buffer.h.

◆ read_string()

std::string joedb::File_Buffer::read_string ( )

Definition at line 46 of file File_Buffer.cpp.

◆ read_strong_type()

template<typename T>
T joedb::File_Buffer::read_strong_type ( )
inline

Definition at line 125 of file File_Buffer.h.

◆ safe_read_string()

std::string joedb::File_Buffer::safe_read_string ( int64_t max_size)

Definition at line 56 of file File_Buffer.cpp.

◆ set_position()

void joedb::File_Buffer::set_position ( int64_t position)

Definition at line 30 of file File_Buffer.cpp.

◆ write()

template<typename T>
void joedb::File_Buffer::write ( T x)
inline

Definition at line 81 of file File_Buffer.h.

◆ write_blob()

void joedb::File_Buffer::write_blob ( Blob blob)
inline

Definition at line 144 of file File_Buffer.h.

◆ write_data()

void joedb::File_Buffer::write_data ( const char * data,
size_t n )
inline

Definition at line 158 of file File_Buffer.h.

◆ write_reference()

void joedb::File_Buffer::write_reference ( Record_Id id)
inline

Definition at line 130 of file File_Buffer.h.

◆ write_string()

void joedb::File_Buffer::write_string ( std::string_view s)

Definition at line 38 of file File_Buffer.cpp.


The documentation for this class was generated from the following files: