diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-29 23:55:46 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-30 23:57:17 +0300 |
commit | 8f3d3956b1e837c726859eb8bbe19dad79c54a42 (patch) | |
tree | 81ded52db212b12c7f685165702cce90aa0233cf /mod/database-module | |
parent | ea60a6df471706a0eeb5ff1f774d69abe89e4bc9 (diff) |
Add hxx extension for headers and lib prefix for library dirs
Diffstat (limited to 'mod/database-module')
-rw-r--r-- | mod/database-module | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/mod/database-module b/mod/database-module deleted file mode 100644 index 3799e7b..0000000 --- a/mod/database-module +++ /dev/null @@ -1,73 +0,0 @@ -// file : mod/database-module -*- C++ -*- -// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#ifndef MOD_DATABASE_MODULE -#define MOD_DATABASE_MODULE - -#include <odb/forward.hxx> // database - -#include <brep/types> -#include <brep/utility> - -#include <bbot/build-config> - -#include <mod/module> -#include <mod/options> - -namespace brep -{ - // A module that utilises the database. Specifically, it will retry the - // request in the face of recoverable database failures (deadlock, loss of - // connection, etc) up to a certain number of times. - // - class database_module: public module - { - protected: - database_module () = default; - - // Create a shallow copy (handling instance) if initialized and a deep - // copy (context exemplar) otherwise. - // - explicit - database_module (const database_module&); - - // Required to avoid getting warning from clang that - // database_module::init() hides module::init() virtual functions. This - // way all functions get to the same scope and become overloaded set. - // - using module::init; - - // Initialize the package database instance. Throw odb::exception on - // failure. - // - void - init (const options::package_db&, size_t retry); - - // Initialize the build database instance and parse build configuration - // file. Throw odb::exception on database failure, tab_parsing on parsing - // error, system_error on the underlying OS error. - // - void - init (const options::build&, const options::build_db&, size_t retry); - - virtual bool - handle (request&, response&) = 0; - - protected: - size_t retry_ = 0; // Max of all retries. - - shared_ptr<odb::core::database> package_db_; - - // These are NULL if not building. - // - shared_ptr<odb::core::database> build_db_; - shared_ptr<const bbot::build_configs> build_conf_; - - private: - virtual bool - handle (request&, response&, log&); - }; -} - -#endif // MOD_DATABASE_MODULE |