| exceptions.hxx | | exceptions.hxx | |
| // file : odb/exceptions.hxx | | // file : odb/exceptions.hxx | |
| // author : Boris Kolpackov <boris@codesynthesis.com> | | // author : Boris Kolpackov <boris@codesynthesis.com> | |
| // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC | | // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC | |
| // license : GNU GPL v2; see accompanying LICENSE file | | // license : GNU GPL v2; see accompanying LICENSE file | |
| | | | |
| #ifndef ODB_EXCEPTIONS_HXX | | #ifndef ODB_EXCEPTIONS_HXX | |
| #define ODB_EXCEPTIONS_HXX | | #define ODB_EXCEPTIONS_HXX | |
| | | | |
| #include <odb/pre.hxx> | | #include <odb/pre.hxx> | |
| | | | |
|
| | | #include <string> | |
| | | | |
| #include <odb/exception.hxx> | | #include <odb/exception.hxx> | |
| | | | |
| #include <odb/details/export.hxx> | | #include <odb/details/export.hxx> | |
| | | | |
| namespace odb | | namespace odb | |
| { | | { | |
|
| struct LIBODB_EXPORT null_pointer: odb::exception | | struct LIBODB_EXPORT null_pointer: exception | |
| { | | { | |
| virtual const char* | | virtual const char* | |
| what () const throw (); | | what () const throw (); | |
| }; | | }; | |
| | | | |
| // Transaction exceptions. | | // Transaction exceptions. | |
| // | | // | |
|
| struct LIBODB_EXPORT already_in_transaction: odb::exception | | struct LIBODB_EXPORT already_in_transaction: exception | |
| { | | { | |
| virtual const char* | | virtual const char* | |
| what () const throw (); | | what () const throw (); | |
| }; | | }; | |
| | | | |
|
| struct LIBODB_EXPORT not_in_transaction: odb::exception | | struct LIBODB_EXPORT not_in_transaction: exception | |
| { | | { | |
| virtual const char* | | virtual const char* | |
| what () const throw (); | | what () const throw (); | |
| }; | | }; | |
| | | | |
|
| struct LIBODB_EXPORT transaction_already_finalized: odb::exception | | struct LIBODB_EXPORT transaction_already_finalized: exception | |
| { | | { | |
| virtual const char* | | virtual const char* | |
| what () const throw (); | | what () const throw (); | |
| }; | | }; | |
| | | | |
| // Session exceptions. | | // Session exceptions. | |
| // | | // | |
|
| struct LIBODB_EXPORT already_in_session: odb::exception | | struct LIBODB_EXPORT already_in_session: exception | |
| { | | { | |
| virtual const char* | | virtual const char* | |
| what () const throw (); | | what () const throw (); | |
| }; | | }; | |
| | | | |
|
| struct LIBODB_EXPORT not_in_session: odb::exception | | struct LIBODB_EXPORT not_in_session: exception | |
| { | | { | |
| virtual const char* | | virtual const char* | |
| what () const throw (); | | what () const throw (); | |
| }; | | }; | |
| | | | |
|
| struct LIBODB_EXPORT const_object: odb::exception | | struct LIBODB_EXPORT const_object: exception | |
| { | | { | |
| virtual const char* | | virtual const char* | |
| what () const throw (); | | what () const throw (); | |
| }; | | }; | |
| | | | |
| // Database operations exceptions. | | // Database operations exceptions. | |
| // | | // | |
|
| struct LIBODB_EXPORT deadlock: odb::exception | | struct LIBODB_EXPORT recoverable: exception | |
| | | { | |
| | | }; | |
| | | | |
| | | struct LIBODB_EXPORT connection_lost: recoverable | |
| { | | { | |
| virtual const char* | | virtual const char* | |
| what () const throw (); | | what () const throw (); | |
| }; | | }; | |
| | | | |
|
| struct LIBODB_EXPORT object_not_persistent: odb::exception | | struct LIBODB_EXPORT timeout: recoverable | |
| { | | { | |
| virtual const char* | | virtual const char* | |
| what () const throw (); | | what () const throw (); | |
| }; | | }; | |
| | | | |
|
| struct LIBODB_EXPORT object_already_persistent: odb::exception | | struct LIBODB_EXPORT deadlock: recoverable | |
| { | | { | |
| virtual const char* | | virtual const char* | |
| what () const throw (); | | what () const throw (); | |
| }; | | }; | |
| | | | |
|
| struct LIBODB_EXPORT result_not_cached: odb::exception | | struct LIBODB_EXPORT object_not_persistent: exception | |
| { | | { | |
| virtual const char* | | virtual const char* | |
| what () const throw (); | | what () const throw (); | |
| }; | | }; | |
| | | | |
|
| struct LIBODB_EXPORT database_exception: odb::exception | | struct LIBODB_EXPORT object_already_persistent: exception | |
| { | | { | |
|
| | | virtual const char* | |
| | | what () const throw (); | |
| }; | | }; | |
|
| | | | |
| | | struct LIBODB_EXPORT result_not_cached: exception | |
| | | { | |
| | | virtual const char* | |
| | | what () const throw (); | |
| | | }; | |
| | | | |
| | | struct LIBODB_EXPORT database_exception: exception | |
| | | { | |
| | | }; | |
| | | | |
| | | // Schema catalog exceptions. | |
| | | // | |
| | | struct LIBODB_EXPORT unknown_schema: exception | |
| | | { | |
| | | unknown_schema (const std::string& name); | |
| | | ~unknown_schema () throw (); | |
| | | | |
| | | const std::string& | |
| | | name () const | |
| | | { | |
| | | return name_; | |
| | | } | |
| | | | |
| | | virtual const char* | |
| | | what () const throw (); | |
| | | | |
| | | private: | |
| | | std::string name_; | |
| | | std::string what_; | |
| | | }; | |
| | | | |
| | | 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::recoverable; | |
| | | using odb::deadlock; | |
| | | using odb::connection_lost; | |
| | | using odb::timeout; | |
| | | using odb::object_not_persistent; | |
| | | using odb::object_already_persistent; | |
| | | using odb::result_not_cached; | |
| | | using odb::database_exception; | |
| | | | |
| | | using odb::unknown_schema; | |
| | | } | |
| } | | } | |
| | | | |
| #include <odb/post.hxx> | | #include <odb/post.hxx> | |
| | | | |
| #endif // ODB_EXCEPTIONS_HXX | | #endif // ODB_EXCEPTIONS_HXX | |
| | | | |
End of changes. 15 change blocks. |
| 12 lines changed or deleted | | 75 lines changed or added | |
|
| lazy-ptr.hxx | | lazy-ptr.hxx | |
| | | | |
| skipping to change at line 189 | | skipping to change at line 189 | |
| template <class Y> friend class lazy_auto_ptr; | | template <class Y> friend class lazy_auto_ptr; | |
| | | | |
| // Note that it is possible to have a situation where p_ is NULL, | | // Note that it is possible to have a situation where p_ is NULL, | |
| // i_.id is NULL and i_.db is not NULL. This will happen if the | | // i_.id is NULL and i_.db is not NULL. This will happen if the | |
| // auto_ptr reference returned by load() is transferred to another | | // auto_ptr reference returned by load() is transferred to another | |
| // pointer or reset. | | // pointer or reset. | |
| // | | // | |
| mutable std::auto_ptr<T> p_; | | mutable std::auto_ptr<T> p_; | |
| mutable lazy_ptr_impl<T> i_; | | mutable lazy_ptr_impl<T> i_; | |
| }; | | }; | |
|
| | | | |
| | | namespace core | |
| | | { | |
| | | using odb::lazy_ptr; | |
| | | using odb::lazy_auto_ptr; | |
| | | } | |
| } | | } | |
| | | | |
| #include <odb/lazy-ptr.ixx> | | #include <odb/lazy-ptr.ixx> | |
| #include <odb/lazy-ptr.txx> | | #include <odb/lazy-ptr.txx> | |
| | | | |
| #include <odb/lazy-pointer-traits.hxx> | | #include <odb/lazy-pointer-traits.hxx> | |
| | | | |
| #include <odb/post.hxx> | | #include <odb/post.hxx> | |
| | | | |
| #endif // ODB_LAZY_PTR_HXX | | #endif // ODB_LAZY_PTR_HXX | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 6 lines changed or added | |
|
| version.hxx | | version.hxx | |
| | | | |
| skipping to change at line 30 | | skipping to change at line 30 | |
| // Version AABBCCDD | | // Version AABBCCDD | |
| // 2.0.0 02000000 | | // 2.0.0 02000000 | |
| // 2.1.0 02010000 | | // 2.1.0 02010000 | |
| // 2.1.1 02010100 | | // 2.1.1 02010100 | |
| // 2.2.0.a1 02019901 | | // 2.2.0.a1 02019901 | |
| // 3.0.0.b2 02999952 | | // 3.0.0.b2 02999952 | |
| // | | // | |
| | | | |
| // ODB interface version: minor, major, and alpha/beta versions. | | // ODB interface version: minor, major, and alpha/beta versions. | |
| // | | // | |
|
| #define ODB_VERSION 10100 | | #define ODB_VERSION 10200 | |
| #define ODB_VERSION_STR "1.1" | | #define ODB_VERSION_STR "1.2" | |
| | | | |
| // libodb version: interface version plus the bugfix version. | | // libodb version: interface version plus the bugfix version. | |
| // | | // | |
|
| #define LIBODB_VERSION 1010000 | | #define LIBODB_VERSION 1020000 | |
| #define LIBODB_VERSION_STR "1.1.0" | | #define LIBODB_VERSION_STR "1.2.0" | |
| | | | |
| #include <odb/post.hxx> | | #include <odb/post.hxx> | |
| | | | |
| #endif // ODB_VERSION_HXX | | #endif // ODB_VERSION_HXX | |
| | | | |
End of changes. 2 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|