BitShares-Core  7.0.0
BitShares blockchain node software and command-line wallet software
Public Member Functions | Protected Attributes | List of all members
graphene::db::base_primary_index Class Reference

#include <index.hpp>

Inheritance diagram for graphene::db::base_primary_index:
graphene::db::primary_index< DerivedIndex, DirectBits > graphene::db::primary_index< graphene::db::generic_index >

Public Member Functions

 base_primary_index (object_database &db)
virtual ~base_primary_index ()=default
void save_undo (const object &obj)
void on_add (const object &obj)
void on_remove (const object &obj)
void on_modify (const object &obj)
template<typename T , typename... Args>
T * add_secondary_index (Args... args)
template<typename T >
const T & get_secondary_index () const

Protected Attributes

std::vector< std::shared_ptr< index_observer > > _observers
std::vector< std::unique_ptr< secondary_index > > _sindex

Detailed Description

Defines the common implementation

Definition at line 152 of file index.hpp.

Constructor & Destructor Documentation

◆ base_primary_index()

graphene::db::base_primary_index::base_primary_index ( object_database db)

Definition at line 155 of file index.hpp.

◆ ~base_primary_index()

virtual graphene::db::base_primary_index::~base_primary_index ( )

Member Function Documentation

◆ add_secondary_index()

template<typename T , typename... Args>
T* graphene::db::base_primary_index::add_secondary_index ( Args...  args)

Definition at line 172 of file index.hpp.

◆ get_secondary_index()

template<typename T >
const T& graphene::db::base_primary_index::get_secondary_index ( ) const

Definition at line 179 of file index.hpp.

◆ on_add()

void graphene::db::base_primary_index::on_add ( const object obj)

called just after the object is added

Definition at line 32 of file index.cpp.

◆ on_modify()

void graphene::db::base_primary_index::on_modify ( const object obj)

called just after obj is modified

Definition at line 41 of file index.cpp.

◆ on_remove()

void graphene::db::base_primary_index::on_remove ( const object obj)

called just before obj is removed

Definition at line 38 of file index.cpp.

◆ save_undo()

void graphene::db::base_primary_index::save_undo ( const object obj)

called just before obj is modified

Definition at line 29 of file index.cpp.

Member Data Documentation

◆ _observers

std::vector< std::shared_ptr<index_observer> > graphene::db::base_primary_index::_observers

Definition at line 190 of file index.hpp.

◆ _sindex

std::vector< std::unique_ptr<secondary_index> > graphene::db::base_primary_index::_sindex

Definition at line 191 of file index.hpp.

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