Commit 417ef5cc authored by Vadim Zeitlin's avatar Vadim Zeitlin

Include all public headers using "soci/" prefix inside SOCI itself.

Harmonize the inclusion style of the headers from inside and outside the
library and always use the "soci/foo.h" form.
parent 5a99a15c
......@@ -142,7 +142,7 @@ add_custom_target(check COMMAND ctest)
###############################################################################
include(SociBackend)
include_directories(${SOCI_SOURCE_DIR}/include/soci)
include_directories(${SOCI_SOURCE_DIR}/include)
add_subdirectory(src)
add_subdirectory(tests)
......
......@@ -114,9 +114,7 @@ macro(soci_backend NAME)
set(THIS_BACKEND_DEPENDS_DEFS ${${NAMEU}_DEPS_DEFS})
# Collect include directories
list(APPEND THIS_INCLUDE_DIRS ${SOCI_SOURCE_DIR}/include/soci/${NAMEL})
list(APPEND THIS_INCLUDE_DIRS ${SOCI_SOURCE_DIR}/include/private)
list(APPEND THIS_INCLUDE_DIRS ${SOCI_SOURCE_DIR}/include/private/${NAMEL})
list(APPEND THIS_INCLUDE_DIRS ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS})
# Collect compile definitions
list(APPEND THIS_COMPILE_DEFS ${THIS_BACKEND_DEPENDS_DEFS})
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_FIREBIRD_COMMON_H_INCLUDED
#define SOCI_FIREBIRD_COMMON_H_INCLUDED
#include "firebird/soci-firebird.h"
#include "soci/firebird/soci-firebird.h"
#include <cstdlib>
#include <cstring>
#include <ctime>
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_FIREBIRD_ERROR_H_INCLUDED
#define SOCI_FIREBIRD_ERROR_H_INCLUDED
#include "firebird/soci-firebird.h"
#include "soci/firebird/soci-firebird.h"
#include <string>
namespace soci
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_PRIVATE_SOCI_CSTRTOD_H_INCLUDED
#define SOCI_PRIVATE_SOCI_CSTRTOD_H_INCLUDED
#include "error.h"
#include "soci/error.h"
#include <locale>
#include <sstream>
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_BACKEND_LOADER_H_INCLUDED
#define SOCI_BACKEND_LOADER_H_INCLUDED
#include "soci-backend.h"
#include "soci/soci-backend.h"
// std
#include <string>
#include <vector>
......
......@@ -8,9 +8,9 @@
#ifndef SOCI_BLOB_EXCHANGE_H_INCLUDED
#define SOCI_BLOB_EXCHANGE_H_INCLUDED
#include "blob.h"
#include "into-type.h"
#include "use-type.h"
#include "soci/blob.h"
#include "soci/into-type.h"
#include "soci/use-type.h"
// std
#include <string>
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_BLOB_H_INCLUDED
#define SOCI_BLOB_H_INCLUDED
#include "soci-config.h"
#include "soci/soci-config.h"
// std
#include <cstddef>
......
......@@ -12,8 +12,8 @@
#define SOCI_MAX_FUSION_SEQUENCE_LENGTH 10
#endif
#include "values.h"
#include "type-conversion-traits.h"
#include "soci/values.h"
#include "soci/type-conversion-traits.h"
// boost
#include <boost/fusion/container/vector.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED
#define SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED
#include "type-conversion-traits.h"
#include "soci/type-conversion-traits.h"
// boost
#include <boost/date_time/gregorian/gregorian_types.hpp>
#include <boost/date_time/gregorian/conversion.hpp>
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_BOOST_OPTIONAL_H_INCLUDED
#define SOCI_BOOST_OPTIONAL_H_INCLUDED
#include "type-conversion-traits.h"
#include "soci/type-conversion-traits.h"
// boost
#include <boost/optional.hpp>
......
......@@ -8,8 +8,8 @@
#ifndef SOCI_BOOST_TUPLE_H_INCLUDED
#define SOCI_BOOST_TUPLE_H_INCLUDED
#include "values.h"
#include "type-conversion-traits.h"
#include "soci/values.h"
#include "soci/type-conversion-traits.h"
// boost
#include <boost/tuple/tuple.hpp>
......@@ -317,7 +317,7 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
} // namespace soci
#else // BOOST_VERSION >= 103500
# include "boost-fusion.h"
# include "soci/boost-fusion.h"
# include <boost/fusion/adapted/boost_tuple.hpp>
#endif
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_CONNECTION_PARAMETERS_H_INCLUDED
#define SOCI_CONNECTION_PARAMETERS_H_INCLUDED
#include "soci-config.h"
#include "soci/soci-config.h"
#include <map>
#include <string>
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_CONNECTION_POOL_H_INCLUDED
#define SOCI_CONNECTION_POOL_H_INCLUDED
#include "soci-config.h"
#include "soci/soci-config.h"
// std
#include <cstddef>
......
......@@ -24,7 +24,7 @@
# define SOCI_DB2_DECL
#endif
#include "soci-backend.h"
#include "soci/soci-backend.h"
#include <cstddef>
#include <string>
......
......@@ -23,7 +23,7 @@
# define SOCI_EMPTY_DECL
#endif
#include "soci-backend.h"
#include "soci/soci-backend.h"
#include <cstddef>
#include <string>
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_ERROR_H_INCLUDED
#define SOCI_ERROR_H_INCLUDED
#include "soci-config.h"
#include "soci/soci-config.h"
// std
#include <stdexcept>
#include <string>
......
......@@ -8,8 +8,8 @@
#ifndef SOCI_EXCHANGE_TRAITS_H_INCLUDED
#define SOCI_EXCHANGE_TRAITS_H_INCLUDED
#include "type-conversion-traits.h"
#include "soci-backend.h"
#include "soci/type-conversion-traits.h"
#include "soci/soci-backend.h"
// std
#include <ctime>
#include <string>
......
......@@ -28,7 +28,7 @@
#ifdef _WIN32
#include <ciso646> // To understand and/or/not on MSVC9
#endif
#include <soci-backend.h>
#include "soci/soci-backend.h"
#include <ibase.h> // FireBird
#include <cstdlib>
#include <vector>
......
......@@ -8,9 +8,9 @@
#ifndef SOCI_INTO_TYPE_H_INCLUDED
#define SOCI_INTO_TYPE_H_INCLUDED
#include "soci-backend.h"
#include "type-ptr.h"
#include "exchange-traits.h"
#include "soci/soci-backend.h"
#include "soci/type-ptr.h"
#include "soci/exchange-traits.h"
// std
#include <cstddef>
#include <vector>
......
......@@ -8,9 +8,9 @@
#ifndef SOCI_INTO_H_INCLUDED
#define SOCI_INTO_H_INCLUDED
#include "into-type.h"
#include "exchange-traits.h"
#include "type-conversion.h"
#include "soci/into-type.h"
#include "soci/exchange-traits.h"
#include "soci/type-conversion.h"
// std
#include <cstddef>
#include <vector>
......
......@@ -24,7 +24,7 @@
# define SOCI_MYSQL_DECL
#endif
#include "soci-backend.h"
#include "soci/soci-backend.h"
#ifdef _WIN32
#include <winsock.h> // SOCKET
#endif // _WIN32
......
......@@ -24,9 +24,9 @@
#endif
#include <vector>
#include "../soci-backend.h"
#include "soci/soci-backend.h"
#if defined(_MSC_VER) || defined(__MINGW32__)
#include "../soci-platform.h"
#include "soci/soci-platform.h"
#include <windows.h>
#endif
#include <sqlext.h> // ODBC
......
......@@ -8,8 +8,8 @@
#ifndef SOCI_ONCE_TEMP_TYPE_H_INCLUDED
#define SOCI_ONCE_TEMP_TYPE_H_INCLUDED
#include "ref-counted-statement.h"
#include "prepare-temp-type.h"
#include "soci/ref-counted-statement.h"
#include "soci/prepare-temp-type.h"
#if __cplusplus >= 201103L
#define SOCI_ONCE_TEMP_TYPE_NOEXCEPT noexcept(false)
......
......@@ -23,7 +23,7 @@
# define SOCI_ORACLE_DECL
#endif
#include <soci-backend.h>
#include "soci/soci-backend.h"
#include <oci.h> // OCI
#include <vector>
......
......@@ -24,7 +24,7 @@
# define SOCI_POSTGRESQL_DECL
#endif
#include <soci-backend.h>
#include "soci/soci-backend.h"
#include <libpq-fe.h>
#include <vector>
......
......@@ -8,9 +8,9 @@
#ifndef SOCI_PREPARE_TEMP_TYPE_INCLUDED
#define SOCI_PREPARE_TEMP_TYPE_INCLUDED
#include "into-type.h"
#include "use-type.h"
#include "ref-counted-prepare-info.h"
#include "soci/into-type.h"
#include "soci/use-type.h"
#include "soci/ref-counted-prepare-info.h"
namespace soci
{
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_PROCEDURE_H_INCLUDED
#define SOCI_PROCEDURE_H_INCLUDED
#include "statement.h"
#include "soci/statement.h"
namespace soci
{
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_QUERY_TRANSFORMATION_H_INCLUDED
#define SOCI_QUERY_TRANSFORMATION_H_INCLUDED
#include "soci-config.h"
#include "soci/soci-config.h"
#include <functional>
#include <string>
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_REF_COUNTED_PREPARE_INFO_INCLUDED
#define SOCI_REF_COUNTED_PREPARE_INFO_INCLUDED
#include "ref-counted-statement.h"
#include "soci/ref-counted-statement.h"
// std
#include <string>
#include <vector>
......
......@@ -8,9 +8,9 @@
#ifndef SOCI_REF_COUNTED_STATEMENT_H_INCLUDED
#define SOCI_REF_COUNTED_STATEMENT_H_INCLUDED
#include "statement.h"
#include "into-type.h"
#include "use-type.h"
#include "soci/statement.h"
#include "soci/into-type.h"
#include "soci/use-type.h"
// std
#include <sstream>
......
......@@ -8,10 +8,10 @@
#ifndef SOCI_INTO_ROW_H_INCLUDED
#define SOCI_INTO_ROW_H_INCLUDED
#include "into-type.h"
#include "exchange-traits.h"
#include "row.h"
#include "statement.h"
#include "soci/into-type.h"
#include "soci/exchange-traits.h"
#include "soci/row.h"
#include "soci/statement.h"
// std
#include <cstddef>
......
......@@ -8,9 +8,9 @@
#ifndef SOCI_ROW_H_INCLUDED
#define SOCI_ROW_H_INCLUDED
#include "type-holder.h"
#include "soci-backend.h"
#include "type-conversion.h"
#include "soci/type-holder.h"
#include "soci/soci-backend.h"
#include "soci/type-conversion.h"
// std
#include <cassert>
#include <cstddef>
......
......@@ -8,10 +8,10 @@
#ifndef SOCI_ROWID_EXCHANGE_H_INCLUDED
#define SOCI_ROWID_EXCHANGE_H_INCLUDED
#include "rowid.h"
#include "into-type.h"
#include "use-type.h"
#include "exchange-traits.h"
#include "soci/rowid.h"
#include "soci/into-type.h"
#include "soci/use-type.h"
#include "soci/exchange-traits.h"
// std
#include <string>
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_ROWID_H_INCLUDED
#define SOCI_ROWID_H_INCLUDED
#include "soci-config.h"
#include "soci/soci-config.h"
namespace soci
{
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_ROWSET_H_INCLUDED
#define SOCI_ROWSET_H_INCLUDED
#include "statement.h"
#include "soci/statement.h"
// std
#include <iterator>
#include <memory>
......
......@@ -8,9 +8,9 @@
#ifndef SOCI_SESSION_H_INCLUDED
#define SOCI_SESSION_H_INCLUDED
#include "once-temp-type.h"
#include "query_transformation.h"
#include "connection-parameters.h"
#include "soci/once-temp-type.h"
#include "soci/query_transformation.h"
#include "soci/connection-parameters.h"
// std
#include <cstddef>
......
......@@ -8,8 +8,8 @@
#ifndef SOCI_BACKEND_H_INCLUDED
#define SOCI_BACKEND_H_INCLUDED
#include "soci-config.h"
#include "error.h"
#include "soci/soci-config.h"
#include "soci/error.h"
// std
#include <cstddef>
#include <map>
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_SIMPLE_H_INCLUDED
#define SOCI_SIMPLE_H_INCLUDED
#include "soci-config.h"
#include "soci/soci-config.h"
#ifdef __cplusplus
extern "C"
......
......@@ -13,49 +13,49 @@
#endif
// namespace soci
#include "backend-loader.h"
#include "blob.h"
#include "blob-exchange.h"
#include "connection-pool.h"
#include "error.h"
#include "exchange-traits.h"
#include "into.h"
#include "into-type.h"
#include "once-temp-type.h"
#include "prepare-temp-type.h"
#include "procedure.h"
#include "ref-counted-prepare-info.h"
#include "ref-counted-statement.h"
#include "row.h"
#include "row-exchange.h"
#include "rowid.h"
#include "rowid-exchange.h"
#include "rowset.h"
#include "session.h"
#include "soci-backend.h"
#include "soci-config.h"
#include "soci-platform.h"
#include "statement.h"
#include "transaction.h"
#include "type-conversion.h"
#include "type-conversion-traits.h"
#include "type-holder.h"
#include "type-ptr.h"
#include "unsigned-types.h"
#include "use.h"
#include "use-type.h"
#include "values.h"
#include "values-exchange.h"
#include "soci/backend-loader.h"
#include "soci/blob.h"
#include "soci/blob-exchange.h"
#include "soci/connection-pool.h"
#include "soci/error.h"
#include "soci/exchange-traits.h"
#include "soci/into.h"
#include "soci/into-type.h"
#include "soci/once-temp-type.h"
#include "soci/prepare-temp-type.h"
#include "soci/procedure.h"
#include "soci/ref-counted-prepare-info.h"
#include "soci/ref-counted-statement.h"
#include "soci/row.h"
#include "soci/row-exchange.h"
#include "soci/rowid.h"
#include "soci/rowid-exchange.h"
#include "soci/rowset.h"
#include "soci/session.h"
#include "soci/soci-backend.h"
#include "soci/soci-config.h"
#include "soci/soci-platform.h"
#include "soci/statement.h"
#include "soci/transaction.h"
#include "soci/type-conversion.h"
#include "soci/type-conversion-traits.h"
#include "soci/type-holder.h"
#include "soci/type-ptr.h"
#include "soci/unsigned-types.h"
#include "soci/use.h"
#include "soci/use-type.h"
#include "soci/values.h"
#include "soci/values-exchange.h"
// namespace boost
#ifdef SOCI_USE_BOOST
#include <boost/version.hpp>
#if defined(BOOST_VERSION) && BOOST_VERSION >= 103500
#include "boost-fusion.h"
#include "soci/boost-fusion.h"
#endif // BOOST_VERSION
#include "boost-optional.h"
#include "boost-tuple.h"
#include "boost-gregorian-date.h"
#include "soci/boost-optional.h"
#include "soci/boost-tuple.h"
#include "soci/boost-gregorian-date.h"
#endif // SOCI_USE_BOOST
#endif // SOCI_H_INCLUDED
......@@ -25,7 +25,7 @@
#include <cstdarg>
#include <vector>
#include "soci-backend.h"
#include "soci/soci-backend.h"
// Disable flood of nonsense warnings generated for SQLite
#ifdef _MSC_VER
......
......@@ -8,11 +8,11 @@
#ifndef SOCI_STATEMENT_H_INCLUDED
#define SOCI_STATEMENT_H_INCLUDED
#include "into-type.h"
#include "into.h"
#include "use-type.h"
#include "soci-backend.h"
#include "row.h"
#include "soci/into-type.h"
#include "soci/into.h"
#include "soci/use-type.h"
#include "soci/soci-backend.h"
#include "soci/row.h"
// std
#include <cstddef>
#include <string>
......
......@@ -8,8 +8,8 @@
#ifndef SOCI_TRANSACTION_H_INCLUDED
#define SOCI_TRANSACTION_H_INCLUDED
#include "session.h"
#include "soci-config.h"
#include "soci/session.h"
#include "soci/soci-config.h"
namespace soci
{
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_TYPE_CONVERSION_TRAITS_H_INCLUDED
#define SOCI_TYPE_CONVERSION_TRAITS_H_INCLUDED
#include "soci-backend.h"
#include "soci/soci-backend.h"
namespace soci
{
......
......@@ -8,9 +8,9 @@
#ifndef SOCI_TYPE_CONVERSION_H_INCLUDED
#define SOCI_TYPE_CONVERSION_H_INCLUDED
#include "type-conversion-traits.h"
#include "into-type.h"
#include "use-type.h"
#include "soci/type-conversion-traits.h"
#include "soci/into-type.h"
#include "soci/use-type.h"
// std
#include <cassert>
#include <cstddef>
......
......@@ -8,7 +8,7 @@
#ifndef SOCI_UNSIGNED_TYPES_H_INCLUDED
#define SOCI_UNSIGNED_TYPES_H_INCLUDED
#include "type-conversion-traits.h"
#include "soci/type-conversion-traits.h"
#include <limits>
namespace soci
......
......@@ -8,9 +8,9 @@
#ifndef SOCI_USE_TYPE_H_INCLUDED
#define SOCI_USE_TYPE_H_INCLUDED
#include "soci-backend.h"
#include "type-ptr.h"
#include "exchange-traits.h"
#include "soci/soci-backend.h"
#include "soci/type-ptr.h"
#include "soci/exchange-traits.h"
// std
#include <cstddef>
#include <string>
......
......@@ -8,9 +8,9 @@
#ifndef SOCI_USE_H_INCLUDED
#define SOCI_USE_H_INCLUDED
#include "use-type.h"
#include "exchange-traits.h"
#include "type-conversion.h"
#include "soci/use-type.h"
#include "soci/exchange-traits.h"
#include "soci/type-conversion.h"
namespace soci
{
......
......@@ -8,10 +8,10 @@
#ifndef SOCI_VALUES_EXCHANGE_H_INCLUDED
#define SOCI_VALUES_EXCHANGE_H_INCLUDED
#include "values.h"
#include "into-type.h"
#include "use-type.h"
#include "row-exchange.h"
#include "soci/values.h"
#include "soci/into-type.h"
#include "soci/use-type.h"
#include "soci/row-exchange.h"
// std
#include <cstddef>
#include <string>
......
......@@ -8,9 +8,9 @@
#ifndef SOCI_VALUES_H_INCLUDED
#define SOCI_VALUES_H_INCLUDED
#include "statement.h"
#include "into-type.h"
#include "use-type.h"
#include "soci/statement.h"
#include "soci/into-type.h"
#include "soci/use-type.h"
// std
#include <cstddef>
#include <map>
......
......@@ -7,7 +7,7 @@
//
#define SOCI_DB2_SOURCE
#include "soci-db2.h"
#include "soci/db2/soci-db2.h"
#ifdef _MSC_VER
#pragma warning(disable:4355)
......
......@@ -7,8 +7,8 @@
//
#define SOCI_DB2_SOURCE
#include "soci-db2.h"
#include <backend-loader.h>
#include "soci/db2/soci-db2.h"
#include "soci/backend-loader.h"
using namespace soci;
using namespace soci::details;
......
......@@ -7,7 +7,7 @@
//
#define SOCI_DB2_SOURCE
#include "soci-db2.h"
#include "soci/db2/soci-db2.h"
#ifdef _MSC_VER
#pragma warning(disable:4355)
......
......@@ -7,8 +7,8 @@
//
#define SOCI_DB2_SOURCE
#include "soci-db2.h"
#include <connection-parameters.h>
#include "soci/db2/soci-db2.h"