Joedb 9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Macros
Readonly_Journal.cpp File Reference
#include "joedb/journal/Readonly_Journal.h"
#include "joedb/journal/Buffered_File.h"
#include "joedb/error/Exception.h"
#include <vector>
#include "joedb/TYPE_MACRO.h"
Include dependency graph for Readonly_Journal.cpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TYPE_MACRO(cpp_type, return_type, type_id, read_method, W)
 
#define TYPE_MACRO(cpp_type, return_type, type_id, read_method, W)
 
#define TYPE_MACRO(cpp_type, return_type, type_id, read_method, W)
 
#define TYPE_MACRO(cpp_type, return_type, type_id, read_method, W)
 
#define TYPE_MACRO_NO_INT
 
#define TYPE_MACRO_NO_FLOAT
 
#define TYPE_MACRO(cpp_type, return_type, type_id, read_method, W)
 
#define TYPE_MACRO_NO_STRING
 
#define TYPE_MACRO_NO_REFERENCE
 
#define TYPE_MACRO_NO_BLOB
 

Macro Definition Documentation

◆ TYPE_MACRO [1/5]

#define TYPE_MACRO (   cpp_type,
  return_type,
  type_id,
  read_method,
 
)
Value:
void joedb::Readonly_Journal::perform_update_##type_id(Writable &writable)\
{\
const cpp_type value = read_method();\
writable.update_##type_id\
(\
table_of_last_operation,\
record_of_last_operation,\
field_of_last_update,\
value\
);\
}

Definition at line 14 of file Readonly_Journal.cpp.

◆ TYPE_MACRO [2/5]

#define TYPE_MACRO (   cpp_type,
  return_type,
  type_id,
  read_method,
 
)
Value:
case operation_t::update_##type_id:\
table_of_last_operation = file.read_strong_type<Table_Id>();\
record_of_last_operation = file.read_strong_type<Record_Id>();\
field_of_last_update = file.read_strong_type<Field_Id>();\
perform_update_##type_id(writable);\
break;\
\
case operation_t::update_last_##type_id:\
field_of_last_update = file.read_strong_type<Field_Id>();\
perform_update_##type_id(writable);\
break;\
\
case operation_t::update_next_##type_id:\
++record_of_last_operation;\
perform_update_##type_id(writable);\
break;

Definition at line 14 of file Readonly_Journal.cpp.

◆ TYPE_MACRO [3/5]

#define TYPE_MACRO (   cpp_type,
  return_type,
  type_id,
  read_method,
 
)

Definition at line 14 of file Readonly_Journal.cpp.

◆ TYPE_MACRO [4/5]

#define TYPE_MACRO (   cpp_type,
  return_type,
  type_id,
  read_method,
 
)
Value:
void joedb::Readonly_Journal::read_vector_of_##type_id(cpp_type *data, size_t size)\
{\
for (size_t i = 0; i < size; i++)\
data[i] = read_method();\
}

Definition at line 14 of file Readonly_Journal.cpp.

◆ TYPE_MACRO [5/5]

#define TYPE_MACRO (   cpp_type,
  return_type,
  type_id,
  read_method,
 
)
Value:
void joedb::Readonly_Journal::read_vector_of_##type_id(cpp_type *data, size_t size)\
{\
file.read_data((char *)data, size * sizeof(cpp_type));\
}

Definition at line 14 of file Readonly_Journal.cpp.

◆ TYPE_MACRO_NO_BLOB

#define TYPE_MACRO_NO_BLOB

Definition at line 438 of file Readonly_Journal.cpp.

◆ TYPE_MACRO_NO_FLOAT

#define TYPE_MACRO_NO_FLOAT

Definition at line 428 of file Readonly_Journal.cpp.

◆ TYPE_MACRO_NO_INT

#define TYPE_MACRO_NO_INT

Definition at line 427 of file Readonly_Journal.cpp.

◆ TYPE_MACRO_NO_REFERENCE

#define TYPE_MACRO_NO_REFERENCE

Definition at line 437 of file Readonly_Journal.cpp.

◆ TYPE_MACRO_NO_STRING

#define TYPE_MACRO_NO_STRING

Definition at line 436 of file Readonly_Journal.cpp.