From bada6666c70977a058755ccf232e7d67b24adeed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:21:29 +0200 Subject: New upstream release --- xsd/xsd/xsd.hxx | 81 ++++++++------------------------------------------------- 1 file changed, 11 insertions(+), 70 deletions(-) (limited to 'xsd/xsd/xsd.hxx') diff --git a/xsd/xsd/xsd.hxx b/xsd/xsd/xsd.hxx index 508c8da..8b9d6fe 100644 --- a/xsd/xsd/xsd.hxx +++ b/xsd/xsd/xsd.hxx @@ -1,84 +1,25 @@ // file : xsd/xsd.hxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_HXX #define XSD_HXX -#include // Path - -#include -#include -#include - - +#include +#include #include // std::remove -using namespace Cult::Types; - -// -// -typedef Cult::Containers::Set WarningSet; +#include +#include -// -// -typedef Cult::Containers::Vector FileList; - -// -// -struct AutoUnlink -{ - AutoUnlink (XSDFrontend::SemanticGraph::Path const& file) - : file_ (file), canceled_ (false) - { - } - - ~AutoUnlink () - { - if (!canceled_) - { -#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - std::remove (file_.native_file_string ().c_str ()); -#else - std::remove (file_.string ().c_str ()); -#endif - } - } - - void - cancel () - { - canceled_ = true; - } - -private: - XSDFrontend::SemanticGraph::Path file_; - Boolean canceled_; -}; +#include // Path -// -// -struct AutoUnlinks -{ - Void - add (XSDFrontend::SemanticGraph::Path const& file) - { - unlinks_.push_back (Evptr (new AutoUnlink (file))); - } +#include - Void - cancel () - { - for (Unlinks::Iterator i (unlinks_.begin ()); i != unlinks_.end (); ++i) - { - (*i)->cancel (); - } - } +typedef std::set WarningSet; +typedef std::vector FileList; -private: - typedef Cult::Containers::Vector > Unlinks; - Unlinks unlinks_; -}; +typedef cutl::fs::auto_remove AutoUnlink; +typedef cutl::fs::auto_removes AutoUnlinks; #endif // XSD_HXX -- cgit v1.2.3