aboutsummaryrefslogtreecommitdiff
path: root/xsd/options-parser.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/options-parser.hxx')
-rw-r--r--xsd/options-parser.hxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/xsd/options-parser.hxx b/xsd/options-parser.hxx
new file mode 100644
index 0000000..9ea1e09
--- /dev/null
+++ b/xsd/options-parser.hxx
@@ -0,0 +1,31 @@
+// file : xsd/options-parser.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef OPTIONS_PARSER_HXX
+#define OPTIONS_PARSER_HXX
+
+#include <cult/types.hxx>
+
+#include <options.hxx>
+
+namespace cli
+{
+ template <>
+ struct parser<Cult::Types::NarrowString>
+ {
+ static void
+ parse (Cult::Types::NarrowString& x, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ x = s.next ();
+ else
+ throw missing_value (o);
+ }
+ };
+}
+
+#endif // OPTIONS_PARSER_HXX