maintains a set of indexed objects that can be modified with multi-level rollback support
More...
#include <object_database.hpp>
|
| object_database () |
|
virtual | ~object_database ()=default |
|
void | reset_indexes () |
|
void | open (const fc::path &data_dir) |
|
void | flush () |
|
void | wipe (const fc::path &data_dir) |
|
void | close () |
|
template<typename T , typename F > |
const T & | create (F &&constructor) |
|
const object & | get_object (const object_id_type &id) const |
|
const object * | find_object (const object_id_type &id) const |
|
template<typename T > |
const T & | get (const object_id_type &id) const |
|
template<typename T > |
const T * | find (const object_id_type &id) const |
|
template<uint8_t SpaceID, uint8_t TypeID> |
auto | find (const object_id< SpaceID, TypeID > &id) const -> const object_downcast_t< decltype(id)> * |
|
template<uint8_t SpaceID, uint8_t TypeID> |
auto | get (const object_id< SpaceID, TypeID > &id) const -> const object_downcast_t< decltype(id)> & |
|
template<typename IndexType > |
IndexType * | add_index () |
|
template<typename IndexType , typename SecondaryIndexType , typename... Args> |
SecondaryIndexType * | add_secondary_index (Args... args) |
|
void | pop_undo () |
|
fc::path | get_data_dir () const |
|
|
template<typename IndexType > |
const IndexType & | get_index_type () const |
|
template<typename T > |
const index & | get_index () const |
|
const index & | get_index (uint8_t space_id, uint8_t type_id) const |
|
const index & | get_index (const object_id_type &id) const |
|
|
const object & | insert (object &&obj) |
|
void | remove (const object &obj) |
|
template<typename T , typename Lambda > |
void | modify (const T &obj, const Lambda &m) |
|
|
template<typename T > |
static const T & | cast (const object &obj) |
|
template<typename T > |
static T & | cast (object &obj) |
|
maintains a set of indexed objects that can be modified with multi-level rollback support
Definition at line 39 of file object_database.hpp.
◆ object_database()
graphene::db::object_database::object_database |
( |
| ) |
|
◆ ~object_database()
virtual graphene::db::object_database::~object_database |
( |
| ) |
|
|
virtualdefault |
◆ add_index()
template<typename IndexType >
IndexType* graphene::db::object_database::add_index |
( |
| ) |
|
|
inline |
◆ add_secondary_index()
template<typename IndexType , typename SecondaryIndexType , typename... Args>
SecondaryIndexType* graphene::db::object_database::add_secondary_index |
( |
Args... |
args | ) |
|
|
inline |
◆ cast() [1/2]
template<typename T >
static const T& graphene::db::object_database::cast |
( |
const object & |
obj | ) |
|
|
inlinestatic |
◆ cast() [2/2]
template<typename T >
static T& graphene::db::object_database::cast |
( |
object & |
obj | ) |
|
|
inlinestatic |
◆ close()
void graphene::db::object_database::close |
( |
| ) |
|
◆ create()
template<typename T , typename F >
const T& graphene::db::object_database::create |
( |
F && |
constructor | ) |
|
|
inline |
◆ find() [1/2]
template<uint8_t SpaceID, uint8_t TypeID>
auto graphene::db::object_database::find |
( |
const object_id< SpaceID, TypeID > & |
id | ) |
const -> const object_downcast_t<decltype(id)>* |
|
inline |
◆ find() [2/2]
template<typename T >
const T* graphene::db::object_database::find |
( |
const object_id_type & |
id | ) |
const |
|
inline |
◆ find_object()
◆ flush()
void graphene::db::object_database::flush |
( |
| ) |
|
◆ get() [1/2]
template<uint8_t SpaceID, uint8_t TypeID>
auto graphene::db::object_database::get |
( |
const object_id< SpaceID, TypeID > & |
id | ) |
const -> const object_downcast_t<decltype(id)>& |
|
inline |
◆ get() [2/2]
template<typename T >
const T& graphene::db::object_database::get |
( |
const object_id_type & |
id | ) |
const |
|
inline |
◆ get_data_dir()
fc::path graphene::db::object_database::get_data_dir |
( |
| ) |
const |
|
inline |
◆ get_index() [1/3]
template<typename T >
const index& graphene::db::object_database::get_index |
( |
| ) |
const |
|
inline |
◆ get_index() [2/3]
◆ get_index() [3/3]
const index & graphene::db::object_database::get_index |
( |
uint8_t |
space_id, |
|
|
uint8_t |
type_id |
|
) |
| const |
◆ get_index_type()
template<typename IndexType >
const IndexType& graphene::db::object_database::get_index_type |
( |
| ) |
const |
|
inline |
◆ get_mutable_index() [1/3]
template<typename T >
index& graphene::db::object_database::get_mutable_index |
( |
| ) |
|
|
inlineprotected |
◆ get_mutable_index() [2/3]
◆ get_mutable_index() [3/3]
index & graphene::db::object_database::get_mutable_index |
( |
uint8_t |
space_id, |
|
|
uint8_t |
type_id |
|
) |
| |
|
protected |
◆ get_mutable_index_type()
template<typename IndexType >
IndexType& graphene::db::object_database::get_mutable_index_type |
( |
| ) |
|
|
inlineprotected |
◆ get_object()
◆ insert()
const object& graphene::db::object_database::insert |
( |
object && |
obj | ) |
|
|
inline |
◆ modify()
template<typename T , typename Lambda >
void graphene::db::object_database::modify |
( |
const T & |
obj, |
|
|
const Lambda & |
m |
|
) |
| |
|
inline |
◆ open()
void graphene::db::object_database::open |
( |
const fc::path & |
data_dir | ) |
|
◆ pop_undo()
void graphene::db::object_database::pop_undo |
( |
| ) |
|
◆ remove()
void graphene::db::object_database::remove |
( |
const object & |
obj | ) |
|
|
inline |
◆ reset_indexes()
void graphene::db::object_database::reset_indexes |
( |
| ) |
|
|
inline |
◆ wipe()
void graphene::db::object_database::wipe |
( |
const fc::path & |
data_dir | ) |
|
◆ base_primary_index
◆ undo_database
◆ _index_size
constexpr uint8_t graphene::db::object_database::_index_size = 255 |
|
staticconstexpr |
◆ _undo_db
public for testing purposes only... should be private in practice.
Definition at line 170 of file object_database.hpp.
The documentation for this class was generated from the following files: