aboutsummaryrefslogtreecommitdiff
path: root/xsd
diff options
context:
space:
mode:
Diffstat (limited to 'xsd')
-rw-r--r--xsd/cxx/tree/generator.cxx7
-rw-r--r--xsd/xsd.hxx17
2 files changed, 12 insertions, 12 deletions
diff --git a/xsd/cxx/tree/generator.cxx b/xsd/cxx/tree/generator.cxx
index 4c368b8..4eb4de2 100644
--- a/xsd/cxx/tree/generator.cxx
+++ b/xsd/cxx/tree/generator.cxx
@@ -8,6 +8,7 @@
#include <boost/filesystem/fstream.hpp>
#include <cutl/re.hxx>
+#include <cutl/shared-ptr.hxx>
#include <cult/containers/set.hxx>
#include <cult/containers/vector.hxx>
@@ -202,7 +203,7 @@ namespace CXX
using Cult::Containers::Vector;
typedef Vector<Path> Paths;
- typedef Vector<Evptr<WideOutputFileStream> > WideOutputFileStreams;
+ typedef Vector<shared_ptr<WideOutputFileStream> > WideOutputFileStreams;
try
{
@@ -495,8 +496,8 @@ namespace CXX
for (Paths::Iterator i (cxx_paths.begin ());
i != cxx_paths.end (); ++i)
{
- Evptr<WideOutputFileStream> s (
- new WideOutputFileStream (*i, ios_base::out));
+ shared_ptr<WideOutputFileStream> s (
+ new (shared) WideOutputFileStream (*i, ios_base::out));
if (!s->is_open ())
{
diff --git a/xsd/xsd.hxx b/xsd/xsd.hxx
index 80d5894..1af00a0 100644
--- a/xsd/xsd.hxx
+++ b/xsd/xsd.hxx
@@ -6,15 +6,16 @@
#ifndef XSD_HXX
#define XSD_HXX
+#include <cstdio> // std::remove
+
+#include <cutl/shared-ptr.hxx>
+
#include <xsd-frontend/semantic-graph/elements.hxx> // Path
#include <cult/types.hxx>
#include <cult/containers/set.hxx>
#include <cult/containers/vector.hxx>
-
-#include <cstdio> // std::remove
-
using namespace Cult::Types;
//
@@ -37,9 +38,7 @@ struct AutoUnlink
~AutoUnlink ()
{
if (!canceled_)
- {
std::remove (file_.native_file_string ().c_str ());
- }
}
void
@@ -60,20 +59,20 @@ struct AutoUnlinks
Void
add (XSDFrontend::SemanticGraph::Path const& file)
{
- unlinks_.push_back (Evptr<AutoUnlink> (new AutoUnlink (file)));
+ unlinks_.push_back(
+ cutl::shared_ptr<AutoUnlink> (
+ new (shared) AutoUnlink (file)));
}
Void
cancel ()
{
for (Unlinks::Iterator i (unlinks_.begin ()); i != unlinks_.end (); ++i)
- {
(*i)->cancel ();
- }
}
private:
- typedef Cult::Containers::Vector<Evptr<AutoUnlink> > Unlinks;
+ typedef Cult::Containers::Vector<cutl::shared_ptr<AutoUnlink> > Unlinks;
Unlinks unlinks_;
};