From 24903813d11813f8ff9ac906d23b21e6c33b981d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 11 Aug 2015 20:11:47 +0200 Subject: Parse http request parameters using CLI --- brep/module | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'brep/module') diff --git a/brep/module b/brep/module index e38d60d..08fbfea 100644 --- a/brep/module +++ b/brep/module @@ -92,6 +92,29 @@ namespace brep module (); module (const module& ); + class param_scanner: public cli::scanner + { + public: + param_scanner (const name_values&) noexcept; + + virtual bool + more (); + + virtual const char* + peek (); + + virtual const char* + next (); + + virtual void + skip (); + + private: + const name_values& name_values_; + name_values::const_iterator i_; + bool name_; + }; + private: virtual void handle (request&, response&, log&); @@ -110,7 +133,7 @@ namespace brep { // Just scan options to ensure there is no misspelled ones. // - module_options o (s, cli::unknown_mode::fail, cli::unknown_mode::fail); + options::module o (s, cli::unknown_mode::fail, cli::unknown_mode::fail); } // Diagnostics implementation details. -- cgit v1.1