SQLite VFS Shim
Single header with classes for easily implementing SQLite VFS shims in C++11
|
#include <SQLiteVfs.hpp>
Public Types | |
using | VfsImpl = TVfsImpl |
using | FileImpl = typename VfsImpl::FileImpl |
Public Member Functions | |
SQLiteVfs (const char *name) | |
SQLiteVfs (const char *name, const char *base_vfs_name) | |
SQLiteVfs (const char *name, sqlite3_vfs *original_vfs) | |
~SQLiteVfs () | |
int | register_vfs (bool makeDefault) |
int | unregister_vfs () |
bool | is_registered () const |
Public Attributes | |
VfsImpl | implementation |
POD sqlite3_vfs
subclass that forwards all invocations to an embedded object that inherits SQLiteVfsImpl
.
You should not subclass this type. Pass your SQLiteVfsImpl
subclass as template argument instead.
TVfsImpl | SQLiteVfsImpl subclass |
using sqlitevfs::SQLiteVfs< TVfsImpl >::FileImpl = typename VfsImpl::FileImpl |
using sqlitevfs::SQLiteVfs< TVfsImpl >::VfsImpl = TVfsImpl |
|
inline |
Construct a named VFS with the default VFS as base.
name | VFS name. |
|
inline |
Construct a named VFS with the VFS named base_vfs_name
as base.
name | VFS name. |
base_vfs_name | Base VFS name, used to find the base VFS using sqlite3_vfs_find . |
|
inline |
Construct a named VFS with original_vfs
as base VFS.
The original_vfs
will be forwarded to the implementation
.
name | VFS name. |
original_vfs | Base VFS. If NULL, the default VFS will be used instead. |
|
inline |
Unregisters the VFS, just to be sure.
|
inline |
Whether this VFS is registered in SQLite, checked using sqlite3_vfs_find
.
|
inline |
Register the VFS in SQLite using sqlite3_vfs_register
.
The same VFS can be registered multiple times without injury. To make an existing VFS into the default VFS, register it again with makeDefault
flag set.
makeDefault | Whether the VFS will be the new default VFS. |
|
inline |
Unregister the VFS in SQLite using sqlite3_vfs_unregister
.
If the default VFS is unregistered, another VFS is chosen as the default arbitrarily.
VfsImpl sqlitevfs::SQLiteVfs< TVfsImpl >::implementation |
VFS implementation object of the SQLiteVfsImpl
subclass passed as template parameter to SQLiteVfs<>
.