aboutsummaryrefslogtreecommitdiff
path: root/mod/database
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-04-21 16:05:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-04-21 16:05:13 +0200
commit2a0f39b29c1bea6a4497c0f1826052ffa453af9e (patch)
tree283f6bf1569c1b9f00b6e25fe986ccfff8a8629f /mod/database
parentc6b4d6c6489731eedba606d3c85c4319c4478b50 (diff)
Move module implementation from brep/ to mod/
Diffstat (limited to 'mod/database')
-rw-r--r--mod/database26
1 files changed, 26 insertions, 0 deletions
diff --git a/mod/database b/mod/database
new file mode 100644
index 0000000..2730449
--- /dev/null
+++ b/mod/database
@@ -0,0 +1,26 @@
+// file : mod/database -*- C++ -*-
+// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef MOD_DATABASE
+#define MOD_DATABASE
+
+#include <odb/forward.hxx> // database
+
+#include <brep/types>
+#include <brep/utility>
+
+#include <mod/options>
+
+namespace brep
+{
+ // Returns pointer to the shared database instance, creating one on the
+ // first call. On subsequent calls ensures passed host and port equals
+ // to ones of the existing database instance throwing runtime_error
+ // otherwise. Is not thread-safe.
+ //
+ shared_ptr<odb::core::database>
+ shared_database (const options::db&);
+}
+
+#endif // MOD_DATABASE