SQLite VFS Shim
Single header with classes for easily implementing SQLite VFS shims in C++11
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
sqlitevfs::SQLiteFileImpl Struct Reference

#include <SQLiteVfs.hpp>

Public Member Functions

virtual int iVersion () const
 
virtual int xClose ()
 
virtual int xRead (void *p, int iAmt, sqlite3_int64 iOfst)
 
virtual int xWrite (const void *p, int iAmt, sqlite3_int64 iOfst)
 
virtual int xTruncate (sqlite3_int64 size)
 
virtual int xSync (int flags)
 
virtual int xFileSize (sqlite3_int64 *pSize)
 
virtual int xLock (int flags)
 
virtual int xUnlock (int flags)
 
virtual int xCheckReservedLock (int *pResOut)
 
virtual int xFileControl (int op, void *pArg)
 
virtual int xSectorSize ()
 
virtual int xDeviceCharacteristics ()
 
virtual int xShmMap (int iPg, int pgsz, int flags, void volatile **pp)
 
virtual int xShmLock (int offset, int n, int flags)
 
virtual void xShmBarrier ()
 
virtual int xShmUnmap (int deleteFlag)
 
virtual int xFetch (sqlite3_int64 iOfst, int iAmt, void **pp)
 
virtual int xUnfetch (sqlite3_int64 iOfst, void *p)
 

Public Attributes

sqlite3_file * original_file
 

Detailed Description

SQLite File implementation with virtual methods for C++.

The default method implementations forward execution to original_file.

You should not create objects of this type manually. Instead, you should subclass it, overriding any of the methods necessary, and pass your subclass to SQLiteVfsImpl<>.

Note
Destructors will be called automatically by SQLiteFile right after xClose is called.
See also
https://sqlite.org/c3ref/file.html

Member Function Documentation

◆ iVersion()

virtual int sqlitevfs::SQLiteFileImpl::iVersion ( ) const
inlinevirtual

Determine which functions are supported by this implementation.

The default implementation returns original_file's iVersion, or 1 if it is NULL. Override this to report a different version.

See also
https://sqlite.org/c3ref/io_methods.html

◆ xCheckReservedLock()

virtual int sqlitevfs::SQLiteFileImpl::xCheckReservedLock ( int *  pResOut)
inlinevirtual

◆ xClose()

virtual int sqlitevfs::SQLiteFileImpl::xClose ( )
inlinevirtual

◆ xDeviceCharacteristics()

virtual int sqlitevfs::SQLiteFileImpl::xDeviceCharacteristics ( )
inlinevirtual

◆ xFetch()

virtual int sqlitevfs::SQLiteFileImpl::xFetch ( sqlite3_int64  iOfst,
int  iAmt,
void **  pp 
)
inlinevirtual

◆ xFileControl()

virtual int sqlitevfs::SQLiteFileImpl::xFileControl ( int  op,
void *  pArg 
)
inlinevirtual

◆ xFileSize()

virtual int sqlitevfs::SQLiteFileImpl::xFileSize ( sqlite3_int64 *  pSize)
inlinevirtual

◆ xLock()

virtual int sqlitevfs::SQLiteFileImpl::xLock ( int  flags)
inlinevirtual

◆ xRead()

virtual int sqlitevfs::SQLiteFileImpl::xRead ( void *  p,
int  iAmt,
sqlite3_int64  iOfst 
)
inlinevirtual

◆ xSectorSize()

virtual int sqlitevfs::SQLiteFileImpl::xSectorSize ( )
inlinevirtual

◆ xShmBarrier()

virtual void sqlitevfs::SQLiteFileImpl::xShmBarrier ( )
inlinevirtual

◆ xShmLock()

virtual int sqlitevfs::SQLiteFileImpl::xShmLock ( int  offset,
int  n,
int  flags 
)
inlinevirtual

◆ xShmMap()

virtual int sqlitevfs::SQLiteFileImpl::xShmMap ( int  iPg,
int  pgsz,
int  flags,
void volatile **  pp 
)
inlinevirtual

◆ xShmUnmap()

virtual int sqlitevfs::SQLiteFileImpl::xShmUnmap ( int  deleteFlag)
inlinevirtual

◆ xSync()

virtual int sqlitevfs::SQLiteFileImpl::xSync ( int  flags)
inlinevirtual

◆ xTruncate()

virtual int sqlitevfs::SQLiteFileImpl::xTruncate ( sqlite3_int64  size)
inlinevirtual

◆ xUnfetch()

virtual int sqlitevfs::SQLiteFileImpl::xUnfetch ( sqlite3_int64  iOfst,
void *  p 
)
inlinevirtual

◆ xUnlock()

virtual int sqlitevfs::SQLiteFileImpl::xUnlock ( int  flags)
inlinevirtual

◆ xWrite()

virtual int sqlitevfs::SQLiteFileImpl::xWrite ( const void *  p,
int  iAmt,
sqlite3_int64  iOfst 
)
inlinevirtual

Member Data Documentation

◆ original_file

sqlite3_file* sqlitevfs::SQLiteFileImpl::original_file

File used by the default method implementations.


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