aboutsummaryrefslogtreecommitdiff
path: root/brep/module
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-08-11 20:11:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-08-23 13:50:52 +0200
commit24903813d11813f8ff9ac906d23b21e6c33b981d (patch)
treeb4a7c1cc6dc4c2e7a1588573c86e2b20aa763a41 /brep/module
parenta7e766e1aa77fff846d8426658befd9a01fe2861 (diff)
Parse http request parameters using CLI
Diffstat (limited to 'brep/module')
-rw-r--r--brep/module25
1 files changed, 24 insertions, 1 deletions
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.