File indexing completed on 2025-02-23 05:15:21
0001 // 0002 // Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton 0003 // Distributed under the Boost Software License, Version 1.0. 0004 // (See accompanying file LICENSE_1_0.txt or copy at 0005 // http://www.boost.org/LICENSE_1_0.txt) 0006 // 0007 0008 #ifndef SOCI_SQLITE3_COMMON_H_INCLUDED 0009 #define SOCI_SQLITE3_COMMON_H_INCLUDED 0010 0011 #include "soci/error.h" 0012 #include <cstddef> 0013 #include <cstdio> 0014 #include <cstring> 0015 #include <ctime> 0016 #include <vector> 0017 0018 namespace soci { namespace details { namespace sqlite3 { 0019 0020 // helper for vector operations 0021 template <typename T> 0022 std::size_t get_vector_size(void *p) 0023 { 0024 std::vector<T> *v = static_cast<std::vector<T> *>(p); 0025 return v->size(); 0026 } 0027 0028 template <typename T> 0029 void resize_vector(void *p, std::size_t sz) 0030 { 0031 std::vector<T> *v = static_cast<std::vector<T> *>(p); 0032 v->resize(sz); 0033 } 0034 0035 }}} // namespace soci::details::sqlite3 0036 0037 #endif // SOCI_SQLITE3_COMMON_H_INCLUDED