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

An abstract class for the cursor of the database while reading. More...

#include <db.h>

Inheritance diagram for caffe2::db::Cursor:
caffe2::db::BlobsQueueDBCursor caffe2::db::LevelDBCursor caffe2::db::LMDBCursor caffe2::db::MiniDBCursor caffe2::db::ProtoDBCursor caffe2::db::RocksDBCursor caffe2::db::ZmqDBCursor

Public Member Functions

virtual void Seek (const string &key)=0
 Seek to a specific key (or if the key does not exist, seek to the immediate next). More...
 
virtual bool SupportsSeek ()
 
virtual void SeekToFirst ()=0
 Seek to the first key in the database.
 
virtual void Next ()=0
 Go to the next location in the database.
 
virtual string key ()=0
 Returns the current key.
 
virtual string value ()=0
 Returns the current value.
 
virtual bool Valid ()=0
 Returns whether the current location is valid - for example, if we have reached the end of the database, return false.
 
 C10_DISABLE_COPY_AND_ASSIGN (Cursor)
 

Detailed Description

An abstract class for the cursor of the database while reading.

Definition at line 22 of file db.h.

Member Function Documentation

virtual void caffe2::db::Cursor::Seek ( const string &  key)
pure virtual

Seek to a specific key (or if the key does not exist, seek to the immediate next).

This is optional for dbs, and in default, SupportsSeek() returns false meaning that the db cursor does not support it.

Implemented in caffe2::db::BlobsQueueDBCursor, caffe2::db::RocksDBCursor, caffe2::db::LMDBCursor, caffe2::db::ZmqDBCursor, caffe2::db::MiniDBCursor, caffe2::db::LevelDBCursor, and caffe2::db::ProtoDBCursor.


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