From 2a0f39b29c1bea6a4497c0f1826052ffa453af9e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 21 Apr 2016 16:05:13 +0200 Subject: Move module implementation from brep/ to mod/ --- mod/mod-repository-root | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 mod/mod-repository-root (limited to 'mod/mod-repository-root') diff --git a/mod/mod-repository-root b/mod/mod-repository-root new file mode 100644 index 0000000..db13b58 --- /dev/null +++ b/mod/mod-repository-root @@ -0,0 +1,60 @@ +// file : mod/mod-repository-root -*- C++ -*- +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef MOD_MOD_REPOSITORY_ROOT +#define MOD_MOD_REPOSITORY_ROOT + +#include +#include + +#include +#include + +namespace brep +{ + class package_search; + class package_details; + class package_version_details; + class repository_details; + + class repository_root: public module + { + public: + repository_root (); + + // 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 options_; + }; +} + +#endif // MOD_MOD_REPOSITORY_ROOT -- cgit v1.1