mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-09 13:00:19 +08:00
Removed sqlite3 dependency (now building it directly in source, making installation easier between x86 and x64)
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1074 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
Vendored
-5759
File diff suppressed because it is too large
Load Diff
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
+2
-6
@@ -76,11 +76,8 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# [Eclipse] Automatic Discovery of Include directories (Optional, but handy)
|
||||
#SET(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
|
||||
#Find libraries included with our project first
|
||||
IF(WIN32)
|
||||
SET(CMAKE_INCLUDE_PATH "${PROJECT_SOURCE_DIR}/3rdParty/include;${CMAKE_INCLUDE_PATH}")
|
||||
SET(CMAKE_LIBRARY_PATH "${PROJECT_SOURCE_DIR}/3rdParty/lib;${CMAKE_LIBRARY_PATH}")
|
||||
ELSEIF(APPLE)
|
||||
#Other paths...
|
||||
IF(APPLE)
|
||||
# For Mac ports
|
||||
SET(CMAKE_INCLUDE_PATH "/opt/local/include;${CMAKE_INCLUDE_PATH}")
|
||||
SET(CMAKE_LIBRARY_PATH "/opt/local/lib;${CMAKE_LIBRARY_PATH}")
|
||||
@@ -138,7 +135,6 @@ OPTION(DEMO_BUILD "Set to ON to build DEMO version" OFF)
|
||||
|
||||
####### DEPENDENCIES #######
|
||||
FIND_PACKAGE(OpenCV REQUIRED)
|
||||
FIND_PACKAGE(Sqlite3 REQUIRED)
|
||||
FIND_PACKAGE(PCL 1.7 REQUIRED)
|
||||
FIND_PACKAGE(VTK REQUIRED)
|
||||
FIND_PACKAGE(ZLIB REQUIRED)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -31,6 +31,8 @@ SET(SRC_FILES
|
||||
toro3d/posegraph3.cpp
|
||||
toro3d/treeoptimizer3_iteration.cpp
|
||||
toro3d/treeoptimizer3.cpp
|
||||
|
||||
sqlite3/sqlite3.c
|
||||
)
|
||||
|
||||
SET(INCLUDE_DIRS
|
||||
@@ -39,10 +41,8 @@ SET(INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${OpenCV_INCLUDE_DIRS}
|
||||
${SQLITE3_INCLUDE_DIR}
|
||||
${PCL_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
|
||||
)
|
||||
|
||||
####################################
|
||||
@@ -81,7 +81,7 @@ INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
|
||||
# Add binary that is built from the source file "main.cpp".
|
||||
# The extension is automatically found.
|
||||
ADD_LIBRARY(rtabmap_core ${SRC_FILES} ${RESOURCES_HEADERS})
|
||||
TARGET_LINK_LIBRARIES(rtabmap_core rtabmap_utilite ${OpenCV_LIBS} ${SQLITE3_LIBRARY} ${PCL_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
TARGET_LINK_LIBRARIES(rtabmap_core rtabmap_utilite ${OpenCV_LIBS} ${PCL_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
|
||||
INSTALL(TARGETS rtabmap_core
|
||||
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT runtime
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
|
||||
#include "rtabmap/core/DBDriver.h"
|
||||
#include <opencv2/features2d/features2d.hpp>
|
||||
#include <sqlite3.h>
|
||||
#include "sqlite3/sqlite3.h"
|
||||
#include <pcl/point_types.h>
|
||||
|
||||
namespace rtabmap {
|
||||
|
||||
@@ -1,255 +0,0 @@
|
||||
/*
|
||||
* Software License Agreement (BSD License)
|
||||
*
|
||||
* Copyright (c) 2009, Willow Garage, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
* * Neither the name of the copyright holder(s) nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: extract_indices.h 1370 2011-06-19 01:06:01Z jspricke $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PCL_FILTERS_RANDOM_SUBSAMPLE_H_
|
||||
#define PCL_FILTERS_RANDOM_SUBSAMPLE_H_
|
||||
|
||||
#include <pcl/filters/filter_indices.h>
|
||||
#include <time.h>
|
||||
#include <limits.h>
|
||||
|
||||
/** \brief @b RandomSample applies a random sampling with uniform probability.
|
||||
* Based off Algorithm A from the paper "Faster Methods for Random Sampling"
|
||||
* by Jeffrey Scott Vitter. The algorithm runs in O(N) and results in sorted
|
||||
* indices
|
||||
* http://www.ittc.ku.edu/~jsv/Papers/Vit84.sampling.pdf
|
||||
* \author Justin Rosen
|
||||
* \ingroup filters
|
||||
*/
|
||||
template<typename PointT>
|
||||
class RandomSample : public pcl::FilterIndices<PointT>
|
||||
{
|
||||
using pcl::FilterIndices<PointT>::filter_name_;
|
||||
using pcl::FilterIndices<PointT>::getClassName;
|
||||
using pcl::FilterIndices<PointT>::indices_;
|
||||
using pcl::FilterIndices<PointT>::input_;
|
||||
using pcl::FilterIndices<PointT>::negative_;
|
||||
using pcl::FilterIndices<PointT>::keep_organized_;
|
||||
using pcl::FilterIndices<PointT>::user_filter_value_;
|
||||
using pcl::FilterIndices<PointT>::extract_removed_indices_;
|
||||
using pcl::FilterIndices<PointT>::removed_indices_;
|
||||
|
||||
typedef typename pcl::FilterIndices<PointT>::PointCloud PointCloud;
|
||||
typedef typename PointCloud::Ptr PointCloudPtr;
|
||||
typedef typename PointCloud::ConstPtr PointCloudConstPtr;
|
||||
|
||||
public:
|
||||
|
||||
typedef boost::shared_ptr< RandomSample<PointT> > Ptr;
|
||||
typedef boost::shared_ptr< const RandomSample<PointT> > ConstPtr;
|
||||
|
||||
/** \brief Empty constructor. */
|
||||
RandomSample (bool extract_removed_indices = false) :
|
||||
pcl::FilterIndices<PointT> (extract_removed_indices),
|
||||
sample_ (UINT_MAX),
|
||||
seed_ (static_cast<unsigned int> (time (NULL)))
|
||||
{
|
||||
filter_name_ = "RandomSample";
|
||||
}
|
||||
|
||||
/** \brief Set number of indices to be sampled.
|
||||
* \param sample
|
||||
*/
|
||||
inline void
|
||||
setSample (unsigned int sample)
|
||||
{
|
||||
sample_ = sample;
|
||||
}
|
||||
|
||||
/** \brief Get the value of the internal \a sample parameter.
|
||||
*/
|
||||
inline unsigned int
|
||||
getSample ()
|
||||
{
|
||||
return (sample_);
|
||||
}
|
||||
|
||||
/** \brief Set seed of random function.
|
||||
* \param seed
|
||||
*/
|
||||
inline void
|
||||
setSeed (unsigned int seed)
|
||||
{
|
||||
seed_ = seed;
|
||||
}
|
||||
|
||||
/** \brief Get the value of the internal \a seed parameter.
|
||||
*/
|
||||
inline unsigned int
|
||||
getSeed ()
|
||||
{
|
||||
return (seed_);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
/** \brief Number of indices that will be returned. */
|
||||
unsigned int sample_;
|
||||
/** \brief Random number seed. */
|
||||
unsigned int seed_;
|
||||
|
||||
/** \brief Sample of point indices into a separate PointCloud
|
||||
* \param output the resultant point cloud
|
||||
*/
|
||||
void
|
||||
applyFilter (PointCloud &output)
|
||||
{
|
||||
std::vector<int> indices;
|
||||
if (keep_organized_)
|
||||
{
|
||||
bool temp = extract_removed_indices_;
|
||||
extract_removed_indices_ = true;
|
||||
applyFilter (indices);
|
||||
extract_removed_indices_ = temp;
|
||||
copyPointCloud (*input_, output);
|
||||
// Get X, Y, Z fields
|
||||
std::vector<sensor_msgs::PointField> fields;
|
||||
pcl::getFields (*input_, fields);
|
||||
std::vector<size_t> offsets;
|
||||
for (size_t i = 0; i < fields.size (); ++i)
|
||||
{
|
||||
if (fields[i].name == "x" ||
|
||||
fields[i].name == "y" ||
|
||||
fields[i].name == "z")
|
||||
offsets.push_back (fields[i].offset);
|
||||
}
|
||||
// For every "removed" point, set the x,y,z fields to user_filter_value_
|
||||
const static float user_filter_value = user_filter_value_;
|
||||
for (size_t rii = 0; rii < removed_indices_->size (); ++rii)
|
||||
{
|
||||
uint8_t* pt_data = reinterpret_cast<uint8_t*> (&output[(*removed_indices_)[rii]]);
|
||||
for (size_t i = 0; i < offsets.size (); ++i)
|
||||
{
|
||||
memcpy (pt_data + offsets[i], &user_filter_value, sizeof (float));
|
||||
}
|
||||
if (!pcl_isfinite (user_filter_value_))
|
||||
output.is_dense = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
output.is_dense = true;
|
||||
applyFilter (indices);
|
||||
copyPointCloud (*input_, indices, output);
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Sample of point indices
|
||||
* \param indices the resultant point cloud indices
|
||||
*/
|
||||
void
|
||||
applyFilter (std::vector<int> &indices)
|
||||
{
|
||||
unsigned N = static_cast<unsigned> (indices_->size ());
|
||||
|
||||
unsigned int sample_size = negative_ ? N - sample_ : sample_;
|
||||
// If sample size is 0 or if the sample size is greater then input cloud size
|
||||
// then return all indices
|
||||
if (sample_size >= N)
|
||||
{
|
||||
indices = *indices_;
|
||||
removed_indices_->clear ();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Resize output indices to sample size
|
||||
indices.resize (static_cast<size_t> (sample_size));
|
||||
if (extract_removed_indices_)
|
||||
removed_indices_->resize (static_cast<size_t> (N - sample_size));
|
||||
|
||||
// Set random seed so derived indices are the same each time the filter runs
|
||||
std::srand (seed_);
|
||||
|
||||
// Algorithm A
|
||||
unsigned top = N - sample_size;
|
||||
unsigned i = 0;
|
||||
unsigned index = 0;
|
||||
std::vector<bool> added;
|
||||
if (extract_removed_indices_)
|
||||
added.resize (indices_->size (), false);
|
||||
for (size_t n = sample_size; n >= 2; n--)
|
||||
{
|
||||
float V = unifRand ();
|
||||
unsigned S = 0;
|
||||
float quot = static_cast<float> (top) / static_cast<float> (N);
|
||||
while (quot > V)
|
||||
{
|
||||
S++;
|
||||
top--;
|
||||
N--;
|
||||
quot = quot * static_cast<float> (top) / static_cast<float> (N);
|
||||
}
|
||||
index += S;
|
||||
if (extract_removed_indices_)
|
||||
added[index] = true;
|
||||
indices[i++] = (*indices_)[index++];
|
||||
N--;
|
||||
}
|
||||
|
||||
index += N * static_cast<unsigned> (unifRand ());
|
||||
if (extract_removed_indices_)
|
||||
added[index] = true;
|
||||
indices[i++] = (*indices_)[index++];
|
||||
|
||||
// Now populate removed_indices_ appropriately
|
||||
if (extract_removed_indices_)
|
||||
{
|
||||
unsigned ri = 0;
|
||||
for (size_t i = 0; i < added.size (); i++)
|
||||
{
|
||||
if (!added[i])
|
||||
{
|
||||
(*removed_indices_)[ri++] = (*indices_)[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Return a random number fast using a LCG (Linear Congruential Generator) algorithm.
|
||||
* See http://software.intel.com/en-us/articles/fast-random-number-generator-on-the-intel-pentiumr-4-processor/ for more information.
|
||||
*/
|
||||
inline float
|
||||
unifRand ()
|
||||
{
|
||||
return (static_cast<float>(rand () / double (RAND_MAX)));
|
||||
//return (((214013 * seed_ + 2531011) >> 16) & 0x7FFF);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif //#ifndef PCL_FILTERS_RANDOM_SUBSAMPLE_H_
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -14,8 +14,6 @@
|
||||
** an SQLite instance. Shared libraries that intend to be loaded
|
||||
** as extensions by SQLite should #include this file instead of
|
||||
** sqlite3.h.
|
||||
**
|
||||
** @(#) $Id: sqlite3ext.h,v 1.25 2008/10/12 00:27:54 shane Exp $
|
||||
*/
|
||||
#ifndef _SQLITE3EXT_H_
|
||||
#define _SQLITE3EXT_H_
|
||||
@@ -51,8 +49,10 @@ struct sqlite3_api_routines {
|
||||
int (*busy_timeout)(sqlite3*,int ms);
|
||||
int (*changes)(sqlite3*);
|
||||
int (*close)(sqlite3*);
|
||||
int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*));
|
||||
int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*));
|
||||
int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,
|
||||
int eTextRep,const char*));
|
||||
int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,
|
||||
int eTextRep,const void*));
|
||||
const void * (*column_blob)(sqlite3_stmt*,int iCol);
|
||||
int (*column_bytes)(sqlite3_stmt*,int iCol);
|
||||
int (*column_bytes16)(sqlite3_stmt*,int iCol);
|
||||
@@ -77,10 +77,18 @@ struct sqlite3_api_routines {
|
||||
void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
|
||||
int (*complete)(const char*sql);
|
||||
int (*complete16)(const void*sql);
|
||||
int (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*));
|
||||
int (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,int,const void*,int,const void*));
|
||||
int (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
|
||||
int (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
|
||||
int (*create_collation)(sqlite3*,const char*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*));
|
||||
int (*create_collation16)(sqlite3*,const void*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*));
|
||||
int (*create_function)(sqlite3*,const char*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*));
|
||||
int (*create_function16)(sqlite3*,const void*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*));
|
||||
int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
|
||||
int (*data_count)(sqlite3_stmt*pStmt);
|
||||
sqlite3 * (*db_handle)(sqlite3_stmt*);
|
||||
@@ -125,16 +133,19 @@ struct sqlite3_api_routines {
|
||||
void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_value)(sqlite3_context*,sqlite3_value*);
|
||||
void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
|
||||
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,const char*,const char*),void*);
|
||||
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
|
||||
const char*,const char*),void*);
|
||||
void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
|
||||
char * (*snprintf)(int,char*,const char*,...);
|
||||
int (*step)(sqlite3_stmt*);
|
||||
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,char const**,char const**,int*,int*,int*);
|
||||
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
|
||||
char const**,char const**,int*,int*,int*);
|
||||
void (*thread_cleanup)(void);
|
||||
int (*total_changes)(sqlite3*);
|
||||
void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
|
||||
int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
|
||||
void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,sqlite_int64),void*);
|
||||
void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,
|
||||
sqlite_int64),void*);
|
||||
void * (*user_data)(sqlite3_context*);
|
||||
const void * (*value_blob)(sqlite3_value*);
|
||||
int (*value_bytes)(sqlite3_value*);
|
||||
@@ -156,15 +167,19 @@ struct sqlite3_api_routines {
|
||||
int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
|
||||
int (*clear_bindings)(sqlite3_stmt*);
|
||||
/* Added by 3.4.1 */
|
||||
int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,void (*xDestroy)(void *));
|
||||
int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,
|
||||
void (*xDestroy)(void *));
|
||||
/* Added by 3.5.0 */
|
||||
int (*bind_zeroblob)(sqlite3_stmt*,int,int);
|
||||
int (*blob_bytes)(sqlite3_blob*);
|
||||
int (*blob_close)(sqlite3_blob*);
|
||||
int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,int,sqlite3_blob**);
|
||||
int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,
|
||||
int,sqlite3_blob**);
|
||||
int (*blob_read)(sqlite3_blob*,void*,int,int);
|
||||
int (*blob_write)(sqlite3_blob*,const void*,int,int);
|
||||
int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*),void(*)(void*));
|
||||
int (*create_collation_v2)(sqlite3*,const char*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*),
|
||||
void(*)(void*));
|
||||
int (*file_control)(sqlite3*,const char*,int,void*);
|
||||
sqlite3_int64 (*memory_highwater)(int);
|
||||
sqlite3_int64 (*memory_used)(void);
|
||||
@@ -193,6 +208,48 @@ struct sqlite3_api_routines {
|
||||
sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
|
||||
const char *(*sql)(sqlite3_stmt*);
|
||||
int (*status)(int,int*,int*,int);
|
||||
int (*backup_finish)(sqlite3_backup*);
|
||||
sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
|
||||
int (*backup_pagecount)(sqlite3_backup*);
|
||||
int (*backup_remaining)(sqlite3_backup*);
|
||||
int (*backup_step)(sqlite3_backup*,int);
|
||||
const char *(*compileoption_get)(int);
|
||||
int (*compileoption_used)(const char*);
|
||||
int (*create_function_v2)(sqlite3*,const char*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*),
|
||||
void(*xDestroy)(void*));
|
||||
int (*db_config)(sqlite3*,int,...);
|
||||
sqlite3_mutex *(*db_mutex)(sqlite3*);
|
||||
int (*db_status)(sqlite3*,int,int*,int*,int);
|
||||
int (*extended_errcode)(sqlite3*);
|
||||
void (*log)(int,const char*,...);
|
||||
sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);
|
||||
const char *(*sourceid)(void);
|
||||
int (*stmt_status)(sqlite3_stmt*,int,int);
|
||||
int (*strnicmp)(const char*,const char*,int);
|
||||
int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
|
||||
int (*wal_autocheckpoint)(sqlite3*,int);
|
||||
int (*wal_checkpoint)(sqlite3*,const char*);
|
||||
void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
|
||||
int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);
|
||||
int (*vtab_config)(sqlite3*,int op,...);
|
||||
int (*vtab_on_conflict)(sqlite3*);
|
||||
/* Version 3.7.16 and later */
|
||||
int (*close_v2)(sqlite3*);
|
||||
const char *(*db_filename)(sqlite3*,const char*);
|
||||
int (*db_readonly)(sqlite3*,const char*);
|
||||
int (*db_release_memory)(sqlite3*);
|
||||
const char *(*errstr)(int);
|
||||
int (*stmt_busy)(sqlite3_stmt*);
|
||||
int (*stmt_readonly)(sqlite3_stmt*);
|
||||
int (*stricmp)(const char*,const char*);
|
||||
int (*uri_boolean)(const char*,const char*,int);
|
||||
sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
|
||||
const char *(*uri_parameter)(const char*,const char*);
|
||||
char *(*vsnprintf)(int,char*,const char*,va_list);
|
||||
int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -372,9 +429,59 @@ struct sqlite3_api_routines {
|
||||
#define sqlite3_next_stmt sqlite3_api->next_stmt
|
||||
#define sqlite3_sql sqlite3_api->sql
|
||||
#define sqlite3_status sqlite3_api->status
|
||||
#define sqlite3_backup_finish sqlite3_api->backup_finish
|
||||
#define sqlite3_backup_init sqlite3_api->backup_init
|
||||
#define sqlite3_backup_pagecount sqlite3_api->backup_pagecount
|
||||
#define sqlite3_backup_remaining sqlite3_api->backup_remaining
|
||||
#define sqlite3_backup_step sqlite3_api->backup_step
|
||||
#define sqlite3_compileoption_get sqlite3_api->compileoption_get
|
||||
#define sqlite3_compileoption_used sqlite3_api->compileoption_used
|
||||
#define sqlite3_create_function_v2 sqlite3_api->create_function_v2
|
||||
#define sqlite3_db_config sqlite3_api->db_config
|
||||
#define sqlite3_db_mutex sqlite3_api->db_mutex
|
||||
#define sqlite3_db_status sqlite3_api->db_status
|
||||
#define sqlite3_extended_errcode sqlite3_api->extended_errcode
|
||||
#define sqlite3_log sqlite3_api->log
|
||||
#define sqlite3_soft_heap_limit64 sqlite3_api->soft_heap_limit64
|
||||
#define sqlite3_sourceid sqlite3_api->sourceid
|
||||
#define sqlite3_stmt_status sqlite3_api->stmt_status
|
||||
#define sqlite3_strnicmp sqlite3_api->strnicmp
|
||||
#define sqlite3_unlock_notify sqlite3_api->unlock_notify
|
||||
#define sqlite3_wal_autocheckpoint sqlite3_api->wal_autocheckpoint
|
||||
#define sqlite3_wal_checkpoint sqlite3_api->wal_checkpoint
|
||||
#define sqlite3_wal_hook sqlite3_api->wal_hook
|
||||
#define sqlite3_blob_reopen sqlite3_api->blob_reopen
|
||||
#define sqlite3_vtab_config sqlite3_api->vtab_config
|
||||
#define sqlite3_vtab_on_conflict sqlite3_api->vtab_on_conflict
|
||||
/* Version 3.7.16 and later */
|
||||
#define sqlite3_close_v2 sqlite3_api->close_v2
|
||||
#define sqlite3_db_filename sqlite3_api->db_filename
|
||||
#define sqlite3_db_readonly sqlite3_api->db_readonly
|
||||
#define sqlite3_db_release_memory sqlite3_api->db_release_memory
|
||||
#define sqlite3_errstr sqlite3_api->errstr
|
||||
#define sqlite3_stmt_busy sqlite3_api->stmt_busy
|
||||
#define sqlite3_stmt_readonly sqlite3_api->stmt_readonly
|
||||
#define sqlite3_stricmp sqlite3_api->stricmp
|
||||
#define sqlite3_uri_boolean sqlite3_api->uri_boolean
|
||||
#define sqlite3_uri_int64 sqlite3_api->uri_int64
|
||||
#define sqlite3_uri_parameter sqlite3_api->uri_parameter
|
||||
#define sqlite3_uri_vsnprintf sqlite3_api->vsnprintf
|
||||
#define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2
|
||||
#endif /* SQLITE_CORE */
|
||||
|
||||
#define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0;
|
||||
#define SQLITE_EXTENSION_INIT2(v) sqlite3_api = v;
|
||||
#ifndef SQLITE_CORE
|
||||
/* This case when the file really is being compiled as a loadable
|
||||
** extension */
|
||||
# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
|
||||
# define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v;
|
||||
# define SQLITE_EXTENSION_INIT3 \
|
||||
extern const sqlite3_api_routines *sqlite3_api;
|
||||
#else
|
||||
/* This case when the file is being statically linked into the
|
||||
** application */
|
||||
# define SQLITE_EXTENSION_INIT1 /*no-op*/
|
||||
# define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */
|
||||
# define SQLITE_EXTENSION_INIT3 /*no-op*/
|
||||
#endif
|
||||
|
||||
#endif /* _SQLITE3EXT_H_ */
|
||||
Reference in New Issue
Block a user