aboutsummaryrefslogtreecommitdiff
path: root/brep/database
blob: d29d4a50a3b113e3723f571dce06ffef69caeed3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// file      : brep/database -*- C++ -*-
// copyright : Copyright (c) 2014-2016 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/utility>

#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