diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-20 11:54:24 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-20 11:55:22 +0200 |
commit | c04f7d6ed04d62efafa79a87bcde6c5f62e95327 (patch) | |
tree | 500cc93aed55b0809fe04e5a0b7020d9045c65c5 /xsd/options-parser.hxx | |
parent | e14a3f91e6e51430bf9c6978f44c7f46114793fb (diff) |
Completion of the CLI port
Diffstat (limited to 'xsd/options-parser.hxx')
-rw-r--r-- | xsd/options-parser.hxx | 31 |
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 |