From 784ac42a0f05608e3d9c5e15246dbf76ce9e3d51 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 1 Jul 2014 20:54:02 +0200 Subject: Removed unnecessary template member methods from TranformationFacade * neither the constructor nor the generate member methods need to be templatized ** only supported "output" argument is now a reference to a "std::basic_ostream" instance ** the caller is responsible for e.g. writing the output to disk * this was done to simplify the basic interface of InputXSLT * removed "default_params" testcase along with default parameter generation ** this feature is neither used nor required --- ixslt.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ixslt.cc') diff --git a/ixslt.cc b/ixslt.cc index b1671b3..abc7e1a 100644 --- a/ixslt.cc +++ b/ixslt.cc @@ -1,5 +1,6 @@ #include "boost/optional.hpp" #include "boost/program_options.hpp" +#include #include #include @@ -117,9 +118,15 @@ bool process(const boost::program_options::variables_map& variables) { try { if ( variables.count("target") ) { - transformation->generate( + boost::filesystem::ofstream file( variables["target"].as() ); + + if ( file.is_open() ) { + transformation->generate(file); + } else { + return false; + } } else { transformation->generate(std::cout); } -- cgit v1.2.3