diff options
Diffstat (limited to 'odb/boost')
91 files changed, 0 insertions, 6060 deletions
diff --git a/odb/boost/Makefile.am b/odb/boost/Makefile.am deleted file mode 100644 index 3cbe9d9..0000000 --- a/odb/boost/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -# file : odb/boost/Makefile.am -# license : GNU GPL v2; see accompanying LICENSE file - -lib_LTLIBRARIES = libodb-boost.la -libodb_boost_la_SOURCES = __path__(sources) - -odbboostincludedir = $(includedir)/odb/boost/ -nobase_odbboostinclude_HEADERS = __path__(headers) __path__(options) -nobase_nodist_odbboostinclude_HEADERS = details/config.h - -EXTRA_DIST = __file__(extra_dist) - -AM_CPPFLAGS= -I'$(top_builddir)' -I'$(top_srcdir)' -DLIBODB_BOOST_DYNAMIC_LIB -AM_LDFLAGS = -release __value__(interface_version) -no-undefined diff --git a/odb/boost/buildfile b/odb/boost/buildfile deleted file mode 100644 index 751b56e..0000000 --- a/odb/boost/buildfile +++ /dev/null @@ -1,93 +0,0 @@ -# file : odb/boost/buildfile -# license : GNU GPL v2; see accompanying LICENSE file - -../ -{ - define options: file - options{*}: extension = options - - # Install into the odb/boost/ subdirectory of, say, /usr/include/ - # recreating subdirectories. - # - {hxx ixx txx options}{*}: - { - install = include/odb/ - install.subdirs = true - } - - boost/ - { - import int_libs = libodb%lib{odb} - imp_libs = - - lib{odb-boost}: {hxx ixx txx cxx}{** -version-build2} {hxx}{version-build2} \ - details/build2/{h}{*} \ - options{**} ../options{boost} \ - $imp_libs $int_libs - - # Include the generated version header into the distribution (so that we - # don't pick up an installed one) and don't remove it when cleaning in src - # (so that clean results in a state identical to distributed). - # - hxx{version-build2}: in{version-build2} $src_root/manifest - hxx{version-build2}: - { - dist = true - clean = ($src_root != $out_root) - } - - # For pre-releases use the complete version to make sure they cannot be - # used in place of another pre-release or the final version. See the - # version module for details on the version.* variable values. - # - if $version.pre_release - lib{odb-boost}: bin.lib.version = @"-$version.project_id" - else - lib{odb-boost}: bin.lib.version = @"-$version.major.$version.minor" - - # Build options. - # - cxx.poptions =+ "-I$out_root" "-I$src_root" -DLIBODB_BOOST_BUILD2 - - obja{*}: cxx.poptions += -DLIBODB_BOOST_STATIC_BUILD - objs{*}: cxx.poptions += -DLIBODB_BOOST_SHARED_BUILD - - # Export options. - # - lib{odb-boost}: - { - cxx.export.poptions = "-I$out_root" "-I$src_root" -DLIBODB_BOOST_BUILD2 - cxx.export.libs = $int_libs - } - - liba{odb-boost}: cxx.export.poptions += -DLIBODB_BOOST_STATIC - libs{odb-boost}: cxx.export.poptions += -DLIBODB_BOOST_SHARED - - # Installation tweaks. - # - install_include = [dir_path] include/odb/boost/ - - # We want these to be picked up whether LIBODB_BOOST_BUILD2 is defined or - # not. - # - hxx{version}@./: install = false - hxx{version-build2}: install = $install_include/version.hxx - hxx{version-build2-stub}@./: install = $install_include/version-build2.hxx - - details/build2/ - { - h{*}: install = false - - if ($cxx.target.system == 'win32-msvc') - { - h{config-vc}@./: install = $install_include/details/ - h{config-vc-stub}@./: install = $install_include/details/build2/config-vc.h - } - else - { - h{config}@./: install = $install_include/details/ - h{config-stub}@./: install = $install_include/details/build2/config.h - } - } - } -} diff --git a/odb/boost/date-time.options b/odb/boost/date-time.options deleted file mode 100644 index a3bd489..0000000 --- a/odb/boost/date-time.options +++ /dev/null @@ -1,5 +0,0 @@ -# file : odb/boost/date-time.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/date-time/gregorian ---profile boost/date-time/posix-time diff --git a/odb/boost/date-time/exceptions.cxx b/odb/boost/date-time/exceptions.cxx deleted file mode 100644 index 3ba8132..0000000 --- a/odb/boost/date-time/exceptions.cxx +++ /dev/null @@ -1,37 +0,0 @@ -// file : odb/boost/date-time/exceptions.cxx -// license : GNU GPL v2; see accompanying LICENSE file - -#include <odb/boost/date-time/exceptions.hxx> - -namespace odb -{ - namespace boost - { - namespace date_time - { - const char* special_value:: - what () const ODB_NOTHROW_NOEXCEPT - { - return "unrepresentable date/time special value"; - } - - special_value* special_value:: - clone () const - { - return new special_value (*this); - } - - const char* value_out_of_range:: - what () const ODB_NOTHROW_NOEXCEPT - { - return "date/time value out of range"; - } - - value_out_of_range* value_out_of_range:: - clone () const - { - return new value_out_of_range (*this); - } - } - } -} diff --git a/odb/boost/date-time/exceptions.hxx b/odb/boost/date-time/exceptions.hxx deleted file mode 100644 index 321f8da..0000000 --- a/odb/boost/date-time/exceptions.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// file : odb/boost/date-time/exceptions.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_EXCEPTIONS_HXX -#define ODB_BOOST_DATE_TIME_EXCEPTIONS_HXX - -#include <odb/pre.hxx> - -#include <odb/details/config.hxx> // ODB_NOTHROW_NOEXCEPT - -#include <odb/boost/exception.hxx> -#include <odb/boost/details/export.hxx> - -namespace odb -{ - namespace boost - { - namespace date_time - { - struct LIBODB_BOOST_EXPORT special_value: exception - { - virtual const char* - what () const ODB_NOTHROW_NOEXCEPT; - - virtual special_value* - clone () const; - }; - - struct LIBODB_BOOST_EXPORT value_out_of_range: exception - { - virtual const char* - what () const ODB_NOTHROW_NOEXCEPT; - - virtual value_out_of_range* - clone () const; - }; - } - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DATE_TIME_EXCEPTIONS_HXX diff --git a/odb/boost/date-time/gregorian-common.options b/odb/boost/date-time/gregorian-common.options deleted file mode 100644 index dfb0b87..0000000 --- a/odb/boost/date-time/gregorian-common.options +++ /dev/null @@ -1,4 +0,0 @@ -# file : odb/boost/date-time/gregorian-common.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version diff --git a/odb/boost/date-time/gregorian-mssql.options b/odb/boost/date-time/gregorian-mssql.options deleted file mode 100644 index 971d19d..0000000 --- a/odb/boost/date-time/gregorian-mssql.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/date-time/gregorian-mssql.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/date-time/mssql/gregorian-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/date-time/mssql/gregorian-traits.hxx>' diff --git a/odb/boost/date-time/gregorian-mysql.options b/odb/boost/date-time/gregorian-mysql.options deleted file mode 100644 index 927dc70..0000000 --- a/odb/boost/date-time/gregorian-mysql.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/date-time/gregorian-mysql.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/date-time/mysql/gregorian-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/date-time/mysql/gregorian-traits.hxx>' diff --git a/odb/boost/date-time/gregorian-oracle.options b/odb/boost/date-time/gregorian-oracle.options deleted file mode 100644 index fca3670..0000000 --- a/odb/boost/date-time/gregorian-oracle.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/date-time/gregorian-oracle.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/date-time/oracle/gregorian-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/date-time/oracle/gregorian-traits.hxx>' diff --git a/odb/boost/date-time/gregorian-pgsql.options b/odb/boost/date-time/gregorian-pgsql.options deleted file mode 100644 index bf6726a..0000000 --- a/odb/boost/date-time/gregorian-pgsql.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/date-time/gregorian-pgsql.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/date-time/pgsql/gregorian-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/date-time/pgsql/gregorian-traits.hxx>' diff --git a/odb/boost/date-time/gregorian-sqlite.options b/odb/boost/date-time/gregorian-sqlite.options deleted file mode 100644 index 355791c..0000000 --- a/odb/boost/date-time/gregorian-sqlite.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/date-time/gregorian-sqlite.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/date-time/sqlite/gregorian-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/date-time/sqlite/gregorian-traits.hxx>' diff --git a/odb/boost/date-time/mssql/gregorian-mapping.hxx b/odb/boost/date-time/mssql/gregorian-mapping.hxx deleted file mode 100644 index 9c64542..0000000 --- a/odb/boost/date-time/mssql/gregorian-mapping.hxx +++ /dev/null @@ -1,15 +0,0 @@ -// file : odb/boost/date-time/mssql/gregorian-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_MAPPING_HXX -#define ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_MAPPING_HXX - -#include <boost/date_time/gregorian/gregorian_types.hpp> - -// By default map boost::gregorian::date to SQL Server DATE (available -// only since SQL Server 2008). We use the NULL value to represent -// not_a_date_time. -// -#pragma db value(boost::gregorian::date) type("DATE") null - -#endif // ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_MAPPING_HXX diff --git a/odb/boost/date-time/mssql/gregorian-traits.hxx b/odb/boost/date-time/mssql/gregorian-traits.hxx deleted file mode 100644 index b2b9a16..0000000 --- a/odb/boost/date-time/mssql/gregorian-traits.hxx +++ /dev/null @@ -1,68 +0,0 @@ -// file : odb/boost/date-time/mssql/gregorian-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_TRAITS_HXX -#define ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <boost/date_time/gregorian/gregorian_types.hpp> - -#include <odb/core.hxx> -#include <odb/mssql/traits.hxx> -#include <odb/boost/date-time/exceptions.hxx> - -namespace odb -{ - namespace mssql - { - template <> - class default_value_traits< ::boost::gregorian::date, id_date> - { - public: - typedef ::boost::gregorian::date value_type; - typedef value_type query_type; - typedef date image_type; - - static void - set_value (value_type& v, const date& i, bool is_null) - { - if (is_null) - v = value_type (::boost::date_time::not_a_date_time); - else - v = value_type (static_cast<value_type::year_type> (i.year), - static_cast<value_type::month_type> (i.month), - static_cast<value_type::day_type> (i.day)); - } - - static void - set_image (date& i, bool& is_null, const value_type& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - i.year = static_cast<SQLSMALLINT> (v.year ()); - i.month = static_cast<SQLUSMALLINT> (v.month ()); - i.day = static_cast<SQLUSMALLINT> (v.day ()); - } - } - }; - - template <> - struct default_type_traits< ::boost::gregorian::date> - { - static const database_type_id db_type_id = id_date; - }; - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_TRAITS_HXX diff --git a/odb/boost/date-time/mssql/posix-time-mapping.hxx b/odb/boost/date-time/mssql/posix-time-mapping.hxx deleted file mode 100644 index 0682dda..0000000 --- a/odb/boost/date-time/mssql/posix-time-mapping.hxx +++ /dev/null @@ -1,21 +0,0 @@ -// file : odb/boost/date-time/mssql/posix-time-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_MAPPING_HXX -#define ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_MAPPING_HXX - -#include <boost/date_time/posix_time/posix_time_types.hpp> - -// By default map boost::posix_time::ptime to SQL Server DATETIME2 -// (available only since SQL Server 2008). We use the NULL value to -// represent not_a_date_time. -// -#pragma db value(boost::posix_time::ptime) type("DATETIME2") null - -// By default map boost::posix_time::time_duration to SQL Server TIME -// (available only since SQL Server 2008). We use the NULL value to -// represent not_a_date_time. -// -#pragma db value(boost::posix_time::time_duration) type("TIME") null - -#endif // ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_MAPPING_HXX diff --git a/odb/boost/date-time/mssql/posix-time-traits.hxx b/odb/boost/date-time/mssql/posix-time-traits.hxx deleted file mode 100644 index 88d0c82..0000000 --- a/odb/boost/date-time/mssql/posix-time-traits.hxx +++ /dev/null @@ -1,194 +0,0 @@ -// file : odb/boost/date-time/mssql/posix-time-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_TRAITS_HXX -#define ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <boost/date_time/posix_time/posix_time_types.hpp> - -#include <odb/core.hxx> -#include <odb/mssql/traits.hxx> -#include <odb/boost/date-time/exceptions.hxx> - -namespace odb -{ - namespace mssql - { - template <> - class default_value_traits< ::boost::posix_time::ptime, id_datetime> - { - public: - typedef ::boost::posix_time::ptime ptime; - typedef ::boost::posix_time::time_duration time_duration; - typedef ::boost::gregorian::date date; - typedef ptime value_type; - typedef ptime query_type; - typedef datetime image_type; - - static void - set_value (ptime& v, const datetime& i, bool is_null) - { - if (is_null) - v = ptime (::boost::date_time::not_a_date_time); - else - { - unsigned long long fract_s (i.fraction); - fract_s = fract_s * time_duration::ticks_per_second () / - 1000000000ULL; - - v = ptime ( - date (static_cast<date::year_type> (i.year), - static_cast<date::month_type> (i.month), - static_cast<date::day_type> (i.day)), - time_duration ( - static_cast<time_duration::hour_type> (i.hour), - static_cast<time_duration::min_type> (i.minute), - static_cast<time_duration::sec_type> (i.second), - static_cast<time_duration::fractional_seconds_type> (fract_s))); - } - } - - static void - set_image (datetime& i, unsigned short s, bool& is_null, const ptime& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - const date& d (v.date ()); - const time_duration& t (v.time_of_day ()); - - is_null = false; - i.year = static_cast<SQLSMALLINT> (d.year ()); - i.month = static_cast<SQLUSMALLINT> (d.month ()); - i.day = static_cast<SQLUSMALLINT> (d.day ()); - i.hour = static_cast<SQLUSMALLINT> (t.hours ()); - i.minute = static_cast<SQLUSMALLINT> (t.minutes ()); - - // Scale value 8 indicates we are dealing with SMALLDATETIME - // which has the minutes precision. - // - if (s != 8) - { - i.second = static_cast<SQLUSMALLINT> (t.seconds ()); - - unsigned long long ns (t.fractional_seconds ()); - ns = ns * 1000000000ULL / time_duration::ticks_per_second (); - - const unsigned int divider[8] = - { - 1000000000, - 100000000, - 10000000, - 1000000, - 100000, - 10000, - 1000, - 100 - }; - - i.fraction = static_cast<SQLUINTEGER> (ns - ns % divider[s]); - } - else - { - i.second = 0; - i.fraction = 0; - } - } - } - }; - - template <> - class default_value_traits< ::boost::posix_time::time_duration, id_time> - { - public: - typedef ::boost::posix_time::time_duration time_duration; - typedef time_duration value_type; - typedef time_duration query_type; - typedef time image_type; - - static void - set_value (time_duration& v, const time& i, bool is_null) - { - if (is_null) - v = time_duration (::boost::date_time::not_a_date_time); - else - { - unsigned long long fract_s (i.fraction); - fract_s = fract_s * time_duration::ticks_per_second () / - 1000000000ULL; - - v = time_duration ( - static_cast<time_duration::hour_type> (i.hour), - static_cast<time_duration::min_type> (i.minute), - static_cast<time_duration::sec_type> (i.second), - static_cast<time_duration::fractional_seconds_type> (fract_s)); - } - } - - static void - set_image (time& i, - unsigned short s, - bool& is_null, - const time_duration& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else if (v.is_negative () || v.hours () > 23) - throw odb::boost::date_time::value_out_of_range (); - else - { - is_null = false; - i.hour = static_cast<SQLUSMALLINT> (v.hours ()); - i.minute = static_cast<SQLUSMALLINT> (v.minutes ()); - i.second = static_cast<SQLUSMALLINT> (v.seconds ()); - - unsigned long long ns (v.fractional_seconds ()); - ns = ns * 1000000000ULL / time_duration::ticks_per_second (); - - const unsigned int divider[8] = - { - 1000000000, - 100000000, - 10000000, - 1000000, - 100000, - 10000, - 1000, - 100 - }; - - i.fraction = static_cast<SQLUINTEGER> (ns - ns % divider[s]); - } - } - }; - - template <> - struct default_type_traits< ::boost::posix_time::ptime> - { - static const database_type_id db_type_id = id_datetime; - }; - - template <> - struct default_type_traits< ::boost::posix_time::time_duration> - { - static const database_type_id db_type_id = id_time; - }; - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_TRAITS_HXX diff --git a/odb/boost/date-time/mysql/gregorian-mapping.hxx b/odb/boost/date-time/mysql/gregorian-mapping.hxx deleted file mode 100644 index 9d23274..0000000 --- a/odb/boost/date-time/mysql/gregorian-mapping.hxx +++ /dev/null @@ -1,14 +0,0 @@ -// file : odb/boost/date-time/mysql/gregorian-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_MAPPING_HXX -#define ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_MAPPING_HXX - -#include <boost/date_time/gregorian/gregorian_types.hpp> - -// By default map boost::gregorian::date to MySQL DATE. We use the -// NULL value to represent not_a_date_time. -// -#pragma db value(boost::gregorian::date) type("DATE") null - -#endif // ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_MAPPING_HXX diff --git a/odb/boost/date-time/mysql/gregorian-traits.hxx b/odb/boost/date-time/mysql/gregorian-traits.hxx deleted file mode 100644 index 6b29dc5..0000000 --- a/odb/boost/date-time/mysql/gregorian-traits.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// file : odb/boost/date-time/mysql/gregorian-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_TRAITS_HXX -#define ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <boost/date_time/gregorian/gregorian_types.hpp> - -#include <odb/core.hxx> -#include <odb/mysql/traits.hxx> -#include <odb/boost/date-time/exceptions.hxx> - -namespace odb -{ - namespace mysql - { - template <> - struct default_value_traits< ::boost::gregorian::date, id_date> - { - typedef ::boost::gregorian::date date; - typedef date value_type; - typedef date query_type; - typedef MYSQL_TIME image_type; - - static void - set_value (date& v, const MYSQL_TIME& i, bool is_null) - { - if (is_null) - v = date (::boost::date_time::not_a_date_time); - else - v = date (i.year, i.month, i.day); - } - - static void - set_image (MYSQL_TIME& i, bool& is_null, const date& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - i.neg = false; - i.year = v.year (); - i.month = v.month (); - i.day = v.day (); - - i.hour = 0; - i.minute = 0; - i.second = 0; - i.second_part = 0; - } - } - }; - - template <> - struct default_type_traits< ::boost::gregorian::date> - { - static const database_type_id db_type_id = id_date; - }; - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_TRAITS_HXX diff --git a/odb/boost/date-time/mysql/posix-time-mapping.hxx b/odb/boost/date-time/mysql/posix-time-mapping.hxx deleted file mode 100644 index f3908b3..0000000 --- a/odb/boost/date-time/mysql/posix-time-mapping.hxx +++ /dev/null @@ -1,19 +0,0 @@ -// file : odb/boost/date-time/mysql/posix-time-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_MAPPING_HXX -#define ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_MAPPING_HXX - -#include <boost/date_time/posix_time/posix_time_types.hpp> - -// By default map boost::posix_time::ptime to MySQL DATETIME. We use -// the NULL value to represent not_a_date_time. -// -#pragma db value(boost::posix_time::ptime) type("DATETIME") null - -// By default map boost::posix_time::time_duration to MySQL TIME. We -// use the NULL value to represent not_a_date_time. -// -#pragma db value(boost::posix_time::time_duration) type("TIME") null - -#endif // ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_MAPPING_HXX diff --git a/odb/boost/date-time/mysql/posix-time-traits.hxx b/odb/boost/date-time/mysql/posix-time-traits.hxx deleted file mode 100644 index 28c42c1..0000000 --- a/odb/boost/date-time/mysql/posix-time-traits.hxx +++ /dev/null @@ -1,238 +0,0 @@ -// file : odb/boost/date-time/mysql/posix-time-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_TRAITS_HXX -#define ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <cstdlib> // std::abs - -#include <boost/date_time/posix_time/posix_time_types.hpp> - -#include <odb/core.hxx> -#include <odb/mysql/traits.hxx> -#include <odb/boost/date-time/exceptions.hxx> - -namespace odb -{ - namespace mysql - { - template <> - struct default_value_traits< ::boost::posix_time::ptime, id_datetime> - { - typedef ::boost::posix_time::ptime ptime; - typedef ::boost::posix_time::time_duration time_duration; - typedef ::boost::gregorian::date date; - typedef ptime value_type; - typedef ptime query_type; - typedef MYSQL_TIME image_type; - - static void - set_value (ptime& v, const MYSQL_TIME& i, bool is_null) - { - if (is_null) - v = ptime (::boost::date_time::not_a_date_time); - else - { - // Since MySQL 5.6.4, the microseconds part is no longer ignored. - // - unsigned long long fract_s (i.second_part); - fract_s = fract_s * time_duration::ticks_per_second () / 1000000ULL; - - v = ptime ( - date (i.year, i.month, i.day), - time_duration ( - i.hour, - i.minute, - i.second, - static_cast<time_duration::fractional_seconds_type> (fract_s))); - } - } - - static void - set_image (MYSQL_TIME& i, bool& is_null, const ptime& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - i.neg = false; - - const date& d (v.date ()); - i.year = d.year (); - i.month = d.month (); - i.day = d.day (); - - const time_duration& t (v.time_of_day ()); - i.hour = t.hours (); - i.minute = t.minutes (); - i.second = t.seconds (); - - unsigned long long ms (t.fractional_seconds ()); - ms = ms * 1000000ULL / time_duration::ticks_per_second (); - i.second_part = static_cast<unsigned long> (ms); - } - } - }; - - template <> - struct default_value_traits< ::boost::posix_time::ptime, id_timestamp> - { - typedef ::boost::posix_time::ptime ptime; - typedef ::boost::posix_time::time_duration time_duration; - typedef ::boost::gregorian::date date; - typedef ptime value_type; - typedef ptime query_type; - typedef MYSQL_TIME image_type; - - static void - set_value (ptime& v, const MYSQL_TIME& i, bool is_null) - { - if (is_null) - v = ptime (::boost::date_time::not_a_date_time); - else - { - // Since MySQL 5.6.4, the microseconds part is no longer ignored. - // - unsigned long long fract_s (i.second_part); - fract_s = fract_s * time_duration::ticks_per_second () / 1000000ULL; - - v = ptime ( - date (i.year, i.month, i.day), - time_duration ( - i.hour, - i.minute, - i.second, - static_cast<time_duration::fractional_seconds_type> (fract_s))); - } - } - - static void - set_image (MYSQL_TIME& i, bool& is_null, const ptime& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else if (v < ptime (date (1970, ::boost::date_time::Jan, 1), - time_duration (0, 0, 1)) || - v > ptime (date (2038, ::boost::date_time::Jan, 19), - time_duration (3, 14, 7))) - throw odb::boost::date_time::value_out_of_range (); - else - { - is_null = false; - i.neg = false; - - const date& d (v.date ()); - i.year = d.year (); - i.month = d.month (); - i.day = d.day (); - - const time_duration& t (v.time_of_day ()); - i.hour = t.hours (); - i.minute = t.minutes (); - i.second = t.seconds (); - - unsigned long long ms (t.fractional_seconds ()); - ms = ms * 1000000ULL / time_duration::ticks_per_second (); - i.second_part = static_cast<unsigned long> (ms); - } - } - }; - - template <> - struct default_value_traits< ::boost::posix_time::time_duration, id_time> - { - typedef ::boost::posix_time::time_duration time_duration; - typedef time_duration value_type; - typedef time_duration query_type; - typedef MYSQL_TIME image_type; - - static const unsigned short max_hours = 838; - - static void - set_value (time_duration& v, const MYSQL_TIME& i, bool is_null) - { - if (is_null) - v = time_duration (::boost::date_time::not_a_date_time); - else - { - // Since MySQL 5.6.4, the microseconds part is no longer ignored. - // - unsigned long long fract_s (i.second_part); - fract_s = fract_s * time_duration::ticks_per_second () / 1000000ULL; - - v = time_duration ( - i.hour, - i.minute, - i.second, - static_cast<time_duration::fractional_seconds_type> (fract_s)); - - if (i.neg) - v = v.invert_sign (); - } - } - - static void - set_image (MYSQL_TIME& i, bool& is_null, const time_duration& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else if (std::abs (v.hours ()) > max_hours) - throw odb::boost::date_time::value_out_of_range (); - else - { - is_null = false; - i.neg = v.is_negative (); - - i.year = 0; - i.month = 0; - i.day = 0; - - i.hour = std::abs (v.hours ()); - i.minute = std::abs (v.minutes ()); - i.second = std::abs (v.seconds ()); - - // Some compilers, e.g., VC8, don't have 64-bit abs() overload. - // - time_duration::fractional_seconds_type sms (v.fractional_seconds ()); - unsigned long long ms (sms >= 0 ? sms : -sms); - ms = ms * 1000000ULL / time_duration::ticks_per_second (); - i.second_part = static_cast<unsigned long> (ms); - } - } - }; - - template <> - struct default_type_traits< ::boost::posix_time::ptime> - { - static const database_type_id db_type_id = id_datetime; - }; - - template <> - struct default_type_traits< ::boost::posix_time::time_duration> - { - static const database_type_id db_type_id = id_time; - }; - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_TRAITS_HXX diff --git a/odb/boost/date-time/oracle/gregorian-mapping.hxx b/odb/boost/date-time/oracle/gregorian-mapping.hxx deleted file mode 100644 index 65ad008..0000000 --- a/odb/boost/date-time/oracle/gregorian-mapping.hxx +++ /dev/null @@ -1,14 +0,0 @@ -// file : odb/boost/date-time/oracle/gregorian-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_MAPPING_HXX -#define ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_MAPPING_HXX - -#include <boost/date_time/gregorian/gregorian_types.hpp> - -// By default map boost::gregorian::date to Oracle DATE. We use the -// NULL value to represent not_a_date_time. -// -#pragma db value(boost::gregorian::date) type("DATE") null - -#endif // ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_MAPPING_HXX diff --git a/odb/boost/date-time/oracle/gregorian-traits.hxx b/odb/boost/date-time/oracle/gregorian-traits.hxx deleted file mode 100644 index 9e02e25..0000000 --- a/odb/boost/date-time/oracle/gregorian-traits.hxx +++ /dev/null @@ -1,83 +0,0 @@ -// file : odb/boost/date-time/oracle/gregorian-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_TRAITS_HXX -#define ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <boost/date_time/gregorian/gregorian_types.hpp> - -#include <odb/core.hxx> - -#include <odb/oracle/traits.hxx> -#include <odb/oracle/details/date.hxx> - -#include <odb/boost/date-time/exceptions.hxx> - -namespace odb -{ - namespace oracle - { - template <> - struct default_value_traits< ::boost::gregorian::date, id_date> - { - typedef ::boost::gregorian::date date; - typedef date value_type; - typedef date query_type; - typedef char* image_type; - - static void - set_value (date& v, const char* b, bool is_null) - { - if (is_null) - v = date (::boost::date_time::not_a_date_time); - else - { - short y; - unsigned char m, d, h, minute, s; - - details::get_date (b, y, m, d, h, minute, s); - - v = date (static_cast<date::year_type> (y), - static_cast<date::month_type> (m), - static_cast<date::day_type> (d)); - } - } - - static void - set_image (char* b, bool& is_null, const date& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - - details::set_date (b, - static_cast<short> (v.year ()), - static_cast<unsigned char> (v.month ()), - static_cast<unsigned char> (v.day ()), - 0, - 0, - 0); - } - } - }; - - template <> - struct default_type_traits< ::boost::gregorian::date> - { - static const database_type_id db_type_id = id_date; - }; - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_TRAITS_HXX diff --git a/odb/boost/date-time/oracle/posix-time-mapping.hxx b/odb/boost/date-time/oracle/posix-time-mapping.hxx deleted file mode 100644 index 26c642f..0000000 --- a/odb/boost/date-time/oracle/posix-time-mapping.hxx +++ /dev/null @@ -1,20 +0,0 @@ -// file : odb/boost/date-time/oracle/posix-time-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_MAPPING_HXX -#define ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_MAPPING_HXX - -#include <boost/date_time/posix_time/posix_time_types.hpp> - -// By default map boost::posix_time::ptime to Oracle TIMESTAMP. We use the NULL -// value to represent not_a_date_time. -// -#pragma db value(boost::posix_time::ptime) type("TIMESTAMP") null - -// By default map boost::posix_time::time_duration to Oracle -// INTERVAL DAY TO SECOND. We use the NULL value to represent not_a_date_time. -// -#pragma db value(boost::posix_time::time_duration) \ - type("INTERVAL DAY TO SECOND") null - -#endif // ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_MAPPING_HXX diff --git a/odb/boost/date-time/oracle/posix-time-traits.hxx b/odb/boost/date-time/oracle/posix-time-traits.hxx deleted file mode 100644 index 1f830e0..0000000 --- a/odb/boost/date-time/oracle/posix-time-traits.hxx +++ /dev/null @@ -1,237 +0,0 @@ -// file : odb/boost/date-time/oracle/posix-time-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_TRAITS_HXX -#define ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <boost/date_time/posix_time/posix_time_types.hpp> - -#include <odb/core.hxx> - -#include <odb/oracle/traits.hxx> -#include <odb/oracle/oracle-fwd.hxx> // ub1, sb2, ub4 -#include <odb/oracle/oracle-types.hxx> // odb::oracle::{datetime interval_ds} -#include <odb/oracle/details/date.hxx> - -#include <odb/boost/date-time/exceptions.hxx> - -namespace odb -{ - namespace oracle - { - template <> - struct default_value_traits< ::boost::posix_time::ptime, id_timestamp> - { - typedef ::boost::posix_time::ptime ptime; - typedef ::boost::posix_time::time_duration time_duration; - typedef ::boost::gregorian::date date; - - typedef ptime value_type; - typedef ptime query_type; - typedef datetime image_type; - - static void - set_value (ptime& v, const datetime& i, bool is_null) - { - if (is_null) - v = ptime (::boost::date_time::not_a_date_time); - else - { - sb2 y; - ub1 m, d, h, minute, s; - ub4 ns; - - i.get (y, m, d, h, minute, s, ns); - - unsigned long long fract_s (ns); - fract_s = fract_s * time_duration::ticks_per_second () / - 1000000000ULL; - - v = ptime ( - date (static_cast<date::year_type> (y), - static_cast<date::month_type> (m), - static_cast<date::day_type> (d)), - time_duration ( - static_cast<time_duration::hour_type> (h), - static_cast<time_duration::min_type> (minute), - static_cast<time_duration::sec_type> (s), - static_cast<time_duration::fractional_seconds_type> (fract_s))); - } - } - - static void - set_image (datetime& i, bool& is_null, const ptime& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - - const date& d (v.date ()); - const time_duration& t (v.time_of_day ()); - - unsigned long long ns (t.fractional_seconds ()); - ns = ns * 1000000000ULL / time_duration::ticks_per_second (); - - i.set (static_cast<sb2> (d.year ()), - static_cast<ub1> (d.month ()), - static_cast<ub1> (d.day ()), - static_cast<ub1> (t.hours ()), - static_cast<ub1> (t.minutes ()), - static_cast<ub1> (t.seconds ()), - static_cast<ub4> (ns)); - } - } - }; - - template <> - struct default_value_traits< ::boost::posix_time::ptime, id_date> - { - typedef ::boost::posix_time::ptime ptime; - typedef ::boost::posix_time::time_duration time_duration; - typedef ::boost::gregorian::date date; - - typedef ptime value_type; - typedef ptime query_type; - typedef char* image_type; - - static void - set_value (ptime& v, const char* b, bool is_null) - { - if (is_null) - v = ptime (::boost::date_time::not_a_date_time); - else - { - short y; - unsigned char m, d, h, minute, s; - - details::get_date (b, y, m, d, h, minute, s); - - v = ptime ( - date (static_cast<date::year_type> (y), - static_cast<date::month_type> (m), - static_cast<date::day_type> (d)), - time_duration ( - static_cast<time_duration::hour_type> (h), - static_cast<time_duration::min_type> (minute), - static_cast<time_duration::sec_type> (s), - 0)); - } - } - - static void - set_image (char* b, bool& is_null, const ptime& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - - const date& d (v.date ()); - const time_duration& t (v.time_of_day ()); - - details::set_date (b, - static_cast<short> (d.year ()), - static_cast<unsigned char> (d.month ()), - static_cast<unsigned char> (d.day ()), - static_cast<unsigned char> (t.hours ()), - static_cast<unsigned char> (t.minutes ()), - static_cast<unsigned char> (t.seconds ())); - } - } - }; - - template <> - struct default_value_traits< ::boost::posix_time::time_duration, - id_interval_ds> - { - typedef ::boost::posix_time::time_duration time_duration; - - typedef time_duration value_type; - typedef time_duration query_type; - typedef interval_ds image_type; - - static void - set_value (time_duration& v, - const interval_ds& i, - bool is_null) - { - if (is_null) - v = time_duration (::boost::date_time::not_a_date_time); - else - { - sb4 d, h, m, s, ns; - i.get (d, h, m, s, ns); - - unsigned long long fract_s (ns); - fract_s = fract_s * time_duration::ticks_per_second () / - 1000000000ULL; - - v = time_duration ( - static_cast<time_duration::hour_type> ( - static_cast<unsigned long long> (d) * 24 + h), - static_cast<time_duration::min_type> (m), - static_cast<time_duration::sec_type> (s), - static_cast<time_duration::fractional_seconds_type> (fract_s)); - } - } - - static void - set_image (interval_ds& i, - bool& is_null, - const time_duration& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - - unsigned long long ns (v.fractional_seconds ()); - ns = ns * 1000000000ULL / time_duration::ticks_per_second (); - - i.set (0, - static_cast<sb4> (v.hours ()), - static_cast<sb4> (v.minutes ()), - static_cast<sb4> (v.seconds ()), - static_cast<sb4> (ns)); - } - } - }; - - template <> - struct default_type_traits< ::boost::posix_time::ptime> - { - static const database_type_id db_type_id = id_timestamp; - }; - - template <> - struct default_type_traits< ::boost::posix_time::time_duration> - { - static const database_type_id db_type_id = id_interval_ds; - }; - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_TRAITS_HXX diff --git a/odb/boost/date-time/pgsql/gregorian-mapping.hxx b/odb/boost/date-time/pgsql/gregorian-mapping.hxx deleted file mode 100644 index 36a9334..0000000 --- a/odb/boost/date-time/pgsql/gregorian-mapping.hxx +++ /dev/null @@ -1,14 +0,0 @@ -// file : odb/boost/date-time/pgsql/gregorian-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_MAPPING_HXX -#define ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_MAPPING_HXX - -#include <boost/date_time/gregorian/gregorian_types.hpp> - -// By default map boost::gregorian::date to PostgreSQL DATE. We use the -// NULL value to represent not_a_date_time. -// -#pragma db value(boost::gregorian::date) type("DATE") null - -#endif // ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_MAPPING_HXX diff --git a/odb/boost/date-time/pgsql/gregorian-traits.hxx b/odb/boost/date-time/pgsql/gregorian-traits.hxx deleted file mode 100644 index a0dcce2..0000000 --- a/odb/boost/date-time/pgsql/gregorian-traits.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// file : odb/boost/date-time/pgsql/gregorian-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_TRAITS_HXX -#define ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <boost/date_time/gregorian/gregorian_types.hpp> - -#include <odb/core.hxx> -#include <odb/pgsql/traits.hxx> -#include <odb/boost/date-time/exceptions.hxx> - -namespace odb -{ - namespace pgsql - { - template <> - struct default_value_traits< ::boost::gregorian::date, id_date> - { - typedef ::boost::gregorian::date date; - - typedef details::endian_traits endian_traits; - - typedef date value_type; - typedef date query_type; - typedef int image_type; - - static void - set_value (date& v, int i, bool is_null) - { - if (is_null) - v = date (::boost::date_time::not_a_date_time); - else - v = date (2000, 1, 1) + ::boost::gregorian::date_duration ( - endian_traits::ntoh (i)); - } - - static void - set_image (int& i, bool& is_null, const date& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - i = endian_traits::hton ( - static_cast<int> ((v - date (2000, 1, 1)).days ())); - } - } - }; - - template <> - struct default_type_traits< ::boost::gregorian::date> - { - static const database_type_id db_type_id = id_date; - }; - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_TRAITS_HXX diff --git a/odb/boost/date-time/pgsql/posix-time-mapping.hxx b/odb/boost/date-time/pgsql/posix-time-mapping.hxx deleted file mode 100644 index ace906d..0000000 --- a/odb/boost/date-time/pgsql/posix-time-mapping.hxx +++ /dev/null @@ -1,19 +0,0 @@ -// file : odb/boost/date-time/pgsql/posix-time-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_MAPPING_HXX -#define ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_MAPPING_HXX - -#include <boost/date_time/posix_time/posix_time_types.hpp> - -// By default map boost::posix_time::ptime to PostgreSQL TIMESTAMP. We use -// the NULL value to represent not_a_date_time. -// -#pragma db value(boost::posix_time::ptime) type("TIMESTAMP") null - -// By default map boost::posix_time::time_duration to PostgreSQL TIME. We -// use the NULL value to represent not_a_date_time. -// -#pragma db value(boost::posix_time::time_duration) type("TIME") null - -#endif // ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_MAPPING_HXX diff --git a/odb/boost/date-time/pgsql/posix-time-traits.hxx b/odb/boost/date-time/pgsql/posix-time-traits.hxx deleted file mode 100644 index 6713adc..0000000 --- a/odb/boost/date-time/pgsql/posix-time-traits.hxx +++ /dev/null @@ -1,169 +0,0 @@ -// file : odb/boost/date-time/pgsql/posix-time-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_TRAITS_HXX -#define ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <boost/date_time/posix_time/posix_time_types.hpp> - -#include <odb/core.hxx> -#include <odb/pgsql/traits.hxx> -#include <odb/boost/date-time/exceptions.hxx> - -namespace odb -{ - namespace pgsql - { - // Implementation of the mapping between boost::posix_time::ptime and - // PostgreSQL TIMESTAMP. TIMESTAMP values are stored as micro-seconds - // since the PostgreSQL epoch 2000-01-01. - // - template <> - struct default_value_traits< ::boost::posix_time::ptime, id_timestamp> - { - typedef ::boost::gregorian::date date; - typedef ::boost::posix_time::ptime ptime; - typedef ::boost::posix_time::time_duration time_duration; - - typedef details::endian_traits endian_traits; - - typedef ptime value_type; - typedef ptime query_type; - typedef long long image_type; - - static const long long neg_inf = -0x7fffffffffffffffLL - 1; - static const long long pos_inf = 0x7fffffffffffffffLL; - - static void - set_value (ptime& v, long long i, bool is_null) - { - if (is_null) - v = ptime (::boost::date_time::not_a_date_time); - else - { - i = endian_traits::ntoh (i); - - if (i == neg_inf) - v = ptime (::boost::date_time::neg_infin); - else if (i == pos_inf) - v = ptime (::boost::date_time::pos_infin); - else - { - const ptime pg_epoch (date (2000, 1, 1), - time_duration (0, 0, 0)); - - // We need to split the microsecond image into hours and - // microseconds to avoid overflow during the fractional seconds - // calculation. - // - time_duration::hour_type h ( - static_cast<time_duration::hour_type> (i / 3600000000LL)); - - i -= static_cast<long long> (h) * 3600000000LL; - - v = pg_epoch + - time_duration ( - h, - 0, - 0, - static_cast<time_duration::fractional_seconds_type> ( - i * time_duration::ticks_per_second () / 1000000LL)); - } - } - } - - static void - set_image (long long& i, bool& is_null, const ptime& v) - { - is_null = false; - - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else if (v.is_neg_infinity ()) - i = endian_traits::hton (neg_inf); - else if (v.is_pos_infinity ()) - i = endian_traits::hton (pos_inf); - else - throw odb::boost::date_time::special_value (); - } - else - { - const ptime pg_epoch (date (2000, 1, 1), time_duration (0, 0, 0)); - i = endian_traits::hton ( - static_cast<long long> ((v - pg_epoch).total_microseconds ())); - } - } - }; - - // Implementation of the mapping between boost::posix_time::time_duration - // and PostgreSQL TIME. The TIME values are stored as micro-seconds since - // 00:00:00. - // - template <> - struct default_value_traits< ::boost::posix_time::time_duration, id_time> - { - typedef ::boost::posix_time::time_duration time_duration; - - typedef details::endian_traits endian_traits; - - typedef time_duration value_type; - typedef time_duration query_type; - typedef long long image_type; - - static void - set_value (time_duration& v, long long i, bool is_null) - { - if (is_null) - v = time_duration (::boost::date_time::not_a_date_time); - else - v = time_duration ( - 0, - 0, - 0, - static_cast<time_duration::fractional_seconds_type> ( - endian_traits::ntoh (i) * time_duration::ticks_per_second () / - 1000000LL)); - } - - static void - set_image (long long& i, bool& is_null, const time_duration& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else if (v.hours () < 0 || v.hours () > 24) - throw odb::boost::date_time::value_out_of_range (); - else - { - is_null = false; - i = endian_traits::hton ( - static_cast<long long> (v.total_microseconds ())); - } - } - }; - - template <> - struct default_type_traits< ::boost::posix_time::ptime> - { - static const database_type_id db_type_id = id_timestamp; - }; - - template <> - struct default_type_traits< ::boost::posix_time::time_duration> - { - static const database_type_id db_type_id = id_time; - }; - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_TRAITS_HXX diff --git a/odb/boost/date-time/posix-time-common.options b/odb/boost/date-time/posix-time-common.options deleted file mode 100644 index 9421eeb..0000000 --- a/odb/boost/date-time/posix-time-common.options +++ /dev/null @@ -1,4 +0,0 @@ -# file : odb/boost/date-time/posix-time-common.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version diff --git a/odb/boost/date-time/posix-time-mssql.options b/odb/boost/date-time/posix-time-mssql.options deleted file mode 100644 index 656c718..0000000 --- a/odb/boost/date-time/posix-time-mssql.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/date-time/posix-time-mssql.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/date-time/mssql/posix-time-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/date-time/mssql/posix-time-traits.hxx>' diff --git a/odb/boost/date-time/posix-time-mysql.options b/odb/boost/date-time/posix-time-mysql.options deleted file mode 100644 index 5d5677d..0000000 --- a/odb/boost/date-time/posix-time-mysql.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/date-time/posix-time-mysql.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/date-time/mysql/posix-time-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/date-time/mysql/posix-time-traits.hxx>' diff --git a/odb/boost/date-time/posix-time-oracle.options b/odb/boost/date-time/posix-time-oracle.options deleted file mode 100644 index 0812568..0000000 --- a/odb/boost/date-time/posix-time-oracle.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/date-time/posix-time-oracle.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/date-time/oracle/posix-time-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/date-time/oracle/posix-time-traits.hxx>' diff --git a/odb/boost/date-time/posix-time-pgsql.options b/odb/boost/date-time/posix-time-pgsql.options deleted file mode 100644 index d2830ff..0000000 --- a/odb/boost/date-time/posix-time-pgsql.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/date-time/posix-time-pgsql.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/date-time/pgsql/posix-time-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/date-time/pgsql/posix-time-traits.hxx>' diff --git a/odb/boost/date-time/posix-time-sqlite.options b/odb/boost/date-time/posix-time-sqlite.options deleted file mode 100644 index bbe52dd..0000000 --- a/odb/boost/date-time/posix-time-sqlite.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/date-time/posix-time-sqlite.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/date-time/sqlite/posix-time-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/date-time/sqlite/posix-time-traits.hxx>' diff --git a/odb/boost/date-time/sqlite/gregorian-mapping.hxx b/odb/boost/date-time/sqlite/gregorian-mapping.hxx deleted file mode 100644 index 9880927..0000000 --- a/odb/boost/date-time/sqlite/gregorian-mapping.hxx +++ /dev/null @@ -1,14 +0,0 @@ -// file : odb/boost/date-time/sqlite/gregorian-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_MAPPING_HXX -#define ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_MAPPING_HXX - -#include <boost/date_time/gregorian/gregorian_types.hpp> - -// By default map boost::gregorian::date to TEXT. We use the -// NULL value to represent not_a_date_time. -// -#pragma db value(boost::gregorian::date) type("TEXT") null - -#endif // ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_MAPPING_HXX diff --git a/odb/boost/date-time/sqlite/gregorian-traits.hxx b/odb/boost/date-time/sqlite/gregorian-traits.hxx deleted file mode 100644 index b48b4dd..0000000 --- a/odb/boost/date-time/sqlite/gregorian-traits.hxx +++ /dev/null @@ -1,133 +0,0 @@ -// file : odb/boost/date-time/sqlite/gregorian-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_TRAITS_HXX -#define ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <string> -#include <cstddef> // std::size_t -#include <cstring> // std::memcpy -#include <ctime> // std::time_t - -#include <boost/date_time/gregorian/gregorian_types.hpp> // date -#include <boost/date_time/posix_time/posix_time_types.hpp> // time_duration -#include <boost/date_time/gregorian/parsers.hpp> // from_simple_string -#include <boost/date_time/gregorian/formatters.hpp> // to_iso_extended_string -#include <boost/date_time/posix_time/conversion.hpp> // from_time_t - -#include <odb/core.hxx> -#include <odb/details/buffer.hxx> -#include <odb/sqlite/traits.hxx> - -#include <odb/boost/date-time/exceptions.hxx> - -namespace odb -{ - namespace sqlite - { - template <> - struct default_value_traits< ::boost::gregorian::date, id_text> - { - typedef ::boost::gregorian::date date; - typedef date value_type; - typedef date query_type; - typedef details::buffer image_type; - - static void - set_value (date& v, - const details::buffer& i, - std::size_t n, - bool is_null) - { - if (is_null) - v = date (::boost::date_time::not_a_date_time); - else - v = ::boost::gregorian::from_simple_string ( - std::string (i.data (), n)); - } - - static void - set_image (details::buffer& i, - std::size_t& n, - bool& is_null, - const date& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - - const std::string& s ( - ::boost::gregorian::to_iso_extended_string (v)); - - n = s.size (); - - if (n > i.capacity ()) - i.capacity (n); - - std::memcpy (i.data (), s.data (), n); - } - } - }; - - template <> - struct default_value_traits< ::boost::gregorian::date, id_integer> - { - typedef ::boost::gregorian::date date; - typedef ::boost::posix_time::time_duration time_duration; - typedef ::boost::posix_time::ptime ptime; - typedef date value_type; - typedef date query_type; - typedef long long image_type; - - static void - set_value (date& v, long long i, bool is_null) - { - if (is_null) - v = date (::boost::date_time::not_a_date_time); - else - v = ::boost::posix_time::from_time_t ( - static_cast<std::time_t> (i)).date (); - } - - static void - set_image (long long& i, bool& is_null, const date& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - - ptime epoch (date (1970, 1, 1), time_duration (0, 0, 0)); - i = static_cast<long long> ( - (ptime (v, time_duration (0, 0, 0)) - epoch).ticks () / - time_duration::ticks_per_second ()); - } - } - }; - - template <> - struct default_type_traits< ::boost::gregorian::date> - { - static const database_type_id db_type_id = id_text; - }; - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_TRAITS_HXX diff --git a/odb/boost/date-time/sqlite/posix-time-mapping.hxx b/odb/boost/date-time/sqlite/posix-time-mapping.hxx deleted file mode 100644 index 544a7aa..0000000 --- a/odb/boost/date-time/sqlite/posix-time-mapping.hxx +++ /dev/null @@ -1,19 +0,0 @@ -// file : odb/boost/date-time/sqlite/posix-time-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_MAPPING_HXX -#define ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_MAPPING_HXX - -#include <boost/date_time/posix_time/posix_time_types.hpp> - -// By default map boost::posix_time::ptime to TEXT. We use -// the NULL value to represent not_a_date_time. -// -#pragma db value(boost::posix_time::ptime) type("TEXT") null - -// By default map boost::posix_time::time_duration to TEXT. We -// use the NULL value to represent not_a_date_time. -// -#pragma db value(boost::posix_time::time_duration) type("TEXT") null - -#endif // ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_MAPPING_HXX diff --git a/odb/boost/date-time/sqlite/posix-time-traits.hxx b/odb/boost/date-time/sqlite/posix-time-traits.hxx deleted file mode 100644 index 482f203..0000000 --- a/odb/boost/date-time/sqlite/posix-time-traits.hxx +++ /dev/null @@ -1,238 +0,0 @@ -// file : odb/boost/date-time/sqlite/posix-time-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_TRAITS_HXX -#define ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <string> -#include <cstddef> // std::size_t -#include <cstring> // std::memcpy -#include <ctime> // std::time_t - -#include <boost/date_time/posix_time/posix_time_types.hpp> -#include <boost/date_time/posix_time/time_parsers.hpp> // time_from_string -#include <boost/date_time/posix_time/time_formatters.hpp> // to_simple_string -#include <boost/date_time/posix_time/conversion.hpp> // from_time_t - -#include <odb/core.hxx> -#include <odb/details/buffer.hxx> -#include <odb/sqlite/traits.hxx> - -#include <odb/boost/date-time/exceptions.hxx> - -namespace odb -{ - namespace sqlite - { - template <> - struct default_value_traits< ::boost::posix_time::ptime, id_text> - { - typedef ::boost::posix_time::ptime ptime; - typedef ptime value_type; - typedef ptime query_type; - typedef details::buffer image_type; - - static void - set_value (ptime& v, - const details::buffer& i, - std::size_t n, - bool is_null) - { - if (is_null) - v = ptime (::boost::date_time::not_a_date_time); - else - v = ::boost::posix_time::time_from_string ( - std::string (i.data (), n)); - } - - static void - set_image (details::buffer& i, - std::size_t& n, - bool& is_null, - const ptime& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - - std::string s (::boost::posix_time::to_iso_extended_string (v)); - - // Replace ',' in iso string with '.'. SQLite requires the - // latter for date/time functions. - // - std::size_t p = s.rfind (','); - if (p != std::string::npos) - s[p] = '.'; - - // Remove 'T' separator as Boost is unable to parse correctly. - // - p = s.find ('T'); - if (p != std::string::npos) - s[p] = ' '; - - n = s.size (); - if (n > i.capacity ()) - i.capacity (n); - - std::memcpy (i.data (), s.data (), n); - } - } - }; - - // Implementation of the mapping between boost::posix_time::ptime and - // SQLite INTEGER. The integer value represents UNIX time. - // - template <> - struct default_value_traits< ::boost::posix_time::ptime, id_integer> - { - typedef ::boost::gregorian::date date; - typedef ::boost::posix_time::ptime ptime; - typedef ::boost::posix_time::time_duration time_duration; - typedef ptime value_type; - typedef ptime query_type; - typedef long long image_type; - - static void - set_value (ptime& v, long long i, bool is_null) - { - if (is_null) - v = ptime (::boost::date_time::not_a_date_time); - else - v = ::boost::posix_time::from_time_t (static_cast<std::time_t> (i)); - } - - static void - set_image (long long& i, bool& is_null, const ptime& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - - ptime epoch (date (1970, 1, 1), time_duration (0, 0, 0)); - i = static_cast<long long> ( - (v - epoch).ticks () / time_duration::ticks_per_second ()); - } - } - }; - - template <> - struct default_value_traits< ::boost::posix_time::time_duration, id_text> - { - typedef ::boost::posix_time::time_duration time_duration; - typedef time_duration value_type; - typedef time_duration query_type; - typedef details::buffer image_type; - - static void - set_value (time_duration& v, - const details::buffer& i, - std::size_t n, - bool is_null) - { - if (is_null) - v = time_duration (::boost::date_time::not_a_date_time); - else - { - v = ::boost::posix_time::duration_from_string ( - std::string (i.data (), n)); - } - } - - static void - set_image (details::buffer& i, - std::size_t& n, - bool& is_null, - const time_duration& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else if (v.total_seconds () < 0) - throw odb::boost::date_time::value_out_of_range (); - else - { - is_null = false; - - const std::string& s (::boost::posix_time::to_simple_string (v)); - - n = s.size (); - if (n > i.capacity ()) - i.capacity (n); - - std::memcpy (i.data (), s.data (), n); - } - } - }; - - template <> - struct default_value_traits< ::boost::posix_time::time_duration, id_integer> - { - typedef ::boost::posix_time::time_duration time_duration; - typedef time_duration value_type; - typedef time_duration query_type; - typedef details::buffer image_type; - - static void - set_value (time_duration& v, long long i, bool is_null) - { - if (is_null) - v = time_duration (::boost::date_time::not_a_date_time); - else - v = time_duration (0, 0, static_cast<time_duration::sec_type> (i)); - } - - static void - set_image (long long& i, bool& is_null, const time_duration& v) - { - if (v.is_special ()) - { - if (v.is_not_a_date_time ()) - is_null = true; - else - throw odb::boost::date_time::special_value (); - } - else - { - is_null = false; - i = static_cast<long long> (v.total_seconds ()); - } - } - }; - - template <> - struct default_type_traits< ::boost::posix_time::ptime> - { - static const database_type_id db_type_id = id_text; - }; - - template <> - struct default_type_traits< ::boost::posix_time::time_duration> - { - static const database_type_id db_type_id = id_text; - }; - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_TRAITS_HXX diff --git a/odb/boost/details/build2/config-stub.h b/odb/boost/details/build2/config-stub.h deleted file mode 100644 index 6f5f461..0000000 --- a/odb/boost/details/build2/config-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/boost/details/build2/config-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/boost/details/config.h> diff --git a/odb/boost/details/build2/config-vc-stub.h b/odb/boost/details/build2/config-vc-stub.h deleted file mode 100644 index c6650f3..0000000 --- a/odb/boost/details/build2/config-vc-stub.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/boost/details/build2/config-vc-stub.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -#include <odb/boost/details/config-vc.h> diff --git a/odb/boost/details/build2/config-vc.h b/odb/boost/details/build2/config-vc.h deleted file mode 100644 index 5cdff2b..0000000 --- a/odb/boost/details/build2/config-vc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* file : odb/boost/details/build2/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Configuration file for Windows/VC++ for the build2 build. */ - -#ifndef ODB_BOOST_DETAILS_CONFIG_VC_H -#define ODB_BOOST_DETAILS_CONFIG_VC_H - -/* Define LIBODB_BOOST_BUILD2 for the installed case. */ -#ifndef LIBODB_BOOST_BUILD2 -# define LIBODB_BOOST_BUILD2 -#endif - -#endif /* ODB_BOOST_DETAILS_CONFIG_VC_H */ diff --git a/odb/boost/details/build2/config.h b/odb/boost/details/build2/config.h deleted file mode 100644 index ea24ba3..0000000 --- a/odb/boost/details/build2/config.h +++ /dev/null @@ -1,17 +0,0 @@ -/* file : odb/boost/details/build2/config.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Static configuration file for the build2 build. The installed case - (when LIBODB_BOOST_BUILD2 is not necessarily defined) is the only - reason we have it. */ - -#ifndef ODB_BOOST_DETAILS_CONFIG_H -#define ODB_BOOST_DETAILS_CONFIG_H - -/* Define LIBODB_BOOST_BUILD2 for the installed case. */ -#ifndef LIBODB_BOOST_BUILD2 -# define LIBODB_BOOST_BUILD2 -#endif - -#endif /* ODB_BOOST_DETAILS_CONFIG_H */ diff --git a/odb/boost/details/config-vc.h b/odb/boost/details/config-vc.h deleted file mode 100644 index 687a1e1..0000000 --- a/odb/boost/details/config-vc.h +++ /dev/null @@ -1,5 +0,0 @@ -/* file : odb/boost/details/config-vc.h - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* Dummy configuration file for Windows/VC++. */ diff --git a/odb/boost/details/config.h.in b/odb/boost/details/config.h.in deleted file mode 100644 index 3cfc3aa..0000000 --- a/odb/boost/details/config.h.in +++ /dev/null @@ -1,12 +0,0 @@ -/* file : odb/boost/details/config.h.in - * license : GNU GPL v2; see accompanying LICENSE file - */ - -/* This file is automatically processed by configure. */ - -#ifndef ODB_BOOST_DETAILS_CONFIG_H -#define ODB_BOOST_DETAILS_CONFIG_H - -#undef LIBODB_BOOST_STATIC_LIB - -#endif /* ODB_BOOST_DETAILS_CONFIG_H */ diff --git a/odb/boost/details/config.hxx b/odb/boost/details/config.hxx deleted file mode 100644 index f0fe850..0000000 --- a/odb/boost/details/config.hxx +++ /dev/null @@ -1,21 +0,0 @@ -// file : odb/boost/details/config.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DETAILS_CONFIG_HXX -#define ODB_BOOST_DETAILS_CONFIG_HXX - -// no pre - -#ifdef ODB_COMPILER -# define LIBODB_BOOST_STATIC_LIB -#elif !defined(LIBODB_BOOST_BUILD2) -# ifdef _MSC_VER -# include <odb/boost/details/config-vc.h> -# else -# include <odb/boost/details/config.h> -# endif -#endif - -// no post - -#endif // ODB_BOOST_DETAILS_CONFIG_HXX diff --git a/odb/boost/details/export.hxx b/odb/boost/details/export.hxx deleted file mode 100644 index cb3b219..0000000 --- a/odb/boost/details/export.hxx +++ /dev/null @@ -1,78 +0,0 @@ -// file : odb/boost/details/export.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_DETAILS_EXPORT_HXX -#define ODB_BOOST_DETAILS_EXPORT_HXX - -#include <odb/pre.hxx> - -#include <odb/boost/details/config.hxx> - -// Normally we don't export class templates (but do complete specializations), -// inline functions, and classes with only inline member functions. Exporting -// classes that inherit from non-exported/imported bases (e.g., std::string) -// will end up badly. The only known workarounds are to not inherit or to not -// export. Also, MinGW GCC doesn't like seeing non-exported function being -// used before their inline definition. The workaround is to reorder code. In -// the end it's all trial and error. - -#ifdef LIBODB_BOOST_BUILD2 - -#if defined(LIBODB_BOOST_STATIC) // Using static. -# define LIBODB_BOOST_EXPORT -#elif defined(LIBODB_BOOST_STATIC_BUILD) // Building static. -# define LIBODB_BOOST_EXPORT -#elif defined(LIBODB_BOOST_SHARED) // Using shared. -# ifdef _WIN32 -# define LIBODB_BOOST_EXPORT __declspec(dllimport) -# else -# define LIBODB_BOOST_EXPORT -# endif -#elif defined(LIBODB_BOOST_SHARED_BUILD) // Building shared. -# ifdef _WIN32 -# define LIBODB_BOOST_EXPORT __declspec(dllexport) -# else -# define LIBODB_BOOST_EXPORT -# endif -#else -// If none of the above macros are defined, then we assume we are being used -// by some third-party build system that cannot/doesn't signal the library -// type. Note that this fallback works for both static and shared but in case -// of shared will be sub-optimal compared to having dllimport. -// -# define LIBODB_BOOST_EXPORT // Using static or shared. -#endif - -#else // LIBODB_BOOST_BUILD2 - -#ifdef LIBODB_BOOST_STATIC_LIB -# define LIBODB_BOOST_EXPORT -#else -# ifdef _WIN32 -# ifdef _MSC_VER -# ifdef LIBODB_BOOST_DYNAMIC_LIB -# define LIBODB_BOOST_EXPORT __declspec(dllexport) -# else -# define LIBODB_BOOST_EXPORT __declspec(dllimport) -# endif -# else -# ifdef LIBODB_BOOST_DYNAMIC_LIB -# ifdef DLL_EXPORT -# define LIBODB_BOOST_EXPORT __declspec(dllexport) -# else -# define LIBODB_BOOST_EXPORT -# endif -# else -# define LIBODB_BOOST_EXPORT __declspec(dllimport) -# endif -# endif -# else -# define LIBODB_BOOST_EXPORT -# endif -#endif - -#endif // LIBODB_BOOST_BUILD2 - -#include <odb/post.hxx> - -#endif // ODB_BOOST_DETAILS_EXPORT_HXX diff --git a/odb/boost/exception.hxx b/odb/boost/exception.hxx deleted file mode 100644 index f616a30..0000000 --- a/odb/boost/exception.hxx +++ /dev/null @@ -1,28 +0,0 @@ -// file : odb/boost/exception.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_EXCEPTION_HXX -#define ODB_BOOST_EXCEPTION_HXX - -#include <odb/pre.hxx> - -#include <odb/exceptions.hxx> - -#include <odb/details/config.hxx> // ODB_NOTHROW_NOEXCEPT -#include <odb/boost/details/export.hxx> - -namespace odb -{ - namespace boost - { - struct LIBODB_BOOST_EXPORT exception: odb::exception - { - virtual const char* - what () const ODB_NOTHROW_NOEXCEPT = 0; - }; - } -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_EXCEPTION_HXX diff --git a/odb/boost/lazy-ptr.hxx b/odb/boost/lazy-ptr.hxx deleted file mode 100644 index 35a8acf..0000000 --- a/odb/boost/lazy-ptr.hxx +++ /dev/null @@ -1,9 +0,0 @@ -// file : odb/boost/lazy-ptr.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_LAZY_PTR_HXX -#define ODB_BOOST_LAZY_PTR_HXX - -#include <odb/boost/smart-ptr/lazy-ptr.hxx> - -#endif // ODB_BOOST_LAZY_PTR_HXX diff --git a/odb/boost/libodb-boost-vc10.vcxproj b/odb/boost/libodb-boost-vc10.vcxproj deleted file mode 100644 index b09479f..0000000 --- a/odb/boost/libodb-boost-vc10.vcxproj +++ /dev/null @@ -1,174 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{2C6C42B3-81CA-4697-AA55-AAFDC166CAFE}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <RootNamespace>libodb-boost</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>..\..\bin\</OutDir> - <TargetName>odb-boost-d-__value__(interface_version)-vc10</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>..\..\bin64\</OutDir> - <TargetName>odb-boost-d-__value__(interface_version)-vc10</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>..\..\bin\</OutDir> - <TargetName>odb-boost-__value__(interface_version)-vc10</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>..\..\bin64\</OutDir> - <TargetName>odb-boost-__value__(interface_version)-vc10</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib\odb-boost-d.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib64\odb-boost-d.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib\odb-boost.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib64\odb-boost.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemGroup> -__header_entries__(headers) - </ItemGroup> - <ItemGroup> -__source_entries__(sources) - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project> diff --git a/odb/boost/libodb-boost-vc10.vcxproj.filters b/odb/boost/libodb-boost-vc10.vcxproj.filters deleted file mode 100644 index ac01f4e..0000000 --- a/odb/boost/libodb-boost-vc10.vcxproj.filters +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{15DBF883-C83E-460B-8F93-44361F5783E3}</UniqueIdentifier> - <Extensions>cxx</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{C2A3CC20-2248-4590-ABAC-DE29A478D2BD}</UniqueIdentifier> - <Extensions>h;hxx;ixx;txx</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> -__header_filter_entries__(headers) - </ItemGroup> - <ItemGroup> -__source_filter_entries__(sources) - </ItemGroup> -</Project> diff --git a/odb/boost/libodb-boost-vc11.vcxproj b/odb/boost/libodb-boost-vc11.vcxproj deleted file mode 100644 index c80bdf4..0000000 --- a/odb/boost/libodb-boost-vc11.vcxproj +++ /dev/null @@ -1,178 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{2C6C42B3-81CA-4697-AA55-AAFDC166CAFE}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <RootNamespace>libodb-boost</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v110</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v110</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v110</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v110</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>..\..\bin\</OutDir> - <TargetName>odb-boost-d-__value__(interface_version)-vc11</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>..\..\bin64\</OutDir> - <TargetName>odb-boost-d-__value__(interface_version)-vc11</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>..\..\bin\</OutDir> - <TargetName>odb-boost-__value__(interface_version)-vc11</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>..\..\bin64\</OutDir> - <TargetName>odb-boost-__value__(interface_version)-vc11</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib\odb-boost-d.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib64\odb-boost-d.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib\odb-boost.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib64\odb-boost.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemGroup> -__header_entries__(headers) - </ItemGroup> - <ItemGroup> -__source_entries__(sources) - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project> diff --git a/odb/boost/libodb-boost-vc11.vcxproj.filters b/odb/boost/libodb-boost-vc11.vcxproj.filters deleted file mode 100644 index ac01f4e..0000000 --- a/odb/boost/libodb-boost-vc11.vcxproj.filters +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{15DBF883-C83E-460B-8F93-44361F5783E3}</UniqueIdentifier> - <Extensions>cxx</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{C2A3CC20-2248-4590-ABAC-DE29A478D2BD}</UniqueIdentifier> - <Extensions>h;hxx;ixx;txx</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> -__header_filter_entries__(headers) - </ItemGroup> - <ItemGroup> -__source_filter_entries__(sources) - </ItemGroup> -</Project> diff --git a/odb/boost/libodb-boost-vc12.vcxproj b/odb/boost/libodb-boost-vc12.vcxproj deleted file mode 100644 index 01a3d6a..0000000 --- a/odb/boost/libodb-boost-vc12.vcxproj +++ /dev/null @@ -1,182 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{2C6C42B3-81CA-4697-AA55-AAFDC166CAFE}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <RootNamespace>libodb-boost</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v120</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v120</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v120</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v120</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>..\..\bin\</OutDir> - <TargetName>odb-boost-d-__value__(interface_version)-vc12</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>..\..\bin64\</OutDir> - <TargetName>odb-boost-d-__value__(interface_version)-vc12</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>..\..\bin\</OutDir> - <TargetName>odb-boost-__value__(interface_version)-vc12</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>..\..\bin64\</OutDir> - <TargetName>odb-boost-__value__(interface_version)-vc12</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - <SDLCheck>true</SDLCheck> - </ClCompile> - <Link> - <AdditionalDependencies>odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib\odb-boost-d.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - <SDLCheck>true</SDLCheck> - </ClCompile> - <Link> - <AdditionalDependencies>odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib64\odb-boost-d.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - <SDLCheck>true</SDLCheck> - </ClCompile> - <Link> - <AdditionalDependencies>odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib\odb-boost.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4355;4800;4290;4251;%(DisableSpecificWarnings)</DisableSpecificWarnings> - <SDLCheck>true</SDLCheck> - </ClCompile> - <Link> - <AdditionalDependencies>odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - <OutputFile>$(TargetPath)</OutputFile> - <ImportLibrary>..\..\lib64\odb-boost.lib</ImportLibrary> - </Link> - </ItemDefinitionGroup> - <ItemGroup> -__header_entries__(headers) - </ItemGroup> - <ItemGroup> -__source_entries__(sources) - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project> diff --git a/odb/boost/libodb-boost-vc12.vcxproj.filters b/odb/boost/libodb-boost-vc12.vcxproj.filters deleted file mode 100644 index ac01f4e..0000000 --- a/odb/boost/libodb-boost-vc12.vcxproj.filters +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{15DBF883-C83E-460B-8F93-44361F5783E3}</UniqueIdentifier> - <Extensions>cxx</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{C2A3CC20-2248-4590-ABAC-DE29A478D2BD}</UniqueIdentifier> - <Extensions>h;hxx;ixx;txx</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> -__header_filter_entries__(headers) - </ItemGroup> - <ItemGroup> -__source_filter_entries__(sources) - </ItemGroup> -</Project> diff --git a/odb/boost/libodb-boost-vc8.vcproj b/odb/boost/libodb-boost-vc8.vcproj deleted file mode 100644 index c4e144e..0000000 --- a/odb/boost/libodb-boost-vc8.vcproj +++ /dev/null @@ -1,352 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="libodb-boost" - ProjectGUID="{07ADE873-116E-41E2-9011-4D03641049D6}" - RootNamespace="libodb-boost" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="..\.." - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4355 /wd4800 /wd4290" - Optimization="0" - AdditionalIncludeDirectories="..\.." - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - CommandLine="if not exist ..\..\lib mkdir ..\..\lib" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb-d.lib" - OutputFile="$(OutDir)\bin\odb-boost-d-__value__(interface_version)-vc8.dll" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="2" - ImportLibrary="$(OutDir)\lib\odb-boost-d.lib" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="..\.." - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4355 /wd4800 /wd4290" - Optimization="0" - AdditionalIncludeDirectories="..\.." - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - CommandLine="if not exist ..\..\lib64 mkdir ..\..\lib64" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb-d.lib" - OutputFile="$(OutDir)\bin64\odb-boost-d-__value__(interface_version)-vc8.dll" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="2" - ImportLibrary="$(OutDir)\lib64\odb-boost-d.lib" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="..\.." - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4355 /wd4800 /wd4290" - AdditionalIncludeDirectories="..\.." - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - CommandLine="if not exist ..\..\lib mkdir ..\..\lib" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb.lib" - OutputFile="$(OutDir)\bin\odb-boost-__value__(interface_version)-vc8.dll" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - ImportLibrary="$(OutDir)\lib\odb-boost.lib" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="..\.." - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4355 /wd4800 /wd4290" - AdditionalIncludeDirectories="..\.." - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - CommandLine="if not exist ..\..\lib64 mkdir ..\..\lib64" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb.lib" - OutputFile="$(OutDir)\bin64\odb-boost-__value__(interface_version)-vc8.dll" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - ImportLibrary="$(OutDir)\lib64\odb-boost.lib" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cxx" - UniqueIdentifier="{6B3BAA4B-02AC-4F12-9B68-96AC57615DBF}" - > -__source_entries__(sources) - </Filter> - <Filter - Name="Header Files" - Filter="h;hxx;ixx;txx" - UniqueIdentifier="{944A9555-3A83-43F4-B49F-CAF8A88FEB29}" - > -__file_entries__(headers) - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/odb/boost/libodb-boost-vc9.vcproj b/odb/boost/libodb-boost-vc9.vcproj deleted file mode 100644 index 120aebe..0000000 --- a/odb/boost/libodb-boost-vc9.vcproj +++ /dev/null @@ -1,359 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="libodb-boost" - ProjectGUID="{07ADE873-116E-41E2-9011-4D03641049D6}" - RootNamespace="libodb-boost" - Keyword="Win32Proj" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="..\.." - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4355 /wd4800 /wd4290" - Optimization="0" - AdditionalIncludeDirectories="..\.." - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - CommandLine="if not exist ..\..\lib mkdir ..\..\lib" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb-d.lib" - OutputFile="$(OutDir)\bin\odb-boost-d-__value__(interface_version)-vc9.dll" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="2" - ImportLibrary="$(OutDir)\lib\odb-boost-d.lib" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="..\.." - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4355 /wd4800 /wd4290" - Optimization="0" - AdditionalIncludeDirectories="..\.." - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - CommandLine="if not exist ..\..\lib64 mkdir ..\..\lib64" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb-d.lib" - OutputFile="$(OutDir)\bin64\odb-boost-d-__value__(interface_version)-vc9.dll" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="2" - ImportLibrary="$(OutDir)\lib64\odb-boost-d.lib" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="..\.." - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4355 /wd4800 /wd4290" - Optimization="2" - EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories="..\.." - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - CommandLine="if not exist ..\..\lib mkdir ..\..\lib" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb.lib" - OutputFile="$(OutDir)\bin\odb-boost-__value__(interface_version)-vc9.dll" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - ImportLibrary="$(OutDir)\lib\odb-boost.lib" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="..\.." - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4355 /wd4800 /wd4290" - Optimization="2" - EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories="..\.." - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBODB_BOOST_DYNAMIC_LIB" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - CommandLine="if not exist ..\..\lib64 mkdir ..\..\lib64" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="odb.lib" - OutputFile="$(OutDir)\bin64\odb-boost-__value__(interface_version)-vc9.dll" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - ImportLibrary="$(OutDir)\lib64\odb-boost.lib" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cxx" - UniqueIdentifier="{6B3BAA4B-02AC-4F12-9B68-96AC57615DBF}" - > -__source_entries__(sources) - </Filter> - <Filter - Name="Header Files" - Filter="h;hxx;ixx;txx" - UniqueIdentifier="{944A9555-3A83-43F4-B49F-CAF8A88FEB29}" - > -__file_entries__(headers) - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/odb/boost/makefile b/odb/boost/makefile deleted file mode 100644 index 0ba3130..0000000 --- a/odb/boost/makefile +++ /dev/null @@ -1,104 +0,0 @@ -# file : odb/boost/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx := date-time/exceptions.cxx - -cxx_tun := $(cxx) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -odb_boost.l := $(out_base)/odb-boost.l -odb_boost.l.cpp-options := $(out_base)/odb-boost.l.cpp-options - -default := $(out_base)/ -dist := $(out_base)/.dist -clean := $(out_base)/.clean - -# Import. -# -$(call import,\ - $(scf_root)/import/libodb/stub.make,\ - l: odb.l,cpp-options: odb.l.cpp-options) - -# Build. -# -$(odb_boost.l): $(cxx_obj) $(odb.l) -$(odb_boost.l.cpp-options): value := -I$(out_root) -I$(src_root) -$(odb_boost.l.cpp-options): $(odb.l.cpp-options) - -$(cxx_obj) $(cxx_od): $(odb_boost.l.cpp-options) $(out_base)/details/config.h - -$(out_base)/details/config.h: | $(out_base)/details/. - @echo '/* file : odb/boost/details/config.h' >$@ - @echo ' * note : automatically generated' >>$@ - @echo ' */' >>$@ - @echo '' >>$@ - @echo '#ifndef ODB_BOOST_DETAILS_CONFIG_H' >>$@ - @echo '#define ODB_BOOST_DETAILS_CONFIG_H' >>$@ - @echo '' >>$@ - @echo '' >>$@ - @echo '#endif /* ODB_BOOST_DETAILS_CONFIG_H */' >>$@ - -$(call include-dep,$(cxx_od),$(cxx_obj),$(out_base)/details/config.h) - -# Convenience alias for default target. -# -$(out_base)/: $(odb_boost.l) - -# Dist. -# -$(dist): export sources := $(cxx) -$(dist): export headers = $(subst $(src_base)/,,$(shell find $(src_base) \ --name '*.hxx' -o -name '*.ixx' -o -name '*.txx')) -$(dist): export options = $(subst $(src_base)/,,$(shell find $(src_base) \ --name '*.options')) -$(dist): export extra_dist := libodb-boost-vc8.vcproj libodb-boost-vc9.vcproj \ -libodb-boost-vc10.vcxproj libodb-boost-vc10.vcxproj.filters \ -libodb-boost-vc11.vcxproj libodb-boost-vc11.vcxproj.filters \ -libodb-boost-vc12.vcxproj libodb-boost-vc12.vcxproj.filters -$(dist): export interface_version = $(shell sed -e \ -'s/^\([0-9]*\.[0-9]*\).*/\1/' $(src_root)/version) - -$(dist): - $(call dist-data,$(sources) $(headers) $(options) details/config.h.in details/config-vc.h) - $(call meta-vc8proj,$(src_base)/libodb-boost-vc8.vcproj) - $(call meta-vc9proj,$(src_base)/libodb-boost-vc9.vcproj) - $(call meta-vc10proj,$(src_base)/libodb-boost-vc10.vcxproj) - $(call meta-vc11proj,$(src_base)/libodb-boost-vc11.vcxproj) - $(call meta-vc12proj,$(src_base)/libodb-boost-vc12.vcxproj) - $(call meta-automake) - -# Clean. -# -$(clean): $(odb_boost.l).o.clean \ - $(odb_boost.l.cpp-options).clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) - $(call message,rm $$1,rm -f $$1,$(out_base)/details/config.h) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(odb_boost.l): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := details/config.h -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/o-l.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/cxx-d.make) diff --git a/odb/boost/multi-index.options b/odb/boost/multi-index.options deleted file mode 100644 index 731d197..0000000 --- a/odb/boost/multi-index.options +++ /dev/null @@ -1,7 +0,0 @@ -# file : odb/boost/multi-index.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - ---odb-epilogue '#include <odb/boost/multi-index/container-traits.hxx>' ---hxx-prologue '#include <odb/boost/multi-index/container-traits.hxx>' diff --git a/odb/boost/multi-index/container-traits.hxx b/odb/boost/multi-index/container-traits.hxx deleted file mode 100644 index b027886..0000000 --- a/odb/boost/multi-index/container-traits.hxx +++ /dev/null @@ -1,215 +0,0 @@ -// file : odb/boost/multi-index/container-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_MULTI_INDEX_CONTAINER_TRAITS_HXX -#define ODB_BOOST_MULTI_INDEX_CONTAINER_TRAITS_HXX - -#include <boost/version.hpp> - -// Multi-index container is available since 1.32.0. -// -#if BOOST_VERSION >= 103200 - -#include <odb/pre.hxx> - -#include <utility> // std::move - -#include <boost/mpl/find_if.hpp> -#include <boost/mpl/distance.hpp> -#include <boost/mpl/begin_end.hpp> - -#include <boost/multi_index_container.hpp> -#include <boost/multi_index/sequenced_index.hpp> -#include <boost/multi_index/random_access_index.hpp> - -#include <odb/container-traits.hxx> -#include <odb/details/config.hxx> // ODB_CXX11 - -namespace odb -{ - // Multi-index container can be ordered or set. Whether it is ordered - // depends on whether it has any sequenced or random_access indexes. - // If it is ordered, then we need to use one of these indexes to store - // elements in a specific order. Otherwise, we can use the first index - // since the order of elements in the database is not important. Note - // that there is a terminology clash between ODB and Boost multi-index. - // What ODB calls ordered containers, multi-index calls sequenced and - // random_access. And what ODB calls set containers, multi-index calls - // ordered and hashed. - // - - // Test whether index is ordered. - // - template <typename I> - struct multi_index_ordered - { - static const bool value = false; - }; - - template <typename T> - struct multi_index_ordered< ::boost::multi_index::sequenced<T> > - { - static const bool value = true; - }; - - template <typename T> - struct multi_index_ordered< ::boost::multi_index::random_access<T> > - { - static const bool value = true; - }; - - // Get the index of the first ordered sub-index or -1 if none exists. - // - template <typename B, typename I, typename E> - struct multi_index_ordered_index - { - static const int value = ::boost::mpl::distance<B, I>::value; - }; - - template <typename B, typename E> - struct multi_index_ordered_index<B, E, E> - { - static const int value = -1; - }; - - template <typename V, - typename ISP, - typename A, - int N = - multi_index_ordered_index< - typename ::boost::mpl::begin<ISP>::type, - typename ::boost::mpl::find_if< - ISP, multi_index_ordered< ::boost::mpl::_1 > >::type, - typename ::boost::mpl::end<ISP>::type>::value> - class multi_index_traits - { - public: - static const container_kind kind = ck_ordered; - static const bool smart = false; - - typedef ::boost::multi_index_container<V, ISP, A> container_type; - typedef typename container_type::template nth_index<N>::type - ordered_container_type; - - typedef V value_type; - typedef typename ordered_container_type::size_type index_type; - - typedef ordered_functions<index_type, value_type> functions; - - public: - static void - persist (const container_type& c, const functions& f) - { - const ordered_container_type& oc (c.template get<N> ()); - index_type i (0); - for (typename ordered_container_type::const_iterator j (oc.begin ()), - e (oc.end ()); j != e; ++j) - f.insert (i++, *j); - } - - static void - load (container_type& c, bool more, const functions& f) - { - ordered_container_type& oc (c.template get<N> ()); - oc.clear (); - - while (more) - { - index_type dummy; - value_type v; - more = f.select (dummy, v); -#ifdef ODB_CXX11 - oc.push_back (std::move (v)); -#else - oc.push_back (v); -#endif - } - } - - static void - update (const container_type& c, const functions& f) - { - f.delete_ (); - - const ordered_container_type& oc (c.template get<N> ()); - index_type i (0); - for (typename ordered_container_type::const_iterator j (oc.begin ()), - e (oc.end ()); j != e; ++j) - f.insert (i++, *j); - } - - static void - erase (const functions& f) - { - f.delete_ (); - } - }; - - // Set specialization. - // - template <typename V, typename ISP, typename A> - class multi_index_traits<V, ISP, A, -1> - { - public: - static const container_kind kind = ck_set; - static const bool smart = false; - - typedef ::boost::multi_index_container<V, ISP, A> container_type; - typedef V value_type; - - typedef set_functions<value_type> functions; - - public: - static void - persist (const container_type& c, const functions& f) - { - for (typename container_type::const_iterator i (c.begin ()), - e (c.end ()); i != e; ++i) - f.insert (*i); - } - - static void - load (container_type& c, bool more, const functions& f) - { - c.clear (); - - while (more) - { - value_type v; - more = f.select (v); -#ifdef ODB_CXX11 - c.insert (std::move (v)); -#else - c.insert (v); -#endif - } - } - - static void - update (const container_type& c, const functions& f) - { - f.delete_ (); - - for (typename container_type::const_iterator i (c.begin ()), - e (c.end ()); i != e; ++i) - f.insert (*i); - } - - static void - erase (const functions& f) - { - f.delete_ (); - } - }; - - template <typename V, typename ISP, typename A> - class access::container_traits< ::boost::multi_index_container<V, ISP, A> > - : public multi_index_traits<V, ISP, A> - { - }; -} - -#include <odb/post.hxx> - -#endif // BOOST_VERSION -#endif // ODB_BOOST_MULTI_INDEX_CONTAINER_TRAITS_HXX diff --git a/odb/boost/optional.options b/odb/boost/optional.options deleted file mode 100644 index d57b22b..0000000 --- a/odb/boost/optional.options +++ /dev/null @@ -1,7 +0,0 @@ -# file : odb/boost/optional.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - ---odb-epilogue '#include <odb/boost/optional/wrapper-traits.hxx>' ---hxx-prologue '#include <odb/boost/optional/wrapper-traits.hxx>' diff --git a/odb/boost/optional/wrapper-traits.hxx b/odb/boost/optional/wrapper-traits.hxx deleted file mode 100644 index 80d4319..0000000 --- a/odb/boost/optional/wrapper-traits.hxx +++ /dev/null @@ -1,63 +0,0 @@ -// file : odb/boost/optional/wrapper-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_OPTIONAL_WRAPPER_TRAITS_HXX -#define ODB_BOOST_OPTIONAL_WRAPPER_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <boost/none.hpp> -#include <boost/optional.hpp> - -#include <odb/wrapper-traits.hxx> - -namespace odb -{ - template <typename T> - class wrapper_traits< ::boost::optional<T> > - { - public: - typedef T wrapped_type; - typedef ::boost::optional<T> wrapper_type; - - // T can be const. - // - typedef - typename odb::details::meta::remove_const<T>::result - unrestricted_wrapped_type; - - static const bool null_handler = true; - static const bool null_default = true; - - static bool - get_null (const wrapper_type& o) - { - return !o; - } - - static void - set_null (wrapper_type& o) - { - o = ::boost::none; - } - - static const wrapped_type& - get_ref (const wrapper_type& o) - { - return *o; - } - - static unrestricted_wrapped_type& - set_ref (wrapper_type& o) - { - if (!o) - o = unrestricted_wrapped_type (); - - return const_cast<unrestricted_wrapped_type&> (*o); - } - }; -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_OPTIONAL_WRAPPER_TRAITS_HXX diff --git a/odb/boost/smart-ptr.options b/odb/boost/smart-ptr.options deleted file mode 100644 index 2b0f2a4..0000000 --- a/odb/boost/smart-ptr.options +++ /dev/null @@ -1,19 +0,0 @@ -# file : odb/boost/smart-ptr.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Make boost::shared_ptr the default object pointer. -# ---hxx-prologue '#include <boost/shared_ptr.hpp>' ---default-pointer ::boost::shared_ptr - -# Include pointer traits. -# ---odb-epilogue '#include <odb/boost/smart-ptr/pointer-traits.hxx>' ---hxx-prologue '#include <odb/boost/smart-ptr/pointer-traits.hxx>' - -# Include wrapper traits. -# ---odb-epilogue '#include <odb/boost/smart-ptr/wrapper-traits.hxx>' ---hxx-prologue '#include <odb/boost/smart-ptr/wrapper-traits.hxx>' diff --git a/odb/boost/smart-ptr/lazy-pointer-traits.hxx b/odb/boost/smart-ptr/lazy-pointer-traits.hxx deleted file mode 100644 index 92b5441..0000000 --- a/odb/boost/smart-ptr/lazy-pointer-traits.hxx +++ /dev/null @@ -1,61 +0,0 @@ -// file : odb/boost/smart-ptr/lazy-pointer-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_SMART_PTR_LAZY_POINTER_TRAITS_HXX -#define ODB_BOOST_SMART_PTR_LAZY_POINTER_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <odb/pointer-traits.hxx> -#include <odb/boost/smart-ptr/lazy-ptr.hxx> - -namespace odb -{ - template <typename T> - class pointer_traits<boost::lazy_shared_ptr<T> > - { - public: - static const pointer_kind kind = pk_shared; - static const bool lazy = true; - - typedef T element_type; - typedef boost::lazy_shared_ptr<element_type> pointer_type; - typedef ::boost::shared_ptr<element_type> eager_pointer_type; - - static bool - null_ptr (const pointer_type& p) - { - return !p; - } - - template <class O /* = T */> - static typename object_traits<O>::id_type - object_id (const pointer_type& p) - { - return p.template object_id<O> (); - } - }; - - template <typename T> - class pointer_traits<boost::lazy_weak_ptr<T> > - { - public: - static const pointer_kind kind = pk_weak; - static const bool lazy = true; - - typedef T element_type; - typedef boost::lazy_weak_ptr<element_type> pointer_type; - typedef boost::lazy_shared_ptr<element_type> strong_pointer_type; - typedef ::boost::weak_ptr<element_type> eager_pointer_type; - - static strong_pointer_type - lock (const pointer_type& p) - { - return p.lock (); - } - }; -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_SMART_PTR_LAZY_POINTER_TRAITS_HXX diff --git a/odb/boost/smart-ptr/lazy-ptr.hxx b/odb/boost/smart-ptr/lazy-ptr.hxx deleted file mode 100644 index ec25eb1..0000000 --- a/odb/boost/smart-ptr/lazy-ptr.hxx +++ /dev/null @@ -1,269 +0,0 @@ -// file : odb/boost/smart-ptr/lazy-ptr.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_SMART_PTR_LAZY_PTR_HXX -#define ODB_BOOST_SMART_PTR_LAZY_PTR_HXX - -#include <odb/pre.hxx> - -#include <memory> // std::auto_ptr - -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> - -#include <odb/forward.hxx> // odb::database -#include <odb/traits.hxx> -#include <odb/lazy-ptr-impl.hxx> -#include <odb/details/config.hxx> // ODB_CXX11 - -namespace odb -{ - namespace boost - { - template <class T> - class lazy_weak_ptr; - - // - // - template <class T> - class lazy_shared_ptr - { - // The standard shared_ptr interface. - // - public: - typedef T element_type; - - lazy_shared_ptr (); - template <class Y> explicit lazy_shared_ptr (Y*); - template <class Y, class D> lazy_shared_ptr (Y*, D); - template <class Y, class D, class A> lazy_shared_ptr (Y*, D, A); - - lazy_shared_ptr (const lazy_shared_ptr&); - template <class Y> lazy_shared_ptr (const lazy_shared_ptr<Y>&); - template <class Y> explicit lazy_shared_ptr (const lazy_weak_ptr<Y>&); - template <class Y> explicit lazy_shared_ptr (std::auto_ptr<Y>&); - - ~lazy_shared_ptr (); - - lazy_shared_ptr& operator= (const lazy_shared_ptr&); - template <class Y> lazy_shared_ptr& operator= (const lazy_shared_ptr<Y>&); - template <class Y> lazy_shared_ptr& operator= (std::auto_ptr<Y>&); - - void swap (lazy_shared_ptr&); - void reset (); - template <class Y> void reset (Y*); - template <class Y, class D> void reset (Y*, D); - template <class Y, class D, class A> void reset (Y*, D, A); - - T& operator* () const; - T* operator-> () const; - T* get () const; - - bool unique () const; - long use_count () const; - - typedef ::boost::shared_ptr<T> lazy_shared_ptr::*unspecified_bool_type; - operator unspecified_bool_type () const - { - return (p_ || i_) ? &lazy_shared_ptr::p_ : 0; - } - - // Initialization/assignment from shared_ptr and weak_ptr. - // - public: - template <class Y> lazy_shared_ptr (const ::boost::shared_ptr<Y>&); - template <class Y> explicit lazy_shared_ptr (const ::boost::weak_ptr<Y>&); - - template <class Y> lazy_shared_ptr& operator= (const ::boost::shared_ptr<Y>&); - - // Lazy loading interface. - // - public: - typedef odb::database database_type; - - // NULL loaded() - // - // true true NULL pointer to transient object - // false true valid pointer to persistent object - // true false unloaded pointer to persistent object - // false false valid pointer to transient object - // - bool loaded () const; - - ::boost::shared_ptr<T> load () const; - - // Unload the pointer. For transient objects this function is - // equivalent to reset(). - // - void unload () const; - - // Get the underlying eager pointer. If this is an unloaded pointer - // to a persistent object, then the returned pointer will be NULL. - // - ::boost::shared_ptr<T> get_eager () const; - - template <class DB, class ID> lazy_shared_ptr (DB&, const ID&); - template <class DB, class Y> lazy_shared_ptr (DB&, Y*); - template <class DB, class Y, class D> lazy_shared_ptr (DB&, Y*, D); - template <class DB, class Y, class D, class A> lazy_shared_ptr (DB&, Y*, D, A); - template <class DB, class Y> lazy_shared_ptr (DB&, std::auto_ptr<Y>&); - template <class DB, class Y> lazy_shared_ptr (DB&, const ::boost::shared_ptr<Y>&); - template <class DB, class Y> lazy_shared_ptr (DB&, const ::boost::weak_ptr<Y>&); - - template <class DB, class ID> void reset (DB&, const ID&); - template <class DB, class Y> void reset (DB&, Y*); - template <class DB, class Y, class D> void reset (DB&, Y*, D); - template <class DB, class Y, class D, class A> void reset (DB&, Y*, D, A); - template <class DB, class Y> void reset (DB&, std::auto_ptr<Y>&); - template <class DB, class Y> void reset (DB&, const ::boost::shared_ptr<Y>&); - -#ifdef ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT - template <class O = T> -#else - template <class O /* = T */> -#endif - typename object_traits<O>::id_type object_id () const; - - database_type& database () const; - - // Helpers. - // - public: - template <class Y> bool equal (const lazy_shared_ptr<Y>&) const; - - private: - template <class Y> friend class lazy_shared_ptr; - template <class Y> friend class lazy_weak_ptr; - - // For lazy_weak_ptr::lock(). - // - lazy_shared_ptr (const ::boost::shared_ptr<T>& p, - const lazy_ptr_impl<T>& i) - : p_ (p), i_ (i) {} - - private: - mutable ::boost::shared_ptr<T> p_; - mutable lazy_ptr_impl<T> i_; - }; - - // operator< and operator<< are not provided. - // - template<class T, class Y> - bool operator== (const lazy_shared_ptr<T>&, const lazy_shared_ptr<Y>&); - - template<class T, class Y> - bool operator!= (const lazy_shared_ptr<T>&, const lazy_shared_ptr<Y>&); - - template<class T> void swap (lazy_shared_ptr<T>&, lazy_shared_ptr<T>&); - - template<class D, class T> - D* get_deleter (const lazy_shared_ptr<T>&); - - // - // - template <class T> - class lazy_weak_ptr - { - // The standard weak_ptr interface. - // - public: - typedef T element_type; - - lazy_weak_ptr (); - template <class Y> lazy_weak_ptr (const lazy_shared_ptr<Y>&); - lazy_weak_ptr (const lazy_weak_ptr&); - template <class Y> lazy_weak_ptr (const lazy_weak_ptr<Y>&); - - ~lazy_weak_ptr (); - - lazy_weak_ptr& operator= (const lazy_weak_ptr&); - template <class Y> lazy_weak_ptr& operator= (const lazy_weak_ptr<Y>&); - template <class Y> lazy_weak_ptr& operator= (const lazy_shared_ptr<Y>&); - - void swap (lazy_weak_ptr<T>&); - void reset (); - - long use_count () const; - bool expired () const; - - lazy_shared_ptr<T> lock () const; - - // Initialization/assignment from shared_ptr and weak_ptr. - // - public: - template <class Y> lazy_weak_ptr (const ::boost::weak_ptr<Y>&); - template <class Y> lazy_weak_ptr (const ::boost::shared_ptr<Y>&); - - template <class Y> lazy_weak_ptr& operator= (const ::boost::weak_ptr<Y>&); - template <class Y> lazy_weak_ptr& operator= (const ::boost::shared_ptr<Y>&); - - // Lazy loading interface. - // - public: - typedef odb::database database_type; - - // expired() loaded() - // - // true true expired pointer to transient object - // false true valid pointer to persistent object - // true false expired pointer to persistent object - // false false valid pointer to transient object - // - bool loaded () const; - - // Performs both lock and load. - // - ::boost::shared_ptr<T> load () const; - - // Unload the pointer. For transient objects this function is - // equivalent to reset(). - // - void unload () const; - - // Get the underlying eager pointer. If this is an unloaded pointer - // to a persistent object, then the returned pointer will be NULL. - // - ::boost::weak_ptr<T> get_eager () const; - - template <class DB, class ID> lazy_weak_ptr (DB&, const ID&); - template <class DB, class Y> lazy_weak_ptr (DB&, const ::boost::shared_ptr<Y>&); - template <class DB, class Y> lazy_weak_ptr (DB&, const ::boost::weak_ptr<Y>&); - - template <class DB, class ID> void reset (DB&, const ID&); - template <class DB, class Y> void reset (DB&, const ::boost::shared_ptr<Y>&); - template <class DB, class Y> void reset (DB&, const ::boost::weak_ptr<Y>&); - - // The object_id() function can only be called when the object is - // persistent, or: expired() XOR loaded() (can use != for XOR). - // -#ifdef ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT - template <class O = T> -#else - template <class O /* = T */> -#endif - typename object_traits<O>::id_type object_id () const; - - database_type& database () const; - - private: - template <class Y> friend class lazy_shared_ptr; - template <class Y> friend class lazy_weak_ptr; - - mutable ::boost::weak_ptr<T> p_; - mutable lazy_ptr_impl<T> i_; - }; - - // operator< is not provided. - // - template<class T> void swap (lazy_weak_ptr<T>&, lazy_weak_ptr<T>&); - } -} - -#include <odb/boost/smart-ptr/lazy-ptr.ixx> -#include <odb/boost/smart-ptr/lazy-ptr.txx> - -#include <odb/boost/smart-ptr/lazy-pointer-traits.hxx> - -#include <odb/post.hxx> - -#endif // ODB_BOOST_SMART_PTR_LAZY_PTR_HXX diff --git a/odb/boost/smart-ptr/lazy-ptr.ixx b/odb/boost/smart-ptr/lazy-ptr.ixx deleted file mode 100644 index 4baad87..0000000 --- a/odb/boost/smart-ptr/lazy-ptr.ixx +++ /dev/null @@ -1,675 +0,0 @@ -// file : odb/boost/smart-ptr/lazy-ptr.ixx -// license : GNU GPL v2; see accompanying LICENSE file - -namespace odb -{ - namespace boost - { - // - // lazy_shared_ptr - // - - template <class T> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr () {} - - template <class T> - template <class Y> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (Y* p): p_ (p) {} - - template <class T> - template <class Y, class D> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (Y* p, D d): p_ (p, d) {} - - template <class T> - template <class Y, class D, class A> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (Y* p, D d, A a): p_ (p, d, a) {} - - template <class T> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (const lazy_shared_ptr& r): p_ (r.p_), i_ (r.i_) {} - - template <class T> - template <class Y> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (const lazy_shared_ptr<Y>& r): p_ (r.p_), i_ (r.i_) {} - - template <class T> - template <class Y> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (const lazy_weak_ptr<Y>& r): i_ (r.i_) - { - // If the pointer has expired but can be re-loaded, then don't throw. - // - p_ = r.lock ().get_eager (); - - if (!p_ && !i_) - throw ::boost::bad_weak_ptr (); - } - - template <class T> - template <class Y> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (std::auto_ptr<Y>& r): p_ (r) {} - - template <class T> - inline lazy_shared_ptr<T>:: - ~lazy_shared_ptr () {} - - template <class T> - inline lazy_shared_ptr<T>& lazy_shared_ptr<T>:: - operator= (const lazy_shared_ptr& r) - { - p_ = r.p_; - i_ = r.i_; - return *this; - } - - template <class T> - template <class Y> - inline lazy_shared_ptr<T>& lazy_shared_ptr<T>:: - operator= (const lazy_shared_ptr<Y>& r) - { - p_ = r.p_; - i_ = r.i_; - return *this; - } - - template <class T> - template <class Y> - inline lazy_shared_ptr<T>& lazy_shared_ptr<T>:: - operator= (std::auto_ptr<Y>& r) - { - p_ = r; - i_.reset (); - return *this; - } - - template <class T> - inline void lazy_shared_ptr<T>:: - swap (lazy_shared_ptr& b) - { - p_.swap (b.p_); - i_.swap (b.i_); - } - - template <class T> - inline void lazy_shared_ptr<T>:: - reset () - { - p_.reset (); - i_.reset (); - } - - template <class T> - template <class Y> - inline void lazy_shared_ptr<T>:: - reset (Y* p) - { - p_.reset (p); - i_.reset (); - } - - template <class T> - template <class Y, class D> - inline void lazy_shared_ptr<T>:: - reset (Y* p, D d) - { - p_.reset (p, d); - i_.reset (); - } - - template <class T> - template <class Y, class D, class A> - inline void lazy_shared_ptr<T>:: - reset (Y* p, D d, A a) - { - p_.reset (p, d, a); - i_.reset (); - } - - template <class T> - inline T& lazy_shared_ptr<T>:: - operator* () const - { - return *p_; - } - - template <class T> - inline T* lazy_shared_ptr<T>:: - operator-> () const - { - return p_.operator-> (); - } - - template <class T> - inline T* lazy_shared_ptr<T>:: - get () const - { - return p_.get (); - } - - template <class T> - inline bool lazy_shared_ptr<T>:: - unique () const - { - return p_.unique (); - } - - template <class T> - inline long lazy_shared_ptr<T>:: - use_count () const - { - return p_.use_count (); - } - - template <class T> - template <class Y> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (const ::boost::shared_ptr<Y>& r): p_ (r) {} - - template <class T> - template <class Y> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (const ::boost::weak_ptr<Y>& r): p_ (r) {} - - template <class T> - template <class Y> - inline lazy_shared_ptr<T>& lazy_shared_ptr<T>:: - operator= (const ::boost::shared_ptr<Y>& r) - { - p_ = r; - i_.reset (); - return *this; - } - - template <class T> - inline bool lazy_shared_ptr<T>:: - loaded () const - { - bool i (i_); - return !p_ != i; // !p_ XOR i_ - } - - template <class T> - inline ::boost::shared_ptr<T> lazy_shared_ptr<T>:: - load () const - { - if (!p_ && i_) - p_ = i_.template load<T> (true); // Reset id. - - return p_; - } - - template <class T> - inline void lazy_shared_ptr<T>:: - unload () const - { - typedef typename object_traits<T>::object_type object_type; - - if (p_) - { - if (i_.database () != 0) - i_.reset_id (object_traits<object_type>::id (*p_)); - - p_.reset (); - } - } - - template <class T> - inline ::boost::shared_ptr<T> lazy_shared_ptr<T>:: - get_eager () const - { - return p_; - } - - template <class T> - template <class DB, class ID> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (DB& db, const ID& id): i_ (db, id) {} - - template <class T> - template <class DB, class Y> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (DB& db, Y* p) - : p_ (p) - { - if (p_) - i_.reset_db (db); - } - - template <class T> - template <class DB, class Y, class D> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (DB& db, Y* p, D d) - : p_ (p, d) - { - if (p_) - i_.reset_db (db); - } - - template <class T> - template <class DB, class Y, class D, class A> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (DB& db, Y* p, D d, A a) - : p_ (p, d, a) - { - if (p_) - i_.reset_db (db); - } - - template <class T> - template <class DB, class Y> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (DB& db, std::auto_ptr<Y>& r) - : p_ (r) - { - if (p_) - i_.reset_db (db); - } - - template <class T> - template <class DB, class Y> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (DB& db, const ::boost::shared_ptr<Y>& r) - : p_ (r) - { - if (p_) - i_.reset_db (db); - } - - template <class T> - template <class DB, class Y> - inline lazy_shared_ptr<T>:: - lazy_shared_ptr (DB& db, const ::boost::weak_ptr<Y>& r) - : p_ (r) - { - if (p_) - i_.reset_db (db); - } - - template <class T> - template <class DB, class ID> - inline void lazy_shared_ptr<T>:: - reset (DB& db, const ID& id) - { - p_.reset (); - i_.reset (db, id); - } - - template <class T> - template <class DB, class Y> - inline void lazy_shared_ptr<T>:: - reset (DB& db, Y* p) - { - p_.reset (p); - - if (p_) - i_.reset_db (db); - else - i_.reset (); - } - - template <class T> - template <class DB, class Y, class D> - inline void lazy_shared_ptr<T>:: - reset (DB& db, Y* p, D d) - { - p_.reset (p, d); - - if (p_) - i_.reset_db (db); - else - i_.reset (); - } - - template <class T> - template <class DB, class Y, class D, class A> - inline void lazy_shared_ptr<T>:: - reset (DB& db, Y* p, D d, A a) - { - p_.reset (p, d, a); - - if (p_) - i_.reset_db (db); - else - i_.reset (); - } - - template <class T> - template <class DB, class Y> - inline void lazy_shared_ptr<T>:: - reset (DB& db, std::auto_ptr<Y>& r) - { - p_ = r; - - if (p_) - i_.reset_db (db); - else - i_.reset (); - } - - template <class T> - template <class DB, class Y> - inline void lazy_shared_ptr<T>:: - reset (DB& db, const ::boost::shared_ptr<Y>& r) - { - p_ = r; - - if (p_) - i_.reset_db (db); - else - i_.reset (); - } - - template <class T> - template <class O> - inline typename object_traits<O>::id_type lazy_shared_ptr<T>:: - object_id () const - { - typedef typename object_traits<T>::object_type object_type; - - return p_ - ? object_traits<object_type>::id (*p_) - : i_.template object_id<O> (); - } - - template <class T> - inline typename lazy_shared_ptr<T>::database_type& lazy_shared_ptr<T>:: - database () const - { - return *i_.database (); - } - - template<class T, class Y> - inline bool - operator== (const lazy_shared_ptr<T>& a, const lazy_shared_ptr<Y>& b) - { - return a.equal (b); - } - - template<class T, class Y> - inline bool - operator!= (const lazy_shared_ptr<T>& a, const lazy_shared_ptr<Y>& b) - { - return !a.equal (b); - } - - template<class T> - inline void - swap (lazy_shared_ptr<T>& a, lazy_shared_ptr<T>& b) - { - a.swap (b); - } - - template<class D, class T> - inline D* - get_deleter (const lazy_shared_ptr<T>& p) - { - return ::boost::get_deleter<D> (p.p_); - } - - - // - // lazy_weak_ptr - // - - template <class T> - inline lazy_weak_ptr<T>:: - lazy_weak_ptr () {} - - template <class T> - template <class Y> - inline lazy_weak_ptr<T>:: - lazy_weak_ptr (const lazy_shared_ptr<Y>& r): p_ (r.p_), i_ (r.i_) {} - - template <class T> - inline lazy_weak_ptr<T>:: - lazy_weak_ptr (const lazy_weak_ptr& r): p_ (r.p_), i_ (r.i_) {} - - template <class T> - template <class Y> - inline lazy_weak_ptr<T>:: - lazy_weak_ptr (const lazy_weak_ptr<Y>& r): p_ (r.p_), i_ (r.i_) {} - - template <class T> - inline lazy_weak_ptr<T>:: - ~lazy_weak_ptr () {} - - template <class T> - inline lazy_weak_ptr<T>& lazy_weak_ptr<T>:: - operator= (const lazy_weak_ptr& r) - { - p_ = r.p_; - i_ = r.i_; - return *this; - } - - template <class T> - template <class Y> - inline lazy_weak_ptr<T>& lazy_weak_ptr<T>:: - operator= (const lazy_weak_ptr<Y>& r) - { - p_ = r.p_; - i_ = r.i_; - return *this; - } - - template <class T> - template <class Y> - inline lazy_weak_ptr<T>& lazy_weak_ptr<T>:: - operator= (const lazy_shared_ptr<Y>& r) - { - p_ = r.p_; - i_ = r.i_; - return *this; - } - - template <class T> - inline void lazy_weak_ptr<T>:: - swap (lazy_weak_ptr<T>& r) - { - p_.swap (r.p_); - i_.swap (r.i_); - } - - template <class T> - inline void lazy_weak_ptr<T>:: - reset () - { - p_.reset (); - i_.reset (); - } - - template <class T> - inline long lazy_weak_ptr<T>:: - use_count () const - { - return p_.use_count (); - } - - template <class T> - inline bool lazy_weak_ptr<T>:: - expired () const - { - return p_.expired (); - } - - template <class T> - template <class Y> - inline lazy_weak_ptr<T>:: - lazy_weak_ptr (const ::boost::weak_ptr<Y>& r): p_ (r) {} - - template <class T> - template <class Y> - inline lazy_weak_ptr<T>:: - lazy_weak_ptr (const ::boost::shared_ptr<Y>& r): p_ (r) {} - - template <class T> - template <class Y> - inline lazy_weak_ptr<T>& lazy_weak_ptr<T>:: - operator= (const ::boost::weak_ptr<Y>& r) - { - p_ = r; - i_.reset (); - return *this; - } - - template <class T> - template <class Y> - inline lazy_weak_ptr<T>& lazy_weak_ptr<T>:: - operator= (const ::boost::shared_ptr<Y>& r) - { - p_ = r; - i_.reset (); - return *this; - } - - template <class T> - inline bool lazy_weak_ptr<T>:: - loaded () const - { - bool i (i_); - return expired () != i; // expired () XOR i_ - } - - template <class T> - inline lazy_shared_ptr<T> lazy_weak_ptr<T>:: - lock () const - { - return lazy_shared_ptr<T> (p_.lock (), i_); - } - - template <class T> - inline ::boost::shared_ptr<T> lazy_weak_ptr<T>:: - load () const - { - ::boost::shared_ptr<T> r (p_.lock ()); - - if (!r && i_) - { - r = i_.template load<T> (false); // Keep id. - p_ = r; - } - - return r; - } - - template <class T> - inline void lazy_weak_ptr<T>:: - unload () const - { - // With weak pointer we always keep i_ up to date. - // - p_.reset (); - } - - template <class T> - inline ::boost::weak_ptr<T> lazy_weak_ptr<T>:: - get_eager () const - { - return p_; - } - - template <class T> - template <class DB, class ID> - inline lazy_weak_ptr<T>:: - lazy_weak_ptr (DB& db, const ID& id): i_ (db, id) {} - - template <class T> - template <class DB, class Y> - inline lazy_weak_ptr<T>:: - lazy_weak_ptr (DB& db, const ::boost::shared_ptr<Y>& r) - : p_ (r) - { - typedef typename object_traits<T>::object_type object_type; - - if (r) - i_.reset (db, object_traits<object_type>::id (*r)); - } - - template <class T> - template <class DB, class Y> - inline lazy_weak_ptr<T>:: - lazy_weak_ptr (DB& db, const ::boost::weak_ptr<Y>& r) - : p_ (r) - { - typedef typename object_traits<T>::object_type object_type; - - ::boost::shared_ptr<T> sp (p_.lock ()); - - if (sp) - i_.reset (db, object_traits<object_type>::id (*sp)); - } - - template <class T> - template <class DB, class ID> - inline void lazy_weak_ptr<T>:: - reset (DB& db, const ID& id) - { - p_.reset (); - i_.reset (db, id); - } - - template <class T> - template <class DB, class Y> - inline void lazy_weak_ptr<T>:: - reset (DB& db, const ::boost::shared_ptr<Y>& r) - { - typedef typename object_traits<T>::object_type object_type; - - p_ = r; - - if (r) - i_.reset (db, object_traits<object_type>::id (*r)); - else - i_.reset (); - } - - template <class T> - template <class DB, class Y> - inline void lazy_weak_ptr<T>:: - reset (DB& db, const ::boost::weak_ptr<Y>& r) - { - typedef typename object_traits<T>::object_type object_type; - - p_ = r; - ::boost::shared_ptr<T> sp (p_.lock ()); - - if (sp) - i_.reset (db, object_traits<object_type>::id (*sp)); - else - i_.reset (); - } - - template <class T> - template <class O> - inline typename object_traits<O>::id_type lazy_weak_ptr<T>:: - object_id () const - { - typedef typename object_traits<T>::object_type object_type; - - ::boost::shared_ptr<T> sp (p_.lock ()); - return sp - ? object_traits<object_type>::id (*sp) - : i_.template object_id<O> (); - } - - template <class T> - inline typename lazy_weak_ptr<T>::database_type& lazy_weak_ptr<T>:: - database () const - { - return *i_.database (); - } - - template<class T> - inline void - swap (lazy_weak_ptr<T>& a, lazy_weak_ptr<T>& b) - { - a.swap (b); - } - } -} diff --git a/odb/boost/smart-ptr/lazy-ptr.txx b/odb/boost/smart-ptr/lazy-ptr.txx deleted file mode 100644 index c0cebd9..0000000 --- a/odb/boost/smart-ptr/lazy-ptr.txx +++ /dev/null @@ -1,43 +0,0 @@ -// file : odb/boost/smart-ptr/lazy-ptr.txx -// license : GNU GPL v2; see accompanying LICENSE file - -namespace odb -{ - namespace boost - { - // - // lazy_shared_ptr - // - - template <class T> - template <class Y> - bool lazy_shared_ptr<T>:: - equal (const lazy_shared_ptr<Y>& r) const - { - bool t1 (!p_ == loaded ()); - bool t2 (!r.p_ == r.loaded ()); - - // If both are transient, then compare the underlying pointers. - // - if (t1 && t2) - return p_ == r.p_; - - // If one is transient and the other is persistent, then compare - // the underlying pointers but only if they are non NULL. Note - // that an unloaded persistent object is always unequal to a - // transient object. - // - if (t1 || t2) - return p_ == r.p_ && p_; - - // If both objects are persistent, then we compare databases and - // object ids. - // - typedef typename object_traits<T>::object_type object_type1; - typedef typename object_traits<Y>::object_type object_type2; - - return i_.database () == r.i_.database () && - object_id<object_type1> () == r.template object_id<object_type2> (); - } - } -} diff --git a/odb/boost/smart-ptr/pointer-traits.hxx b/odb/boost/smart-ptr/pointer-traits.hxx deleted file mode 100644 index 8882822..0000000 --- a/odb/boost/smart-ptr/pointer-traits.hxx +++ /dev/null @@ -1,110 +0,0 @@ -// file : odb/boost/smart-ptr/pointer-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_SMART_PTR_POINTER_TRAITS_HXX -#define ODB_BOOST_SMART_PTR_POINTER_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> - -#include <odb/pointer-traits.hxx> -#include <odb/details/meta/remove-const.hxx> - -namespace odb -{ - // Specialization for boost::shared_ptr. - // - template <typename T> - class pointer_traits< ::boost::shared_ptr<T> > - { - public: - static const pointer_kind kind = pk_shared; - static const bool lazy = false; - - typedef T element_type; - typedef ::boost::shared_ptr<element_type> pointer_type; - typedef ::boost::shared_ptr<const element_type> const_pointer_type; - typedef typename odb::details::meta::remove_const<element_type>::result - unrestricted_element_type; - typedef ::boost::shared_ptr<unrestricted_element_type> - unrestricted_pointer_type; - typedef smart_ptr_guard<pointer_type> guard; - - static element_type* - get_ptr (const pointer_type& p) - { - return p.get (); - } - - static element_type& - get_ref (const pointer_type& p) - { - return *p; - } - - static bool - null_ptr (const pointer_type& p) - { - return !p; - } - - static unrestricted_pointer_type - const_pointer_cast (const pointer_type& p) - { - return ::boost::const_pointer_cast<unrestricted_element_type> (p); - } - - template <typename T1> - static ::boost::shared_ptr<T1> - static_pointer_cast (const pointer_type& p) - { - return ::boost::static_pointer_cast<T1> (p); - } - - template <typename T1> - static ::boost::shared_ptr<T1> - dynamic_pointer_cast (const pointer_type& p) - { - return ::boost::dynamic_pointer_cast<T1> (p); - } - - public: - static void* - allocate (std::size_t n) - { - return operator new (n); - } - - static void - free (void* p) - { - operator delete (p); - } - }; - - // Specialization for boost::weak_ptr. - // - template <typename T> - class pointer_traits< ::boost::weak_ptr<T> > - { - public: - static const pointer_kind kind = pk_weak; - static const bool lazy = false; - - typedef T element_type; - typedef ::boost::weak_ptr<element_type> pointer_type; - typedef ::boost::shared_ptr<element_type> strong_pointer_type; - - static strong_pointer_type - lock (const pointer_type& p) - { - return p.lock (); - } - }; -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_SMART_PTR_POINTER_TRAITS_HXX diff --git a/odb/boost/smart-ptr/wrapper-traits.hxx b/odb/boost/smart-ptr/wrapper-traits.hxx deleted file mode 100644 index bc3229d..0000000 --- a/odb/boost/smart-ptr/wrapper-traits.hxx +++ /dev/null @@ -1,64 +0,0 @@ -// file : odb/boost/smart-ptr/wrapper-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_SMART_PTR_WRAPPER_TRAITS_HXX -#define ODB_BOOST_SMART_PTR_WRAPPER_TRAITS_HXX - -#include <odb/pre.hxx> - -#include <boost/shared_ptr.hpp> - -#include <odb/wrapper-traits.hxx> - -namespace odb -{ - // Specialization for boost::shared_ptr. - // - template <typename T> - class wrapper_traits< ::boost::shared_ptr<T> > - { - public: - typedef T wrapped_type; - typedef ::boost::shared_ptr<T> wrapper_type; - - // T can be const. - // - typedef - typename odb::details::meta::remove_const<T>::result - unrestricted_wrapped_type; - - static const bool null_handler = true; - static const bool null_default = false; - - static bool - get_null (const wrapper_type& p) - { - return !p; - } - - static void - set_null (wrapper_type& p) - { - p.reset (); - } - - static const wrapped_type& - get_ref (const wrapper_type& p) - { - return *p; - } - - static unrestricted_wrapped_type& - set_ref (wrapper_type& p) - { - if (!p) - p.reset (new unrestricted_wrapped_type); - - return const_cast<unrestricted_wrapped_type&> (*p); - } - }; -} - -#include <odb/post.hxx> - -#endif // ODB_BOOST_SMART_PTR_WRAPPER_TRAITS_HXX diff --git a/odb/boost/unordered.options b/odb/boost/unordered.options deleted file mode 100644 index 56ee6c7..0000000 --- a/odb/boost/unordered.options +++ /dev/null @@ -1,7 +0,0 @@ -# file : odb/boost/unordered.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - ---odb-epilogue '#include <odb/boost/unordered/container-traits.hxx>' ---hxx-prologue '#include <odb/boost/unordered/container-traits.hxx>' diff --git a/odb/boost/unordered/container-traits.hxx b/odb/boost/unordered/container-traits.hxx deleted file mode 100644 index 7814971..0000000 --- a/odb/boost/unordered/container-traits.hxx +++ /dev/null @@ -1,275 +0,0 @@ -// file : odb/boost/unordered/container-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_UNORDERED_CONTAINER_TRAITS_HXX -#define ODB_BOOST_UNORDERED_CONTAINER_TRAITS_HXX - -#include <boost/version.hpp> - -// Unordered containers are available since 1.36.0. -// -#if BOOST_VERSION >= 103600 - -#include <odb/pre.hxx> - -#include <utility> // std::move - -#include <boost/unordered_set.hpp> -#include <boost/unordered_map.hpp> - -#include <odb/container-traits.hxx> -#include <odb/details/config.hxx> // ODB_CXX11 - -namespace odb -{ - // unordered_set - // - template <typename V, typename H, typename P, typename A> - class access::container_traits< ::boost::unordered_set<V, H, P, A> > - { - public: - static const container_kind kind = ck_set; - static const bool smart = false; - - typedef ::boost::unordered_set<V, H, P, A> container_type; - typedef V value_type; - - typedef set_functions<value_type> functions; - - public: - static void - persist (const container_type& c, const functions& f) - { - for (typename container_type::const_iterator i (c.begin ()), - e (c.end ()); i != e; ++i) - f.insert (*i); - } - - static void - load (container_type& c, bool more, const functions& f) - { - c.clear (); - - while (more) - { - value_type v; - more = f.select (v); -#ifdef ODB_CXX11 - c.insert (std::move (v)); -#else - c.insert (v); -#endif - } - } - - static void - update (const container_type& c, const functions& f) - { - f.delete_ (); - - for (typename container_type::const_iterator i (c.begin ()), - e (c.end ()); i != e; ++i) - f.insert (*i); - } - - static void - erase (const functions& f) - { - f.delete_ (); - } - }; - - // unordered_multiset - // - // @@ Does multiset preserve insertion order of equal elements? The - // current implementation in the generated code does not guarantee - // this. - // - template <typename V, typename H, typename P, typename A> - class access::container_traits< ::boost::unordered_multiset<V, H, P, A> > - { - public: - static const container_kind kind = ck_multiset; - static const bool smart = false; - - typedef ::boost::unordered_multiset<V, H, P, A> container_type; - typedef V value_type; - - typedef set_functions<value_type> functions; - - public: - static void - persist (const container_type& c, const functions& f) - { - for (typename container_type::const_iterator i (c.begin ()), - e (c.end ()); i != e; ++i) - f.insert (*i); - } - - static void - load (container_type& c, bool more, const functions& f) - { - c.clear (); - - while (more) - { - value_type v; - more = f.select (v); -#ifdef ODB_CXX11 - c.insert (std::move (v)); -#else - c.insert (v); -#endif - } - } - - static void - update (const container_type& c, const functions& f) - { - f.delete_ (); - - for (typename container_type::const_iterator i (c.begin ()), - e (c.end ()); i != e; ++i) - f.insert (*i); - } - - static void - erase (const functions& f) - { - f.delete_ (); - } - }; - - // unordered_map - // - template <typename K, typename V, typename H, typename P, typename A> - class access::container_traits< ::boost::unordered_map<K, V, H, P, A> > - { - public: - static const container_kind kind = ck_map; - static const bool smart = false; - - typedef ::boost::unordered_map<K, V, H, P, A> container_type; - - typedef K key_type; - typedef V value_type; - typedef typename container_type::value_type pair_type; - - typedef map_functions<key_type, value_type> functions; - - public: - static void - persist (const container_type& c, const functions& f) - { - for (typename container_type::const_iterator i (c.begin ()), - e (c.end ()); i != e; ++i) - f.insert (i->first, i->second); - } - - static void - load (container_type& c, bool more, const functions& f) - { - c.clear (); - - while (more) - { - key_type k; - value_type v; - more = f.select (k, v); - -#ifdef ODB_CXX11 - c.insert (pair_type (std::move (k), std::move (v))); -#else - c.insert (pair_type (k, v)); -#endif - } - } - - static void - update (const container_type& c, const functions& f) - { - f.delete_ (); - - for (typename container_type::const_iterator i (c.begin ()), - e (c.end ()); i != e; ++i) - f.insert (i->first, i->second); - } - - static void - erase (const functions& f) - { - f.delete_ (); - } - }; - - // unordered_multimap - // - // @@ Does multimap preserve insertion order of equal elements? The - // current implementation in the generated code does not guarantee - // this. - // - template <typename K, typename V, typename H, typename P, typename A> - class access::container_traits< ::boost::unordered_multimap<K, V, H, P, A> > - { - public: - static const container_kind kind = ck_multimap; - static const bool smart = false; - - typedef ::boost::unordered_multimap<K, V, H, P, A> container_type; - - typedef K key_type; - typedef V value_type; - typedef typename container_type::value_type pair_type; - - typedef map_functions<key_type, value_type> functions; - - public: - static void - persist (const container_type& c, const functions& f) - { - for (typename container_type::const_iterator i (c.begin ()), - e (c.end ()); i != e; ++i) - f.insert (i->first, i->second); - } - - static void - load (container_type& c, bool more, const functions& f) - { - c.clear (); - - while (more) - { - key_type k; - value_type v; - more = f.select (k, v); - -#ifdef ODB_CXX11 - c.insert (pair_type (std::move (k), std::move (v))); -#else - c.insert (pair_type (k, v)); -#endif - } - } - - static void - update (const container_type& c, const functions& f) - { - f.delete_ (); - - for (typename container_type::const_iterator i (c.begin ()), - e (c.end ()); i != e; ++i) - f.insert (i->first, i->second); - } - - static void - erase (const functions& f) - { - f.delete_ (); - } - }; -} - -#include <odb/post.hxx> - -#endif // BOOST_VERSION -#endif // ODB_BOOST_UNORDERED_CONTAINER_TRAITS_HXX diff --git a/odb/boost/uuid.options b/odb/boost/uuid.options deleted file mode 100644 index 8b77aa6..0000000 --- a/odb/boost/uuid.options +++ /dev/null @@ -1,4 +0,0 @@ -# file : odb/boost/uuid.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/uuid/uuid diff --git a/odb/boost/uuid/mssql/uuid-mapping.hxx b/odb/boost/uuid/mssql/uuid-mapping.hxx deleted file mode 100644 index 8da4c7d..0000000 --- a/odb/boost/uuid/mssql/uuid-mapping.hxx +++ /dev/null @@ -1,22 +0,0 @@ -// file : odb/boost/uuid/mssql/uuid-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_UUID_MSSQL_UUID_MAPPING_HXX -#define ODB_BOOST_UUID_MSSQL_UUID_MAPPING_HXX - -#include <boost/version.hpp> - -// UUID library is available since 1.42.0. -// -#if BOOST_VERSION >= 104200 - -#include <boost/uuid/uuid.hpp> - -// By default map boost::uuids::uuid to SQL Server UNIQUEIDENTIFIER and -// use NULL to represent nil UUIDs. If NULL is disabled (e.g., at the -// member level), then we store the nil UUID (i.e., all bytes are zero). -// -#pragma db value(boost::uuids::uuid) type("UNIQUEIDENTIFIER") null - -#endif // BOOST_VERSION -#endif // ODB_BOOST_UUID_MSSQL_UUID_MAPPING_HXX diff --git a/odb/boost/uuid/mssql/uuid-traits.hxx b/odb/boost/uuid/mssql/uuid-traits.hxx deleted file mode 100644 index ead1d85..0000000 --- a/odb/boost/uuid/mssql/uuid-traits.hxx +++ /dev/null @@ -1,65 +0,0 @@ -// file : odb/boost/uuid/mssql/uuid-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_UUID_MSSQL_UUID_TRAITS_HXX -#define ODB_BOOST_UUID_MSSQL_UUID_TRAITS_HXX - -#include <boost/version.hpp> - -// UUID library is available since 1.42.0. -// -#if BOOST_VERSION >= 104200 - -#include <odb/pre.hxx> - -#include <cstring> // std::memcpy, std::memset - -#include <boost/uuid/uuid.hpp> - -#include <odb/mssql/traits.hxx> - -namespace odb -{ - namespace mssql - { - template <> - class default_value_traits< ::boost::uuids::uuid, id_uniqueidentifier> - { - public: - typedef ::boost::uuids::uuid value_type; - typedef value_type query_type; - typedef uniqueidentifier image_type; - - static void - set_value (value_type& v, const uniqueidentifier& i, bool is_null) - { - if (!is_null) - std::memcpy (v.data, &i, 16); - else - std::memset (v.data, 0, 16); - } - - static void - set_image (uniqueidentifier& i, bool& is_null, const value_type& v) - { - // If we can, store nil as NULL. Otherwise, store it as a value. - // - is_null = is_null && v.is_nil (); - - if (!is_null) - std::memcpy (&i, v.data, 16); - } - }; - - template <> - struct default_type_traits< ::boost::uuids::uuid> - { - static const database_type_id db_type_id = id_uniqueidentifier; - }; - } -} - -#include <odb/post.hxx> - -#endif // BOOST_VERSION -#endif // ODB_BOOST_UUID_MSSQL_UUID_TRAITS_HXX diff --git a/odb/boost/uuid/mysql/uuid-mapping.hxx b/odb/boost/uuid/mysql/uuid-mapping.hxx deleted file mode 100644 index a1de637..0000000 --- a/odb/boost/uuid/mysql/uuid-mapping.hxx +++ /dev/null @@ -1,22 +0,0 @@ -// file : odb/boost/uuid/mysql/uuid-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_UUID_MYSQL_UUID_MAPPING_HXX -#define ODB_BOOST_UUID_MYSQL_UUID_MAPPING_HXX - -#include <boost/version.hpp> - -// UUID library is available since 1.42.0. -// -#if BOOST_VERSION >= 104200 - -#include <boost/uuid/uuid.hpp> - -// By default map boost::uuids::uuid to MySQL BINARY(16) and use NULL to -// represent nil UUIDs. If NULL is disabled (e.g., at the member level), -// then we store the nil UUID (i.e., all bytes are zero). -// -#pragma db value(boost::uuids::uuid) type("BINARY(16)") null - -#endif // BOOST_VERSION -#endif // ODB_BOOST_UUID_MYSQL_UUID_MAPPING_HXX diff --git a/odb/boost/uuid/mysql/uuid-traits.hxx b/odb/boost/uuid/mysql/uuid-traits.hxx deleted file mode 100644 index b2ce1b0..0000000 --- a/odb/boost/uuid/mysql/uuid-traits.hxx +++ /dev/null @@ -1,81 +0,0 @@ -// file : odb/boost/uuid/mysql/uuid-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_UUID_MYSQL_UUID_TRAITS_HXX -#define ODB_BOOST_UUID_MYSQL_UUID_TRAITS_HXX - -#include <boost/version.hpp> - -// UUID library is available since 1.42.0. -// -#if BOOST_VERSION >= 104200 - -#include <odb/pre.hxx> - -#include <cstring> // std::memcpy, std::memset -#include <cassert> - -#include <boost/uuid/uuid.hpp> - -#include <odb/mysql/traits.hxx> - -namespace odb -{ - namespace mysql - { - template <> - struct default_value_traits< ::boost::uuids::uuid, id_blob> - { - typedef ::boost::uuids::uuid value_type; - typedef value_type query_type; - typedef details::buffer image_type; - - static void - set_value (value_type& v, - const details::buffer& b, - std::size_t n, - bool is_null) - { - if (!is_null) - { - assert (n == 16); - std::memcpy (v.data, b.data (), 16); - } - else - std::memset (v.data, 0, 16); - } - - static void - set_image (details::buffer& b, - std::size_t& n, - bool& is_null, - const value_type& v) - { - // If we can, store nil as NULL. Otherwise, store it as a value. - // - is_null = is_null && v.is_nil (); - - if (!is_null) - { - n = 16; - - if (n > b.capacity ()) - b.capacity (n); - - std::memcpy (b.data (), v.data, n); - } - } - }; - - template <> - struct default_type_traits< ::boost::uuids::uuid> - { - static const database_type_id db_type_id = id_blob; - }; - } -} - -#include <odb/post.hxx> - -#endif // BOOST_VERSION -#endif // ODB_BOOST_UUID_MYSQL_UUID_TRAITS_HXX diff --git a/odb/boost/uuid/oracle/uuid-mapping.hxx b/odb/boost/uuid/oracle/uuid-mapping.hxx deleted file mode 100644 index bd49122..0000000 --- a/odb/boost/uuid/oracle/uuid-mapping.hxx +++ /dev/null @@ -1,22 +0,0 @@ -// file : odb/boost/uuid/oracle/uuid-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_UUID_ORACLE_UUID_MAPPING_HXX -#define ODB_BOOST_UUID_ORACLE_UUID_MAPPING_HXX - -#include <boost/version.hpp> - -// UUID library is available since 1.42.0. -// -#if BOOST_VERSION >= 104200 - -#include <boost/uuid/uuid.hpp> - -// By default map boost::uuids::uuid to Oracle RAW(16) and use NULL to -// represent nil UUIDs. If NULL is disabled (e.g., at the member level), -// then we store the nil UUID (i.e., all bytes are zero). -// -#pragma db value(boost::uuids::uuid) type("RAW(16)") null - -#endif // BOOST_VERSION -#endif // ODB_BOOST_UUID_ORACLE_UUID_MAPPING_HXX diff --git a/odb/boost/uuid/oracle/uuid-traits.hxx b/odb/boost/uuid/oracle/uuid-traits.hxx deleted file mode 100644 index d1ced34..0000000 --- a/odb/boost/uuid/oracle/uuid-traits.hxx +++ /dev/null @@ -1,77 +0,0 @@ -// file : odb/boost/uuid/oracle/uuid-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_UUID_ORACLE_UUID_TRAITS_HXX -#define ODB_BOOST_UUID_ORACLE_UUID_TRAITS_HXX - -#include <boost/version.hpp> - -// UUID library is available since 1.42.0. -// -#if BOOST_VERSION >= 104200 - -#include <odb/pre.hxx> - -#include <cstring> // std::memcpy, std::memset -#include <cassert> - -#include <boost/uuid/uuid.hpp> - -#include <odb/oracle/traits.hxx> - -namespace odb -{ - namespace oracle - { - template <> - struct default_value_traits< ::boost::uuids::uuid, id_raw> - { - public: - typedef ::boost::uuids::uuid value_type; - typedef value_type query_type; - typedef char* image_type; - - static void - set_value (value_type& v, const char* b, std::size_t n, bool is_null) - { - if (!is_null) - { - assert (n == 16); - std::memcpy (v.data, b, 16); - } - else - std::memset (v.data, 0, 16); - } - - static void - set_image (char* b, - std::size_t c, - std::size_t& n, - bool& is_null, - const value_type& v) - { - // If we can, store nil as NULL. Otherwise, store it as a value. - // - is_null = is_null && v.is_nil (); - - if (!is_null) - { - n = 16; - assert (c >= n); - std::memcpy (b, v.data, n); - } - } - }; - - template <> - struct default_type_traits< ::boost::uuids::uuid> - { - static const database_type_id db_type_id = id_raw; - }; - } -} - -#include <odb/post.hxx> - -#endif // BOOST_VERSION -#endif // ODB_BOOST_UUID_ORACLE_UUID_TRAITS_HXX diff --git a/odb/boost/uuid/pgsql/uuid-mapping.hxx b/odb/boost/uuid/pgsql/uuid-mapping.hxx deleted file mode 100644 index 517dfa6..0000000 --- a/odb/boost/uuid/pgsql/uuid-mapping.hxx +++ /dev/null @@ -1,22 +0,0 @@ -// file : odb/boost/uuid/pgsql/uuid-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_UUID_PGSQL_UUID_MAPPING_HXX -#define ODB_BOOST_UUID_PGSQL_UUID_MAPPING_HXX - -#include <boost/version.hpp> - -// UUID library is available since 1.42.0. -// -#if BOOST_VERSION >= 104200 - -#include <boost/uuid/uuid.hpp> - -// By default map boost::uuids::uuid to PostgreSQL UUID and use NULL to -// represent nil UUIDs. If NULL is disabled (e.g., at the member level), -// then we store the nil UUID (i.e., all bytes are zero). -// -#pragma db value(boost::uuids::uuid) type("UUID") null - -#endif // BOOST_VERSION -#endif // ODB_BOOST_UUID_PGSQL_UUID_MAPPING_HXX diff --git a/odb/boost/uuid/pgsql/uuid-traits.hxx b/odb/boost/uuid/pgsql/uuid-traits.hxx deleted file mode 100644 index 482ca0e..0000000 --- a/odb/boost/uuid/pgsql/uuid-traits.hxx +++ /dev/null @@ -1,70 +0,0 @@ -// file : odb/boost/uuid/pgsql/uuid-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_UUID_PGSQL_UUID_TRAITS_HXX -#define ODB_BOOST_UUID_PGSQL_UUID_TRAITS_HXX - -#include <boost/version.hpp> - -// UUID library is available since 1.42.0. -// -#if BOOST_VERSION >= 104200 - -#include <odb/pre.hxx> - -#include <cstring> // std::memcpy, std::memset - -#include <boost/uuid/uuid.hpp> - -#include <odb/pgsql/traits.hxx> - -namespace odb -{ - namespace pgsql - { - template <> - class default_value_traits< ::boost::uuids::uuid, id_uuid> - { - public: - typedef ::boost::uuids::uuid value_type; - typedef value_type query_type; - typedef unsigned char* image_type; - - // PostgreSQL binary UUID representation is big-endian in the RFC 4122, - // section 4.1.2 order. Lucky for us, that also the representation used - // by Boost. - // - - static void - set_value (value_type& v, const unsigned char* i, bool is_null) - { - if (!is_null) - std::memcpy (v.data, i, 16); - else - std::memset (v.data, 0, 16); - } - - static void - set_image (unsigned char* i, bool& is_null, const value_type& v) - { - // If we can, store nil as NULL. Otherwise, store it as a value. - // - is_null = is_null && v.is_nil (); - - if (!is_null) - std::memcpy (i, v.data, 16); - } - }; - - template <> - struct default_type_traits< ::boost::uuids::uuid> - { - static const database_type_id db_type_id = id_uuid; - }; - } -} - -#include <odb/post.hxx> - -#endif // BOOST_VERSION -#endif // ODB_BOOST_UUID_PGSQL_UUID_TRAITS_HXX diff --git a/odb/boost/uuid/sqlite/uuid-mapping.hxx b/odb/boost/uuid/sqlite/uuid-mapping.hxx deleted file mode 100644 index 3fe2b6e..0000000 --- a/odb/boost/uuid/sqlite/uuid-mapping.hxx +++ /dev/null @@ -1,22 +0,0 @@ -// file : odb/boost/uuid/sqlite/uuid-mapping.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_UUID_SQLITE_UUID_MAPPING_HXX -#define ODB_BOOST_UUID_SQLITE_UUID_MAPPING_HXX - -#include <boost/version.hpp> - -// UUID library is available since 1.42.0. -// -#if BOOST_VERSION >= 104200 - -#include <boost/uuid/uuid.hpp> - -// By default map boost::uuids::uuid to SQLite BLOB and use NULL to -// represent nil UUIDs. If NULL is disabled (e.g., at the member level), -// then we store the nil UUID (i.e., all bytes are zero). -// -#pragma db value(boost::uuids::uuid) type("BLOB") null - -#endif // BOOST_VERSION -#endif // ODB_BOOST_UUID_SQLITE_UUID_MAPPING_HXX diff --git a/odb/boost/uuid/sqlite/uuid-traits.hxx b/odb/boost/uuid/sqlite/uuid-traits.hxx deleted file mode 100644 index 7a333c8..0000000 --- a/odb/boost/uuid/sqlite/uuid-traits.hxx +++ /dev/null @@ -1,81 +0,0 @@ -// file : odb/boost/uuid/sqlite/uuid-traits.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef ODB_BOOST_UUID_SQLITE_UUID_TRAITS_HXX -#define ODB_BOOST_UUID_SQLITE_UUID_TRAITS_HXX - -#include <boost/version.hpp> - -// UUID library is available since 1.42.0. -// -#if BOOST_VERSION >= 104200 - -#include <odb/pre.hxx> - -#include <cstring> // std::memcpy, std::memset -#include <cassert> - -#include <boost/uuid/uuid.hpp> - -#include <odb/sqlite/traits.hxx> - -namespace odb -{ - namespace sqlite - { - template <> - struct default_value_traits< ::boost::uuids::uuid, id_blob> - { - typedef ::boost::uuids::uuid value_type; - typedef value_type query_type; - typedef details::buffer image_type; - - static void - set_value (value_type& v, - const details::buffer& b, - std::size_t n, - bool is_null) - { - if (!is_null) - { - assert (n == 16); - std::memcpy (v.data, b.data (), 16); - } - else - std::memset (v.data, 0, 16); - } - - static void - set_image (details::buffer& b, - std::size_t& n, - bool& is_null, - const value_type& v) - { - // If we can, store nil as NULL. Otherwise, store it as a value. - // - is_null = is_null && v.is_nil (); - - if (!is_null) - { - n = 16; - - if (n > b.capacity ()) - b.capacity (n); - - std::memcpy (b.data (), v.data, n); - } - } - }; - - template <> - struct default_type_traits< ::boost::uuids::uuid> - { - static const database_type_id db_type_id = id_blob; - }; - } -} - -#include <odb/post.hxx> - -#endif // BOOST_VERSION -#endif // ODB_BOOST_UUID_SQLITE_UUID_TRAITS_HXX diff --git a/odb/boost/uuid/uuid-common.options b/odb/boost/uuid/uuid-common.options deleted file mode 100644 index 3d9fa50..0000000 --- a/odb/boost/uuid/uuid-common.options +++ /dev/null @@ -1,4 +0,0 @@ -# file : odb/boost/uuid/uuid-common.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version diff --git a/odb/boost/uuid/uuid-mssql.options b/odb/boost/uuid/uuid-mssql.options deleted file mode 100644 index f6a8144..0000000 --- a/odb/boost/uuid/uuid-mssql.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/uuid/uuid-mssql.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/uuid/mssql/uuid-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/uuid/mssql/uuid-traits.hxx>' diff --git a/odb/boost/uuid/uuid-mysql.options b/odb/boost/uuid/uuid-mysql.options deleted file mode 100644 index 889a452..0000000 --- a/odb/boost/uuid/uuid-mysql.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/uuid/uuid-mysql.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/uuid/mysql/uuid-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/uuid/mysql/uuid-traits.hxx>' diff --git a/odb/boost/uuid/uuid-oracle.options b/odb/boost/uuid/uuid-oracle.options deleted file mode 100644 index 3022dbf..0000000 --- a/odb/boost/uuid/uuid-oracle.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/uuid/uuid-oracle.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/uuid/oracle/uuid-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/uuid/oracle/uuid-traits.hxx>' diff --git a/odb/boost/uuid/uuid-pgsql.options b/odb/boost/uuid/uuid-pgsql.options deleted file mode 100644 index 63268dc..0000000 --- a/odb/boost/uuid/uuid-pgsql.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/uuid/uuid-pgsql.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/uuid/pgsql/uuid-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/uuid/pgsql/uuid-traits.hxx>' diff --git a/odb/boost/uuid/uuid-sqlite.options b/odb/boost/uuid/uuid-sqlite.options deleted file mode 100644 index ea515e9..0000000 --- a/odb/boost/uuid/uuid-sqlite.options +++ /dev/null @@ -1,11 +0,0 @@ -# file : odb/boost/uuid/uuid-sqlite.options -# license : GNU GPL v2; see accompanying LICENSE file - ---profile boost/version - -# Include the default mapping in prologue instead of epilogue to -# allow the user to override the default mapping. -# ---odb-prologue '#include <odb/boost/uuid/sqlite/uuid-mapping.hxx>' - ---hxx-prologue '#include <odb/boost/uuid/sqlite/uuid-traits.hxx>' diff --git a/odb/boost/version-build2-stub.hxx b/odb/boost/version-build2-stub.hxx deleted file mode 100644 index e29f23c..0000000 --- a/odb/boost/version-build2-stub.hxx +++ /dev/null @@ -1,4 +0,0 @@ -// file : odb/boost/version-build2-stub.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#include <odb/boost/version.hxx> diff --git a/odb/boost/version-build2.hxx b/odb/boost/version-build2.hxx deleted file mode 100644 index e69de29..0000000 --- a/odb/boost/version-build2.hxx +++ /dev/null diff --git a/odb/boost/version-build2.hxx.in b/odb/boost/version-build2.hxx.in deleted file mode 100644 index 37a1ffc..0000000 --- a/odb/boost/version-build2.hxx.in +++ /dev/null @@ -1,46 +0,0 @@ -// file : odb/boost/version-build2.hxx.in -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef LIBODB_BOOST_VERSION // Note: using the version macro itself. - -// @@ TODO: need to derive automatically (it is also hardcoded in *.options). -// -#define ODB_BOOST_VERSION 2047600 - -// The numeric version format is AAAAABBBBBCCCCCDDDE where: -// -// AAAAA - major version number -// BBBBB - minor version number -// CCCCC - bugfix version number -// DDD - alpha / beta (DDD + 500) version number -// E - final (0) / snapshot (1) -// -// When DDDE is not 0, 1 is subtracted from AAAAABBBBBCCCCC. For example: -// -// Version AAAAABBBBBCCCCCDDDE -// -// 0.1.0 0000000001000000000 -// 0.1.2 0000000001000020000 -// 1.2.3 0000100002000030000 -// 2.2.0-a.1 0000200001999990010 -// 3.0.0-b.2 0000299999999995020 -// 2.2.0-a.1.z 0000200001999990011 -// -#define LIBODB_BOOST_VERSION $libodb_boost.version.project_number$ULL -#define LIBODB_BOOST_VERSION_STR "$libodb_boost.version.project$" -#define LIBODB_BOOST_VERSION_ID "$libodb_boost.version.project_id$" - -#define LIBODB_BOOST_VERSION_MAJOR $libodb_boost.version.major$ -#define LIBODB_BOOST_VERSION_MINOR $libodb_boost.version.minor$ -#define LIBODB_BOOST_VERSION_PATCH $libodb_boost.version.patch$ - -#define LIBODB_BOOST_PRE_RELEASE $libodb_boost.version.pre_release$ - -#define LIBODB_BOOST_SNAPSHOT $libodb_boost.version.snapshot_sn$ULL -#define LIBODB_BOOST_SNAPSHOT_ID "$libodb_boost.version.snapshot_id$" - -#include <odb/version.hxx> - -$libodb.check(LIBODB_VERSION, LIBODB_SNAPSHOT)$ - -#endif // LIBODB_BOOST_VERSION diff --git a/odb/boost/version.hxx b/odb/boost/version.hxx deleted file mode 100644 index c46e21a..0000000 --- a/odb/boost/version.hxx +++ /dev/null @@ -1,55 +0,0 @@ -// file : odb/boost/version.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifdef LIBODB_BOOST_BUILD2 -# include <odb/boost/version-build2.hxx> -#else - -#ifndef ODB_BOOST_VERSION_HXX -#define ODB_BOOST_VERSION_HXX - -#include <odb/pre.hxx> - -#include <odb/version.hxx> - -// Version format is AABBCCDD where -// -// AA - major version number -// BB - minor version number -// CC - bugfix version number -// DD - alpha / beta (DD + 50) version number -// -// When DD is not 00, 1 is subtracted from AABBCC. For example: -// -// Version AABBCCDD -// 2.0.0 02000000 -// 2.1.0 02010000 -// 2.1.1 02010100 -// 2.2.0.a1 02019901 -// 3.0.0.b2 02999952 -// - -// Check that we have compatible ODB version. -// -#if ODB_VERSION != 20476 -# error incompatible odb interface version detected -#endif - -// ODB Boost interface version: odb interface version plus the Boost interface -// version. -// -#define ODB_BOOST_VERSION 2047600 -#define ODB_BOOST_VERSION_STR "2.5.0-b.26" - -// libodb-boost version: odb interface version plus the bugfix version. Note -// that LIBODB_BOOST_VERSION is always greater or equal to ODB_BOOST_VERSION -// since if the Boost interface virsion is incremented then the bugfix version -// must be incremented as well. -// -#define LIBODB_BOOST_VERSION 2049976 -#define LIBODB_BOOST_VERSION_STR "2.5.0-b.26" - -#include <odb/post.hxx> - -#endif // ODB_BOOST_VERSION_HXX -#endif // LIBODB_BOOST_BUILD2 diff --git a/odb/boost/version.options b/odb/boost/version.options deleted file mode 100644 index 904dcc5..0000000 --- a/odb/boost/version.options +++ /dev/null @@ -1,12 +0,0 @@ -# file : odb/boost/version.options -# license : GNU GPL v2; see accompanying LICENSE file - -# Make sure the options files as seen by the ODB compiler and header -# files as seen by the C++ compiler have the same Boost interface -# version. -# ---hxx-prologue '#include <odb/boost/version.hxx>' - ---hxx-prologue '#if ODB_BOOST_VERSION != 2047600 // 2.5.0-b.26' ---hxx-prologue '# error ODB and C++ compilers see different libodb-boost interface versions' ---hxx-prologue '#endif' |