From c04f7d6ed04d62efafa79a87bcde6c5f62e95327 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Jun 2012 11:54:24 +0200 Subject: Completion of the CLI port --- xsd/cxx/parser/elements.hxx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'xsd/cxx/parser/elements.hxx') diff --git a/xsd/cxx/parser/elements.hxx b/xsd/cxx/parser/elements.hxx index d8cedd8..8b57b61 100644 --- a/xsd/cxx/parser/elements.hxx +++ b/xsd/cxx/parser/elements.hxx @@ -10,9 +10,11 @@ #include +#include + #include -#include +#include namespace CXX { @@ -35,11 +37,13 @@ namespace CXX public: typedef cutl::re::regexsub Regex; + typedef Parser::options options_type; + public: Context (std::wostream&, SemanticGraph::Schema&, SemanticGraph::Path const& path, - CLI::Options const&, + options_type const&, StringLiteralMap const*, Regex const* hxx_expr, Regex const* ixx_expr, @@ -97,7 +101,7 @@ namespace CXX eimpl (SemanticGraph::Type&); public: - CLI::Options const& options; + options_type const& options; String& xml_parser; String& simple_base; String& complex_base; @@ -278,7 +282,9 @@ namespace CXX // struct RootElement: Traversal::Element { - RootElement (CLI::Options const& options, + typedef Parser::options options_type; + + RootElement (options_type const& options, SemanticGraph::Element*& element) : options_ (options), element_ (element) { @@ -287,12 +293,12 @@ namespace CXX virtual Void traverse (Type& e) { - if (options_.value ()) + if (options_.root_element_first ()) { if (element_ == 0) element_ = &e; } - else if (String name = options_.value ()) + else if (String name = options_.root_element ()) { if (e.name () == name) element_ = &e; @@ -302,7 +308,7 @@ namespace CXX } private: - CLI::Options const& options_; + options_type const& options_; SemanticGraph::Element*& element_; }; } -- cgit v1.1