From 8f3d3956b1e837c726859eb8bbe19dad79c54a42 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 29 Apr 2017 23:55:46 +0300 Subject: Add hxx extension for headers and lib prefix for library dirs --- mod/mod-repository-root.hxx | 77 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 mod/mod-repository-root.hxx (limited to 'mod/mod-repository-root.hxx') diff --git a/mod/mod-repository-root.hxx b/mod/mod-repository-root.hxx new file mode 100644 index 0000000..f54fa62 --- /dev/null +++ b/mod/mod-repository-root.hxx @@ -0,0 +1,77 @@ +// file : mod/mod-repository-root.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef MOD_MOD_REPOSITORY_ROOT_HXX +#define MOD_MOD_REPOSITORY_ROOT_HXX + +#include +#include + +#include +#include + +namespace brep +{ + class package_search; + class package_details; + class package_version_details; + class repository_details; + class build_task; + class build_result; + class build_force; + class build_log; + + class repository_root: public module + { + public: + repository_root (); + + // Copy constructible-only type. + // + // Create a shallow copy (handling instance) if initialized and a deep + // copy (context exemplar) otherwise. + // + explicit + repository_root (const repository_root&); + + private: + virtual bool + handle (request&, response&); + + virtual const cli::options& + cli_options () const {return options::repository_root::description ();} + + virtual option_descriptions + options (); + + virtual void + init (const name_values&); + + virtual void + init (cli::scanner&); + + virtual void + version (); + + private: + shared_ptr package_search_; + shared_ptr package_details_; + shared_ptr package_version_details_; + shared_ptr repository_details_; + shared_ptr build_task_; + shared_ptr build_result_; + shared_ptr build_force_; + shared_ptr build_log_; + shared_ptr options_; + + // Sub-module the request is dispatched to. Initially is NULL. It is set + // by the first call to handle() to a deep copy of the selected exemplar. + // The subsequent calls of handle() (that may take place after the retry + // exception is thrown) will use the existing handler instance. + // + unique_ptr handler_; + }; +} + +#endif // MOD_MOD_REPOSITORY_ROOT_HXX -- cgit v1.1