diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-02-18 10:42:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-02-18 10:42:41 +0200 |
commit | 79e1e744a2f306f9c04b0cda3058e9ed40d8421c (patch) | |
tree | 7c3f927434da74b5305fd239f0f3f94a513c6d5f | |
parent | 3c7bfb25892842a1083b4d6393d5cb4aff615f2c (diff) |
Add odb::core namespace to be used in using-directives
Port all the examples and tests.
-rw-r--r-- | odb/exception.hxx | 5 | ||||
-rw-r--r-- | odb/exceptions.hxx | 19 | ||||
-rw-r--r-- | odb/forward.hxx | 8 | ||||
-rw-r--r-- | odb/lazy-ptr.hxx | 6 | ||||
-rw-r--r-- | odb/query.hxx | 5 | ||||
-rw-r--r-- | odb/result.hxx | 5 |
6 files changed, 48 insertions, 0 deletions
diff --git a/odb/exception.hxx b/odb/exception.hxx index 9ffceed..b2bae3d 100644 --- a/odb/exception.hxx +++ b/odb/exception.hxx @@ -19,6 +19,11 @@ namespace odb virtual const char* what () const throw () = 0; }; + + namespace core + { + using odb::exception; + } } #include <odb/post.hxx> diff --git a/odb/exceptions.hxx b/odb/exceptions.hxx index d17ebb7..84ec133 100644 --- a/odb/exceptions.hxx +++ b/odb/exceptions.hxx @@ -89,6 +89,25 @@ namespace odb struct LIBODB_EXPORT database_exception: odb::exception { }; + + namespace core + { + using odb::null_pointer; + + using odb::already_in_transaction; + using odb::not_in_transaction; + using odb::transaction_already_finalized; + + using odb::already_in_session; + using odb::not_in_session; + using odb::const_object; + + using odb::deadlock; + using odb::object_not_persistent; + using odb::object_already_persistent; + using odb::result_not_cached; + using odb::database_exception; + } } #include <odb/post.hxx> diff --git a/odb/forward.hxx b/odb/forward.hxx index 566b3f0..ec502d2 100644 --- a/odb/forward.hxx +++ b/odb/forward.hxx @@ -12,6 +12,14 @@ namespace odb { class database; class transaction; + class session; + + namespace core + { + using odb::database; + using odb::transaction; + using odb::session; + } // Implementation details. // diff --git a/odb/lazy-ptr.hxx b/odb/lazy-ptr.hxx index 6514d53..9eb8af8 100644 --- a/odb/lazy-ptr.hxx +++ b/odb/lazy-ptr.hxx @@ -186,6 +186,12 @@ namespace odb mutable std::auto_ptr<T> p_; mutable lazy_ptr_impl<T> i_; }; + + namespace core + { + using odb::lazy_ptr; + using odb::lazy_auto_ptr; + } } #include <odb/lazy-ptr.ixx> diff --git a/odb/query.hxx b/odb/query.hxx index 5734ba5..5cdeb6f 100644 --- a/odb/query.hxx +++ b/odb/query.hxx @@ -15,6 +15,11 @@ namespace odb template <typename T, typename Q = typename object_traits<T>::query_base_type> class query; + + namespace core + { + using odb::query; + } } #include <odb/post.hxx> diff --git a/odb/result.hxx b/odb/result.hxx index ae33cdd..17406e7 100644 --- a/odb/result.hxx +++ b/odb/result.hxx @@ -326,6 +326,11 @@ namespace odb private: details::shared_ptr<result_impl<T> > impl_; }; + + namespace core + { + using odb::result; + } } #include <odb/result.txx> |