diff options
Diffstat (limited to 'brep/database')
-rw-r--r-- | brep/database | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/brep/database b/brep/database new file mode 100644 index 0000000..6fdfe0b --- /dev/null +++ b/brep/database @@ -0,0 +1,25 @@ +// file : brep/database -*- C++ -*- +// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BREP_DATABASE +#define BREP_DATABASE + +#include <odb/forward.hxx> // database + +#include <brep/types> + +#include <brep/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 // BREP_DATABASE |