diff options
Diffstat (limited to 'qt/common/containers/change-tracking/test.hxx')
-rw-r--r-- | qt/common/containers/change-tracking/test.hxx | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/qt/common/containers/change-tracking/test.hxx b/qt/common/containers/change-tracking/test.hxx new file mode 100644 index 0000000..7ad230e --- /dev/null +++ b/qt/common/containers/change-tracking/test.hxx @@ -0,0 +1,43 @@ +// file : qt/common/containers/change-tracking/test.hxx +// copyright : Copyright (c) 2009-2012 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef TEST_HXX +#define TEST_HXX + +#include <common/config.hxx> // HAVE_CXX11 + +#include <memory> + +#ifdef HAVE_CXX11 +# include <utility> // std::move +#endif + +#include <QtCore/QString> + +#include <odb/core.hxx> +#include <odb/qt/list.hxx> + +#pragma db object pointer(std::auto_ptr) +struct object +{ + object () {} + object (const QString& id): id_ (id) {} + +#ifdef HAVE_CXX11 + object (const object& x): id_ (x.id_), i (x.i), s (x.s) {} + object (object&& x): id_ (std::move (x.id_)), i (x.i), s (std::move (x.s)) {} +#endif + + #pragma db id + QString id_; + + unsigned int i; + + QOdbList<QString> s; + + inline bool + operator== (const object& o) {return id_ == o.id_ && i == o.i && s == o.s;} +}; + +#endif // TEST_HXX |