From 426265b91d4533b7aa16d53124ad9b5d0a6862d6 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Mon, 19 May 2014 22:14:31 +0200 Subject: Implemented external "resolve-include" function * resolves paths provided as strings against include paths provided through the newly created "--include" argument of the test executable * this was implemented to enable central collections of XSLT libraries simmilar to how there are C headers in "/usr/include" --- test.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'test.cc') diff --git a/test.cc b/test.cc index 1262520..a21f25a 100644 --- a/test.cc +++ b/test.cc @@ -3,6 +3,8 @@ #include "boost/program_options.hpp" +#include +#include #include int main(int ac, char** av) { @@ -11,8 +13,9 @@ int main(int ac, char** av) { ); optionDescription.add_options() - ("transformation", boost::program_options::value()->required(), "transformation file") - ("target", boost::program_options::value(), "target file") + ("transformation", boost::program_options::value()->required(), "transformation file") + ("target", boost::program_options::value(), "target file") + ("include", boost::program_options::value>(), "include paths") ; boost::program_options::variables_map variables; @@ -32,7 +35,13 @@ int main(int ac, char** av) { } if ( variables.count("transformation") ) { - InputXSLT::PlattformGuard plattform; + std::vector includePath; + + if ( variables.count("include") ) { + includePath = variables["include"].as>(); + }; + + InputXSLT::PlattformGuard plattform(includePath); InputXSLT::TransformationFacade transformation( variables["transformation"].as() -- cgit v1.2.3