From d584b52e47f02556de07298388d6e957e405e5c5 Mon Sep 17 00:00:00 2001 From: Jeremy Lloyd Conlin Date: Mon, 2 Nov 2020 16:13:01 -0700 Subject: [PATCH] Removing signature command-line option. This addresses issue #125. --- src/njoy21.hpp | 1 - src/njoy21/CommandLine.hpp | 1 - src/njoy21/CommandLine/src/ctor.hpp | 6 ------ src/njoy21/CommandLine/test/CommandLine.test.cpp | 1 - src/njoy21/Driver/Factory/src/setupManager.hpp | 4 ---- src/njoy21/Signature.hpp.in | 6 ------ 6 files changed, 19 deletions(-) delete mode 100644 src/njoy21/Signature.hpp.in diff --git a/src/njoy21.hpp b/src/njoy21.hpp index 33f33d3b..73aff0ed 100644 --- a/src/njoy21.hpp +++ b/src/njoy21.hpp @@ -41,7 +41,6 @@ struct CommandLine; #include "njoy21/interface.hpp" #include "njoy21/legacy.hpp" #include "njoy21/Version.hpp" -#include "njoy21/Signature.hpp" } } diff --git a/src/njoy21/CommandLine.hpp b/src/njoy21/CommandLine.hpp index 8d923e37..7d90b734 100644 --- a/src/njoy21/CommandLine.hpp +++ b/src/njoy21/CommandLine.hpp @@ -16,7 +16,6 @@ struct njoy::njoy21::CommandLine { std::optional< std::string > errorPath; bool legacySwitch; bool verifyOnly; - bool signature; /* methods */ #include "njoy21/CommandLine/src/ctor.hpp" diff --git a/src/njoy21/CommandLine/src/ctor.hpp b/src/njoy21/CommandLine/src/ctor.hpp index cef6d35e..14ca793d 100644 --- a/src/njoy21/CommandLine/src/ctor.hpp +++ b/src/njoy21/CommandLine/src/ctor.hpp @@ -18,11 +18,6 @@ CommandLine( int argc, char* argv[] ){ "path to file where NJOY21 error ought to be directed. (defaults to standard error)", false, std::optional< std::string >(), " error path", cmd ); - TCLAP::SwitchArg - signature( "", "signature", - "Write signature to standard output", - cmd ); - TCLAP::SwitchArg legacySwitch( "L", "legacy", "Call to Fortran routines even if C++ routines are available", cmd ); @@ -43,6 +38,5 @@ CommandLine( int argc, char* argv[] ){ this->errorPath = errorPath.getValue(); this->legacySwitch = legacySwitch.getValue(); this->verifyOnly = verifyOnly.getValue(); - this->signature = signature.getValue(); } diff --git a/src/njoy21/CommandLine/test/CommandLine.test.cpp b/src/njoy21/CommandLine/test/CommandLine.test.cpp index cfe6a8d2..0fbb83d4 100644 --- a/src/njoy21/CommandLine/test/CommandLine.test.cpp +++ b/src/njoy21/CommandLine/test/CommandLine.test.cpp @@ -20,7 +20,6 @@ SCENARIO( "Parsing a command-line interface for options and flags" ){ REQUIRE( not CL.outputPath ); REQUIRE( not CL.legacySwitch ); REQUIRE( not CL.verifyOnly ); - REQUIRE( not CL.signature ); } GIVEN( "An instance of the Commandline with an input path" ){ std::vector< std::string > arguments = { "njoy21", "--input", "/my/path" }; diff --git a/src/njoy21/Driver/Factory/src/setupManager.hpp b/src/njoy21/Driver/Factory/src/setupManager.hpp index e67c2144..205c1d14 100644 --- a/src/njoy21/Driver/Factory/src/setupManager.hpp +++ b/src/njoy21/Driver/Factory/src/setupManager.hpp @@ -1,9 +1,5 @@ static io::Manager setupManager( CommandLine& commandLine ){ io::Manager::Builder builder; - if( commandLine.signature ){ - std::cout << Signature::signature() << std::endl; - std::exit( 0 ); - } if ( commandLine.inputPath ){ builder.input( *(commandLine.inputPath) ); diff --git a/src/njoy21/Signature.hpp.in b/src/njoy21/Signature.hpp.in deleted file mode 100644 index 98dc0e9c..00000000 --- a/src/njoy21/Signature.hpp.in +++ /dev/null @@ -1,6 +0,0 @@ -class Signature{ -public: - static const std::string signature(){ - return R"signature( @SIGNATURE@ )signature"; - } -};