diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-09 17:24:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-09 17:24:37 +0200 |
commit | 4661c1a12a491132784ffe5e3d4702d9a9bf6072 (patch) | |
tree | 80df5aa8173720d6f349547406a534f65197ce29 | |
parent | 6bf1e46ccc93777ca9f62746ada0e18c72fcf138 (diff) |
Update to match new libxsd-frontend interface
-rw-r--r-- | xsd/xsd.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/xsd/xsd.cxx b/xsd/xsd.cxx index ef5c2f0..ea7b09d 100644 --- a/xsd/xsd.cxx +++ b/xsd/xsd.cxx @@ -3,6 +3,14 @@ // copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file +#include <vector> +#include <memory> // std::auto_ptr +#include <iostream> + +#include <boost/filesystem/fstream.hpp> + +#include <xercesc/util/PlatformUtils.hpp> + #include <cutl/re.hxx> #include <cult/types.hxx> @@ -33,11 +41,6 @@ #include <processing/cardinality/processor.hxx> #include <processing/inheritance/processor.hxx> -#include <iostream> -#include <boost/filesystem/fstream.hpp> - -#include <xercesc/util/PlatformUtils.hpp> - #include <xsd.hxx> #include <usage.hxx> @@ -50,9 +53,7 @@ typedef Cult::Containers::Vector<NarrowString> NarrowStrings; namespace SemanticGraph = XSDFrontend::SemanticGraph; namespace Transformations = XSDFrontend::Transformations; -using std::wcerr; -using std::wcout; -using std::endl; +using namespace std; namespace CLI { @@ -667,7 +668,7 @@ main (Int argc, Char* argv[]) loc_translator, disabled_w); - Evptr<SemanticGraph::Schema> schema; + auto_ptr<SemanticGraph::Schema> schema; if (cmd == "cxx-tree" || cmd == "cxx-parser") { @@ -868,7 +869,7 @@ main (Int argc, Char* argv[]) loc_translator, disabled_w); - Evptr<SemanticGraph::Schema> schema (parser.parse (paths)); + auto_ptr<SemanticGraph::Schema> schema (parser.parse (paths)); // Morph anonymous types. // @@ -926,7 +927,7 @@ main (Int argc, Char* argv[]) // Rearrange the graph so that each type is in a seperate // schema file. // - typedef Cult::Containers::Vector<SemanticGraph::Schema*> Schemas; + typedef std::vector<SemanticGraph::Schema*> Schemas; SchemaPerTypeTranslator type_translator ( common_ops.value<CLI::type_file_regex> (), @@ -942,7 +943,7 @@ main (Int argc, Char* argv[]) // Generate code. // - for (Schemas::Iterator b (schemas.begin ()), i (b), e (schemas.end ()); + for (Schemas::iterator b (schemas.begin ()), i (b), e (schemas.end ()); i != e; ++i) { SemanticGraph::Schema& s (**i); |