FFmpegfs Fuse Multi Media Filesystem 2.16
Macros
cache.cc File Reference

Cache class implementation. More...

#include "cache.h"
#include "cache_entry.h"
#include "ffmpegfs.h"
#include "logging.h"
#include <vector>
#include <cassert>
#include <sqlite3.h>
Include dependency graph for cache.cc:

Go to the source code of this file.

Macros

#define sqlite3_errstr(rc)   ""
 If our version of SQLite hasn't go this function. More...
 
#define STRINGIFY(x)   #x
 Stringification helper for STRINGIFY. Not to be used separately. More...
 
#define TOSTRING(x)   STRINGIFY(x)
 Convert a macro argument into a string constant. More...
 
#define SQLBINDTXT(idx, var)
 Bind text column to SQLite statement. More...
 
#define SQLBINDNUM(func, idx, var)
 Bind numeric column to SQLite statement. More...
 

Detailed Description

Cache class implementation.

Author
Norbert Schlia (nschl.nosp@m.ia@o.nosp@m.blivi.nosp@m.on-s.nosp@m.oftwa.nosp@m.re.d.nosp@m.e)

Definition in file cache.cc.

Macro Definition Documentation

◆ SQLBINDNUM

#define SQLBINDNUM (   func,
  idx,
  var 
)
Value:
if (SQLITE_OK != (ret = func(m_cacheidx_db->m_insert_stmt, idx, var))) \
{ \
Logging::error(m_cacheidx_db->filename(), "SQLite3 select column #%1 error: %2\n%3", idx, ret, sqlite3_errstr(ret)); \
throw false; \
}
#define sqlite3_errstr(rc)
If our version of SQLite hasn't go this function.
Definition: cache.cc:42
static void error(const T filename, const std::string &format_string, Args &&...args)
Write error level log entry.
Definition: logging.h:239

Bind numeric column to SQLite statement.

Definition at line 910 of file cache.cc.

◆ SQLBINDTXT

#define SQLBINDTXT (   idx,
  var 
)
Value:
if (SQLITE_OK != (ret = sqlite3_bind_text(m_cacheidx_db->m_insert_stmt, idx, var, -1, nullptr))) \
{ \
Logging::error(m_cacheidx_db->filename(), "SQLite3 select column #%1 error: %2\n%3", idx, ret, sqlite3_errstr(ret)); \
throw false; \
}

Bind text column to SQLite statement.

Definition at line 898 of file cache.cc.

◆ sqlite3_errstr

#define sqlite3_errstr (   rc)    ""

If our version of SQLite hasn't go this function.

Definition at line 42 of file cache.cc.

◆ STRINGIFY

#define STRINGIFY (   x)    #x

Stringification helper for STRINGIFY. Not to be used separately.

Definition at line 45 of file cache.cc.

◆ TOSTRING

#define TOSTRING (   x)    STRINGIFY(x)

Convert a macro argument into a string constant.

Definition at line 46 of file cache.cc.