Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions | Protected Member Functions | Protected Attributes
caffe2::db::DB Class Referenceabstract

An abstract class for accessing a database of key-value pairs. More...

#include <db.h>

Inheritance diagram for caffe2::db::DB:
caffe2::db::LevelDB caffe2::db::LMDB caffe2::db::MiniDB caffe2::db::ProtoDB caffe2::db::RocksDB caffe2::db::ZmqDB

Public Member Functions

 DB (const string &source, Mode mode)
 
virtual void Close ()=0
 Closes the database.
 
virtual std::unique_ptr< CursorNewCursor ()=0
 Returns a cursor to read the database. More...
 
virtual std::unique_ptr< TransactionNewTransaction ()=0
 Returns a transaction to write data to the database. More...
 

Protected Member Functions

 DISABLE_COPY_AND_ASSIGN (DB)
 

Protected Attributes

Mode mode_
 

Detailed Description

An abstract class for accessing a database of key-value pairs.

Definition at line 80 of file db.h.

Member Function Documentation

◆ NewCursor()

virtual std::unique_ptr<Cursor> caffe2::db::DB::NewCursor ( )
pure virtual

Returns a cursor to read the database.

The caller takes the ownership of the pointer.

Implemented in caffe2::db::MiniDB, caffe2::db::LMDB, caffe2::db::ZmqDB, caffe2::db::ProtoDB, caffe2::db::RocksDB, and caffe2::db::LevelDB.

◆ NewTransaction()

virtual std::unique_ptr<Transaction> caffe2::db::DB::NewTransaction ( )
pure virtual

Returns a transaction to write data to the database.

The caller takes the ownership of the pointer.

Implemented in caffe2::db::MiniDB, caffe2::db::LMDB, caffe2::db::ZmqDB, caffe2::db::ProtoDB, caffe2::db::RocksDB, and caffe2::db::LevelDB.


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