NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
be_io_sqliterecstore.h
Go to the documentation of this file.
1/*
2 * This software was developed at the National Institute of Standards and
3 * Technology (NIST) by employees of the Federal Government in the course
4 * of their official duties. Pursuant to title 17 Section 105 of the
5 * United States Code, this software is not subject to copyright protection
6 * and is in the public domain. NIST assumes no responsibility whatsoever for
7 * its use by other parties, and makes no guarantees, expressed or implied,
8 * about its quality, reliability, or any other characteristic.
9 */
10
11#ifndef __BE_IO_SQLITERECORDSTORE_H__
12#define __BE_IO_SQLITERECORDSTORE_H__
13
14#include <be_io_recordstore.h>
15
16namespace BiometricEvaluation
17{
18 namespace IO
19 {
26 {
27 public:
29 const std::string &pathname,
30 const std::string &description);
31
33 const std::string &pathname,
35
36 /*
37 * We need the base class insert() and replace() as well
38 * otherwise, they are hidden by the declarations below.
39 */
42
43 void
45 const std::string &pathname)
46 override;
47
48 void sync() const override;
49 unsigned int getCount() const override;
50 std::string getPathname() const override;
51 std::string getDescription() const override;
52
53 void
55 const std::string &description)
56 override;
57
58 uint64_t
59 getSpaceUsed() const override;
60
61 void
63 const std::string &key,
64 const void *const data,
65 const uint64_t size)
66 override;
67
68 void
70 const std::string &key)
71 override;
72
75 const std::string &key) const override;
76
77 uint64_t
79 const std::string &key) const override;
80
81 void
83 const std::string &key) const override;
84
87 int cursor = BE_RECSTORE_SEQ_NEXT)
88 override;
89
90 std::string
92 int cursor = BE_RECSTORE_SEQ_NEXT)
93 override;
94
95 void
97 const std::string &key)
98 override;
99
101
105 const SQLiteRecordStore&) = delete;
106
107 protected:
108 private:
109 class Impl;
110 std::unique_ptr<SQLiteRecordStore::Impl> pimpl;
111 };
112 }
113}
114#endif /* __BE_IO_SQLITERECORDSTORE_H__ */
A class to represent a data storage mechanism.
virtual void insert(const std::string &key, const Memory::uint8Array &data)
Insert a record into the store.
static const int BE_RECSTORE_SEQ_NEXT
Tell sequence to sequence from current position.
virtual void replace(const std::string &key, const Memory::uint8Array &data)
Replace a complete record in a RecordStore.
An IO::RecordStore implementation using a SQLite database as the underlying record storage system.
SQLiteRecordStore(const std::string &pathname, IO::Mode mode=Mode::ReadOnly)
SQLiteRecordStore(const SQLiteRecordStore &)=delete
unsigned int getCount() const override
Obtain the number of items in the RecordStore.
SQLiteRecordStore(const std::string &pathname, const std::string &description)
uint64_t length(const std::string &key) const override
Return the length of a record.
void remove(const std::string &key) override
Remove a record from the store.
void flush(const std::string &key) const override
Commit the record's data to storage.
RecordStore::Record sequence(int cursor=BE_RECSTORE_SEQ_NEXT) override
Sequence through a RecordStore, returning the key/data pairs.
std::string sequenceKey(int cursor=BE_RECSTORE_SEQ_NEXT) override
Sequence through a RecordStore, returning the key.
void changeDescription(const std::string &description) override
Change the description of the RecordStore.
SQLiteRecordStore & operator=(const SQLiteRecordStore &)=delete
void insert(const std::string &key, const void *const data, const uint64_t size) override
Insert a record into the store.
std::string getPathname() const override
Return the path name of the RecordStore.
std::string getDescription() const override
Obtain a textual description of the RecordStore.
void move(const std::string &pathname) override
Move the RecordStore.
uint64_t getSpaceUsed() const override
Obtain real storage utilization.
void setCursorAtKey(const std::string &key) override
Set the sequence cursor to an arbitrary position within the RecordStore, starting at key.
Memory::uint8Array read(const std::string &key) const override
Read a complete record from a store.
void sync() const override
Synchronize the entire record store to persistent storage.
Mode
Accessibility of object.
Definition: be_io.h:35
@ ReadOnly
Constant indicating the state of an object that manages some underlying file is accessible for readin...
This software was developed at the National Institute of Standards and Technology (NIST) by employees...