Joedb 10.2.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Public Member Functions | List of all members
joedb::File_Buffer Class Reference

#include <joedb/journal/File_Buffer.h>

Inheritance diagram for joedb::File_Buffer:
Inheritance graph
[legend]
Collaboration diagram for joedb::File_Buffer:
Collaboration graph
[legend]

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 >
read ()
 
template<typename T >
void compact_write (T x)
 
template<typename T >
compact_read ()
 
template<typename T >
read_strong_type ()
 
void write_reference (Record_Id id)
 
Record_Id read_reference ()
 
void write_string (const std::string &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 write (const char *data, size_t size)
 

Additional Inherited Members

- Protected Attributes inherited from joedb::File_Iterator
Abstract_Filefile
 

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 ( 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 226 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 146 of file File_Buffer.h.

◆ read_data()

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

Definition at line 184 of file File_Buffer.h.

◆ read_reference()

Record_Id joedb::File_Buffer::read_reference ( )
inline

Definition at line 131 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 121 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 ( 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 140 of file File_Buffer.h.

◆ write_data()

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

Definition at line 154 of file File_Buffer.h.

◆ write_reference()

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

Definition at line 126 of file File_Buffer.h.

◆ write_string()

void joedb::File_Buffer::write_string ( const std::string &  s)

Definition at line 38 of file File_Buffer.cpp.


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