BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface 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 ()
 
virtual ~direct_index ()
 
virtual void object_inserted (const object &obj)
 
virtual void object_removed (const object &obj)
 
virtual void about_to_modify (const object &before)
 
virtual void object_modified (const object &after)
 
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 ()
 

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 205 of file index.hpp.

Constructor & Destructor Documentation

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

Definition at line 217 of file index.hpp.

template<typename Object, uint8_t chunkbits>
virtual graphene::db::direct_index< Object, chunkbits >::~direct_index ( )
inlinevirtual

Definition at line 221 of file index.hpp.

Member Function Documentation

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

Reimplemented from graphene::db::secondary_index.

Definition at line 264 of file index.hpp.

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 276 of file index.hpp.

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 292 of file index.hpp.

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 285 of file index.hpp.

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

Reimplemented from graphene::db::secondary_index.

Definition at line 223 of file index.hpp.

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

Reimplemented from graphene::db::secondary_index.

Definition at line 269 of file index.hpp.

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

Reimplemented from graphene::db::secondary_index.

Definition at line 255 of file index.hpp.


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