BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Member Functions | List of all members
graphene::db::direct_index< Object, chunkbits > Class Template Reference

A secondary index that tracks objects in vectors indexed by object id. It is meant for fully (or almost fully) populated indexes only (will fail when loading an object_database with large gaps). More...

#include <index.hpp>

Inheritance diagram for graphene::db::direct_index< Object, chunkbits >:
graphene::db::secondary_index

Public Member Functions

 direct_index ()
 
void object_inserted (const object &obj) override
 
void object_removed (const object &obj) override
 
void about_to_modify (const object &before) override
 
void object_modified (const object &after) override
 
template<typename object_id >
const Object * find (const object_id &id) const
 
template<typename object_id >
const Object & get (const object_id &id) const
 
const Object * find (const object_id_type &id) const
 
- Public Member Functions inherited from graphene::db::secondary_index
virtual ~secondary_index ()=default
 

Detailed Description

template<typename Object, uint8_t chunkbits>
class graphene::db::direct_index< Object, chunkbits >

A secondary index that tracks objects in vectors indexed by object id. It is meant for fully (or almost fully) populated indexes only (will fail when loading an object_database with large gaps).

WARNING! If any of the methods called on insertion, removal or modification throws, subsequent behaviour is undefined! Such exceptions indicate that this index type is not appropriate for the use-case.

Definition at line 207 of file index.hpp.

Constructor & Destructor Documentation

◆ direct_index()

template<typename Object , uint8_t chunkbits>
graphene::db::direct_index< Object, chunkbits >::direct_index ( )
inline

Definition at line 219 of file index.hpp.

Member Function Documentation

◆ about_to_modify()

template<typename Object , uint8_t chunkbits>
void graphene::db::direct_index< Object, chunkbits >::about_to_modify ( const object before)
inlineoverridevirtual

Reimplemented from graphene::db::secondary_index.

Definition at line 267 of file index.hpp.

◆ find() [1/2]

template<typename Object , uint8_t chunkbits>
template<typename object_id >
const Object* graphene::db::direct_index< Object, chunkbits >::find ( const object_id id) const
inline

Definition at line 279 of file index.hpp.

◆ find() [2/2]

template<typename Object , uint8_t chunkbits>
const Object* graphene::db::direct_index< Object, chunkbits >::find ( const object_id_type id) const
inline

Definition at line 295 of file index.hpp.

◆ get()

template<typename Object , uint8_t chunkbits>
template<typename object_id >
const Object& graphene::db::direct_index< Object, chunkbits >::get ( const object_id id) const
inline

Definition at line 288 of file index.hpp.

◆ object_inserted()

template<typename Object , uint8_t chunkbits>
void graphene::db::direct_index< Object, chunkbits >::object_inserted ( const object obj)
inlineoverridevirtual

Reimplemented from graphene::db::secondary_index.

Definition at line 223 of file index.hpp.

◆ object_modified()

template<typename Object , uint8_t chunkbits>
void graphene::db::direct_index< Object, chunkbits >::object_modified ( const object after)
inlineoverridevirtual

Reimplemented from graphene::db::secondary_index.

Definition at line 272 of file index.hpp.

◆ object_removed()

template<typename Object , uint8_t chunkbits>
void graphene::db::direct_index< Object, chunkbits >::object_removed ( const object obj)
inlineoverridevirtual

Reimplemented from graphene::db::secondary_index.

Definition at line 257 of file index.hpp.


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