Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::crypto::merkle_tree::MemoryStore Class Reference

#include <memory_store.hpp>

Public Member Functions

 MemoryStore ()
 
 MemoryStore (MemoryStore const &rhs)=default
 
 MemoryStore (MemoryStore &&rhs)=default
 
MemoryStoreoperator= (MemoryStore const &rhs)=default
 
MemoryStoreoperator= (MemoryStore &&rhs)=default
 
bool put (std::vector< uint8_t > const &key, std::vector< uint8_t > const &value)
 
bool put (std::string const &key, std::vector< uint8_t > const &value)
 
bool del (std::vector< uint8_t > const &key)
 
bool get (std::vector< uint8_t > const &key, std::vector< uint8_t > &value)
 
bool get (std::string const &key, std::vector< uint8_t > &value)
 
void commit ()
 
void rollback ()
 

Private Member Functions

std::string to_string (std::vector< uint8_t > const &input)
 

Private Attributes

std::map< std::string, std::string > store_
 
std::map< std::string, std::string > puts_
 
std::set< std::string > deletes_
 

Detailed Description

Definition at line 15 of file memory_store.hpp.

Constructor & Destructor Documentation

◆ MemoryStore() [1/3]

bb::crypto::merkle_tree::MemoryStore::MemoryStore ( )
inline

Definition at line 17 of file memory_store.hpp.

◆ MemoryStore() [2/3]

bb::crypto::merkle_tree::MemoryStore::MemoryStore ( MemoryStore const rhs)
default

◆ MemoryStore() [3/3]

bb::crypto::merkle_tree::MemoryStore::MemoryStore ( MemoryStore &&  rhs)
default

Member Function Documentation

◆ commit()

void bb::crypto::merkle_tree::MemoryStore::commit ( )
inline

Definition at line 67 of file memory_store.hpp.

◆ del()

bool bb::crypto::merkle_tree::MemoryStore::del ( std::vector< uint8_t > const key)
inline

Definition at line 37 of file memory_store.hpp.

◆ get() [1/2]

bool bb::crypto::merkle_tree::MemoryStore::get ( std::string const &  key,
std::vector< uint8_t > &  value 
)
inline

Definition at line 47 of file memory_store.hpp.

◆ get() [2/2]

bool bb::crypto::merkle_tree::MemoryStore::get ( std::vector< uint8_t > const &  key,
std::vector< uint8_t > &  value 
)
inline

Definition at line 45 of file memory_store.hpp.

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ put() [1/2]

bool bb::crypto::merkle_tree::MemoryStore::put ( std::string const key,
std::vector< uint8_t > const value 
)
inline

Definition at line 30 of file memory_store.hpp.

◆ put() [2/2]

bool bb::crypto::merkle_tree::MemoryStore::put ( std::vector< uint8_t > const key,
std::vector< uint8_t > const value 
)
inline

Definition at line 24 of file memory_store.hpp.

◆ rollback()

void bb::crypto::merkle_tree::MemoryStore::rollback ( )
inline

Definition at line 79 of file memory_store.hpp.

◆ to_string()

std::string bb::crypto::merkle_tree::MemoryStore::to_string ( std::vector< uint8_t > const input)
inlineprivate

Definition at line 86 of file memory_store.hpp.

Member Data Documentation

◆ deletes_

std::set<std::string> bb::crypto::merkle_tree::MemoryStore::deletes_
private

Definition at line 90 of file memory_store.hpp.

◆ puts_

std::map<std::string, std::string> bb::crypto::merkle_tree::MemoryStore::puts_
private

Definition at line 89 of file memory_store.hpp.

◆ store_

std::map<std::string, std::string> bb::crypto::merkle_tree::MemoryStore::store_
private

Definition at line 88 of file memory_store.hpp.


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