Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::testing::chainbase_fixture< MAX_SIZE > Struct Template Reference

#include <chainbase_fixture.hpp>

Collaboration diagram for sysio::testing::chainbase_fixture< MAX_SIZE >:

Public Member Functions

 chainbase_fixture ()
 
 ~chainbase_fixture ()
 

Public Attributes

fc::temp_directory _tempdir
 
std::unique_ptr< chainbase::database_db
 

Detailed Description

template<uint64_t MAX_SIZE>
struct sysio::testing::chainbase_fixture< MAX_SIZE >

Utility class to create and tear down a temporary chainbase::database using RAII

Template Parameters
MAX_SIZE- the maximum size of the chainbase::database

Definition at line 14 of file chainbase_fixture.hpp.

Constructor & Destructor Documentation

◆ chainbase_fixture()

template<uint64_t MAX_SIZE>
sysio::testing::chainbase_fixture< MAX_SIZE >::chainbase_fixture ( )
inline

Definition at line 15 of file chainbase_fixture.hpp.

16 : _tempdir()
17 , _db(std::make_unique<chainbase::database>(_tempdir.path(), chainbase::database::read_write, MAX_SIZE))
18 {
19 }
const fc::path & path() const
std::unique_ptr< chainbase::database > _db

◆ ~chainbase_fixture()

template<uint64_t MAX_SIZE>
sysio::testing::chainbase_fixture< MAX_SIZE >::~chainbase_fixture ( )
inline

Definition at line 21 of file chainbase_fixture.hpp.

22 {
23 _db.reset();
25 }
Here is the call graph for this function:

Member Data Documentation

◆ _db

template<uint64_t MAX_SIZE>
std::unique_ptr<chainbase::database> sysio::testing::chainbase_fixture< MAX_SIZE >::_db

Definition at line 28 of file chainbase_fixture.hpp.

◆ _tempdir

template<uint64_t MAX_SIZE>
fc::temp_directory sysio::testing::chainbase_fixture< MAX_SIZE >::_tempdir

Definition at line 27 of file chainbase_fixture.hpp.


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