aboutsummaryrefslogtreecommitdiff
path: root/bdep/project.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'bdep/project.hxx')
-rw-r--r--bdep/project.hxx37
1 files changed, 37 insertions, 0 deletions
diff --git a/bdep/project.hxx b/bdep/project.hxx
index 6a748d5..274455c 100644
--- a/bdep/project.hxx
+++ b/bdep/project.hxx
@@ -5,13 +5,50 @@
#ifndef BDEP_PROJECT_HXX
#define BDEP_PROJECT_HXX
+#include <odb/core.hxx>
+
#include <bdep/types.hxx>
#include <bdep/utility.hxx>
#include <bdep/project-options.hxx>
+#pragma db model version(1, 1, open)
+
+// Prevent assert() macro expansion in get/set expressions. This should appear
+// after all #include directives since the assert() macro is redefined in each
+// <assert.h> inclusion.
+//
+#ifdef ODB_COMPILER
+# undef assert
+# define assert assert
+void assert (int);
+#endif
+
namespace bdep
{
+ #pragma db map type(dir_path) as(string) \
+ to((?).string ()) from(bdep::dir_path (?))
+
+ //@@ TODO: do we need session/shared_ptr?
+
+ #pragma db object pointer(shared_ptr) session
+ class configuration
+ {
+ public:
+
+ dir_path path; // @@ TODO: relative or absolute?
+ string name;
+
+ // Database mapping.
+ //
+ #pragma db member(name) id
+ //#pragma db member(name) index
+
+ private:
+ friend class odb::access;
+ configuration () = default;
+ };
+
// Given project_options (and CWD) locate the packages and their project.
// The result is the absolute and normalized project directory and a vector
// of relative (to the project directory) package directories (which will be