From c232046e2308086376556afead1ebd4fdfc73082 Mon Sep 17 00:00:00 2001 From: lltcggie Date: Sun, 14 May 2017 20:13:24 +0900 Subject: [PATCH] =?UTF-8?q?tclapw=E3=81=AE=E5=90=8D=E5=89=8D=E7=A9=BA?= =?UTF-8?q?=E9=96=93=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/tclapw/Arg.h | 36 +++++++------- include/tclapw/ArgException.h | 8 +-- include/tclapw/ArgTraits.h | 6 +-- include/tclapw/CmdLine.h | 8 +-- include/tclapw/CmdLineInterface.h | 6 +-- include/tclapw/CmdLineOutput.h | 8 +-- include/tclapw/Constraint.h | 8 +-- include/tclapw/DocBookOutput.h | 8 +-- include/tclapw/HelpVisitor.h | 6 +-- include/tclapw/IgnoreRestVisitor.h | 6 +-- include/tclapw/MultiArg.h | 8 +-- include/tclapw/MultiSwitchArg.h | 8 +-- include/tclapw/OptionalUnlabeledTracker.h | 8 +-- include/tclapw/StandardTraits.h | 10 ++-- include/tclapw/StdOutput.h | 8 +-- include/tclapw/SwitchArg.h | 8 +-- include/tclapw/UnlabeledMultiArg.h | 6 +-- include/tclapw/UnlabeledValueArg.h | 6 +-- include/tclapw/ValueArg.h | 8 +-- include/tclapw/ValuesConstraint.h | 8 +-- include/tclapw/VersionVisitor.h | 6 +-- include/tclapw/Visitor.h | 6 +-- include/tclapw/XorHandler.h | 8 +-- include/tclapw/ZshCompletionOutput.h | 8 +-- waifu2x-caffe-gui/MainDialog.cpp | 60 +++++++++++------------ 25 files changed, 133 insertions(+), 133 deletions(-) diff --git a/include/tclapw/Arg.h b/include/tclapw/Arg.h index 5779c89..1eb7991 100644 --- a/include/tclapw/Arg.h +++ b/include/tclapw/Arg.h @@ -22,8 +22,8 @@ *****************************************************************************/ -#ifndef TCLAP_ARGUMENT_H -#define TCLAP_ARGUMENT_H +#ifndef TCLAPW_ARGUMENT_H +#define TCLAPW_ARGUMENT_H #ifdef HAVE_CONFIG_H #include @@ -54,7 +54,7 @@ typedef std::istrstream istringstream; #include #include -namespace TCLAP { +namespace TCLAPW { /** * A virtual base class that defines the essential data for all arguments. @@ -223,31 +223,31 @@ class Arg /** * The wchar_t that indicates the beginning of a flag. Defaults to L'-', but - * clients can define TCLAP_FLAGSTARTCHAR to override. + * clients can define TCLAPW_FLAGSTARTCHAR to override. */ -#ifndef TCLAP_FLAGSTARTCHAR -#define TCLAP_FLAGSTARTCHAR L'-' +#ifndef TCLAPW_FLAGSTARTCHAR +#define TCLAPW_FLAGSTARTCHAR L'-' #endif - static wchar_t flagStartChar() { return TCLAP_FLAGSTARTCHAR; } + static wchar_t flagStartChar() { return TCLAPW_FLAGSTARTCHAR; } /** * The sting that indicates the beginning of a flag. Defaults to L"-", but - * clients can define TCLAP_FLAGSTARTSTRING to override. Should be the same - * as TCLAP_FLAGSTARTCHAR. + * clients can define TCLAPW_FLAGSTARTSTRING to override. Should be the same + * as TCLAPW_FLAGSTARTCHAR. */ -#ifndef TCLAP_FLAGSTARTSTRING -#define TCLAP_FLAGSTARTSTRING L"-" +#ifndef TCLAPW_FLAGSTARTSTRING +#define TCLAPW_FLAGSTARTSTRING L"-" #endif - static const std::wstring flagStartString() { return TCLAP_FLAGSTARTSTRING; } + static const std::wstring flagStartString() { return TCLAPW_FLAGSTARTSTRING; } /** * The sting that indicates the beginning of a name. Defaults to L"--", but - * clients can define TCLAP_NAMESTARTSTRING to override. + * clients can define TCLAPW_NAMESTARTSTRING to override. */ -#ifndef TCLAP_NAMESTARTSTRING -#define TCLAP_NAMESTARTSTRING L"--" +#ifndef TCLAPW_NAMESTARTSTRING +#define TCLAPW_NAMESTARTSTRING L"--" #endif - static const std::wstring nameStartString() { return TCLAP_NAMESTARTSTRING; } + static const std::wstring nameStartString() { return TCLAPW_NAMESTARTSTRING; } /** * The name used to identify the ignore rest argument. @@ -425,7 +425,7 @@ ExtractValue(T &destVal, const std::wstring& strVal, ValueLike vl) int valuesRead = 0; while ( is.good() ) { if ( is.peek() != EOF ) -#ifdef TCLAP_SETBASE_ZERO +#ifdef TCLAPW_SETBASE_ZERO is >> std::setbase(0) >> destVal; #else is >> destVal; @@ -691,7 +691,7 @@ inline void Arg::reset() //END Arg.cpp ////////////////////////////////////////////////////////////////////// -} //namespace TCLAP +} //namespace TCLAPW #endif diff --git a/include/tclapw/ArgException.h b/include/tclapw/ArgException.h index 5dd63c0..fd4fb2b 100644 --- a/include/tclapw/ArgException.h +++ b/include/tclapw/ArgException.h @@ -21,13 +21,13 @@ *****************************************************************************/ -#ifndef TCLAP_ARG_EXCEPTION_H -#define TCLAP_ARG_EXCEPTION_H +#ifndef TCLAPW_ARG_EXCEPTION_H +#define TCLAPW_ARG_EXCEPTION_H #include #include -namespace TCLAP { +namespace TCLAPW { /** * A simple class that defines and argument exception. Should be caught @@ -197,7 +197,7 @@ private: int _estat; }; -} // namespace TCLAP +} // namespace TCLAPW #endif diff --git a/include/tclapw/ArgTraits.h b/include/tclapw/ArgTraits.h index 8b2b0df..38ec66f 100644 --- a/include/tclapw/ArgTraits.h +++ b/include/tclapw/ArgTraits.h @@ -23,10 +23,10 @@ // This is an internal tclapw file, you should probably not have to // include this directly -#ifndef TCLAP_ARGTRAITS_H -#define TCLAP_ARGTRAITS_H +#ifndef TCLAPW_ARGTRAITS_H +#define TCLAPW_ARGTRAITS_H -namespace TCLAP { +namespace TCLAPW { // We use two empty structs to get compile type specialization // function to work diff --git a/include/tclapw/CmdLine.h b/include/tclapw/CmdLine.h index 6a1e7ae..54bbbcd 100644 --- a/include/tclapw/CmdLine.h +++ b/include/tclapw/CmdLine.h @@ -21,8 +21,8 @@ * *****************************************************************************/ -#ifndef TCLAP_CMDLINE_H -#define TCLAP_CMDLINE_H +#ifndef TCLAPW_CMDLINE_H +#define TCLAPW_CMDLINE_H #include #include @@ -48,7 +48,7 @@ #include #include // Needed for exit(), which isnL't defined in some envs. -namespace TCLAP { +namespace TCLAPW { template void DelPtr(T ptr) { @@ -629,5 +629,5 @@ inline void CmdLine::reset() -} //namespace TCLAP +} //namespace TCLAPW #endif diff --git a/include/tclapw/CmdLineInterface.h b/include/tclapw/CmdLineInterface.h index f0afc5c..2004570 100644 --- a/include/tclapw/CmdLineInterface.h +++ b/include/tclapw/CmdLineInterface.h @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef TCLAP_COMMANDLINE_INTERFACE_H -#define TCLAP_COMMANDLINE_INTERFACE_H +#ifndef TCLAPW_COMMANDLINE_INTERFACE_H +#define TCLAPW_COMMANDLINE_INTERFACE_H #include #include @@ -30,7 +30,7 @@ #include -namespace TCLAP { +namespace TCLAPW { class Arg; class CmdLineOutput; diff --git a/include/tclapw/CmdLineOutput.h b/include/tclapw/CmdLineOutput.h index 71ee5a3..a2adb90 100644 --- a/include/tclapw/CmdLineOutput.h +++ b/include/tclapw/CmdLineOutput.h @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef TCLAP_CMDLINEOUTPUT_H -#define TCLAP_CMDLINEOUTPUT_H +#ifndef TCLAPW_CMDLINEOUTPUT_H +#define TCLAPW_CMDLINEOUTPUT_H #include #include @@ -30,7 +30,7 @@ #include #include -namespace TCLAP { +namespace TCLAPW { class CmdLineInterface; class ArgException; @@ -70,5 +70,5 @@ class CmdLineOutput }; -} //namespace TCLAP +} //namespace TCLAPW #endif diff --git a/include/tclapw/Constraint.h b/include/tclapw/Constraint.h index 4639ea7..1256bf8 100644 --- a/include/tclapw/Constraint.h +++ b/include/tclapw/Constraint.h @@ -19,8 +19,8 @@ * *****************************************************************************/ -#ifndef TCLAP_CONSTRAINT_H -#define TCLAP_CONSTRAINT_H +#ifndef TCLAPW_CONSTRAINT_H +#define TCLAPW_CONSTRAINT_H #include #include @@ -29,7 +29,7 @@ #include #include -namespace TCLAP { +namespace TCLAPW { /** * The interface that defines the interaction between the Arg and Constraint. @@ -64,5 +64,5 @@ class Constraint virtual ~Constraint() { ; } }; -} //namespace TCLAP +} //namespace TCLAPW #endif diff --git a/include/tclapw/DocBookOutput.h b/include/tclapw/DocBookOutput.h index f96d83d..3ac0601 100644 --- a/include/tclapw/DocBookOutput.h +++ b/include/tclapw/DocBookOutput.h @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef TCLAP_DOCBOOKOUTPUT_H -#define TCLAP_DOCBOOKOUTPUT_H +#ifndef TCLAPW_DOCBOOKOUTPUT_H +#define TCLAPW_DOCBOOKOUTPUT_H #include #include @@ -34,7 +34,7 @@ #include #include -namespace TCLAP { +namespace TCLAPW { /** * A class that generates DocBook output for usage() method for the @@ -295,5 +295,5 @@ inline void DocBookOutput::printLongArg(Arg* a) std::cout << L"" << std::endl; } -} //namespace TCLAP +} //namespace TCLAPW #endif diff --git a/include/tclapw/HelpVisitor.h b/include/tclapw/HelpVisitor.h index 3af2f64..36b2a7b 100644 --- a/include/tclapw/HelpVisitor.h +++ b/include/tclapw/HelpVisitor.h @@ -19,14 +19,14 @@ * *****************************************************************************/ -#ifndef TCLAP_HELP_VISITOR_H -#define TCLAP_HELP_VISITOR_H +#ifndef TCLAPW_HELP_VISITOR_H +#define TCLAPW_HELP_VISITOR_H #include #include #include -namespace TCLAP { +namespace TCLAPW { /** * A Visitor object that calls the usage method of the given CmdLineOutput diff --git a/include/tclapw/IgnoreRestVisitor.h b/include/tclapw/IgnoreRestVisitor.h index 12aa166..c935e05 100644 --- a/include/tclapw/IgnoreRestVisitor.h +++ b/include/tclapw/IgnoreRestVisitor.h @@ -20,13 +20,13 @@ *****************************************************************************/ -#ifndef TCLAP_IGNORE_REST_VISITOR_H -#define TCLAP_IGNORE_REST_VISITOR_H +#ifndef TCLAPW_IGNORE_REST_VISITOR_H +#define TCLAPW_IGNORE_REST_VISITOR_H #include #include -namespace TCLAP { +namespace TCLAPW { /** * A Vistor that tells the CmdLine to begin ignoring arguments after diff --git a/include/tclapw/MultiArg.h b/include/tclapw/MultiArg.h index fa5c192..7b4a97c 100644 --- a/include/tclapw/MultiArg.h +++ b/include/tclapw/MultiArg.h @@ -20,8 +20,8 @@ *****************************************************************************/ -#ifndef TCLAP_MULTIPLE_ARGUMENT_H -#define TCLAP_MULTIPLE_ARGUMENT_H +#ifndef TCLAPW_MULTIPLE_ARGUMENT_H +#define TCLAPW_MULTIPLE_ARGUMENT_H #include #include @@ -29,7 +29,7 @@ #include #include -namespace TCLAP { +namespace TCLAPW { /** * An argument that allows multiple values of type T to be specified. Very * similar to a ValueArg, except a vector of values will be returned @@ -428,6 +428,6 @@ void MultiArg::reset() _values.clear(); } -} // namespace TCLAP +} // namespace TCLAPW #endif diff --git a/include/tclapw/MultiSwitchArg.h b/include/tclapw/MultiSwitchArg.h index 1d80321..04ac892 100644 --- a/include/tclapw/MultiSwitchArg.h +++ b/include/tclapw/MultiSwitchArg.h @@ -22,15 +22,15 @@ *****************************************************************************/ -#ifndef TCLAP_MULTI_SWITCH_ARG_H -#define TCLAP_MULTI_SWITCH_ARG_H +#ifndef TCLAPW_MULTI_SWITCH_ARG_H +#define TCLAPW_MULTI_SWITCH_ARG_H #include #include #include -namespace TCLAP { +namespace TCLAPW { /** * A multiple switch argument. If the switch is set on the command line, then @@ -211,6 +211,6 @@ MultiSwitchArg::reset() //END MultiSwitchArg.cpp ////////////////////////////////////////////////////////////////////// -} //namespace TCLAP +} //namespace TCLAPW #endif diff --git a/include/tclapw/OptionalUnlabeledTracker.h b/include/tclapw/OptionalUnlabeledTracker.h index 85bbaa1..04d95f6 100644 --- a/include/tclapw/OptionalUnlabeledTracker.h +++ b/include/tclapw/OptionalUnlabeledTracker.h @@ -21,12 +21,12 @@ *****************************************************************************/ -#ifndef TCLAP_OPTIONAL_UNLABELED_TRACKER_H -#define TCLAP_OPTIONAL_UNLABELED_TRACKER_H +#ifndef TCLAPW_OPTIONAL_UNLABELED_TRACKER_H +#define TCLAPW_OPTIONAL_UNLABELED_TRACKER_H #include -namespace TCLAP { +namespace TCLAPW { class OptionalUnlabeledTracker { @@ -57,6 +57,6 @@ inline void OptionalUnlabeledTracker::check( bool req, const std::wstring& argNa } -} // namespace TCLAP +} // namespace TCLAPW #endif diff --git a/include/tclapw/StandardTraits.h b/include/tclapw/StandardTraits.h index 63ec34b..56293c2 100644 --- a/include/tclapw/StandardTraits.h +++ b/include/tclapw/StandardTraits.h @@ -23,8 +23,8 @@ // This is an internal tclapw file, you should probably not have to // include this directly -#ifndef TCLAP_STANDARD_TRAITS_H -#define TCLAP_STANDARD_TRAITS_H +#ifndef TCLAPW_STANDARD_TRAITS_H +#define TCLAPW_STANDARD_TRAITS_H #ifdef HAVE_CONFIG_H #include // To check for long long @@ -35,11 +35,11 @@ // creating ArgTraits twice for unsigned short. Thus... #ifdef _MSC_VER #ifndef _NATIVE_WCHAR_T_DEFINED -#define TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS +#define TCLAPW_DONT_DECLARE_WCHAR_T_ARGTRAITS #endif #endif -namespace TCLAP { +namespace TCLAPW { // ====================================================================== // Integer types @@ -181,7 +181,7 @@ struct ArgTraits { /** * wchar_ts have value-like semantics. */ -#ifndef TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS +#ifndef TCLAPW_DONT_DECLARE_WCHAR_T_ARGTRAITS template<> struct ArgTraits { typedef ValueLike ValueCategory; diff --git a/include/tclapw/StdOutput.h b/include/tclapw/StdOutput.h index 1d7b8f2..447bdc8 100644 --- a/include/tclapw/StdOutput.h +++ b/include/tclapw/StdOutput.h @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef TCLAP_STDCMDLINEOUTPUT_H -#define TCLAP_STDCMDLINEOUTPUT_H +#ifndef TCLAPW_STDCMDLINEOUTPUT_H +#define TCLAPW_STDCMDLINEOUTPUT_H #include #include @@ -34,7 +34,7 @@ #include #include -namespace TCLAP { +namespace TCLAPW { /** * A class that isolates any output from the CmdLine object so that it @@ -294,5 +294,5 @@ inline void StdOutput::spacePrint( std::wostream& os, } } -} //namespace TCLAP +} //namespace TCLAPW #endif diff --git a/include/tclapw/SwitchArg.h b/include/tclapw/SwitchArg.h index 4e6234d..2d836c8 100644 --- a/include/tclapw/SwitchArg.h +++ b/include/tclapw/SwitchArg.h @@ -21,15 +21,15 @@ *****************************************************************************/ -#ifndef TCLAP_SWITCH_ARG_H -#define TCLAP_SWITCH_ARG_H +#ifndef TCLAPW_SWITCH_ARG_H +#define TCLAPW_SWITCH_ARG_H #include #include #include -namespace TCLAP { +namespace TCLAPW { /** * A simple switch argument. If the switch is set on the command line, then @@ -261,6 +261,6 @@ inline void SwitchArg::reset() //End SwitchArg.cpp ////////////////////////////////////////////////////////////////////// -} //namespace TCLAP +} //namespace TCLAPW #endif diff --git a/include/tclapw/UnlabeledMultiArg.h b/include/tclapw/UnlabeledMultiArg.h index e231419..4add35b 100644 --- a/include/tclapw/UnlabeledMultiArg.h +++ b/include/tclapw/UnlabeledMultiArg.h @@ -20,8 +20,8 @@ *****************************************************************************/ -#ifndef TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H -#define TCLAP_MULTIPLE_UNLABELED_ARGUMENT_H +#ifndef TCLAPW_MULTIPLE_UNLABELED_ARGUMENT_H +#define TCLAPW_MULTIPLE_UNLABELED_ARGUMENT_H #include #include @@ -29,7 +29,7 @@ #include #include -namespace TCLAP { +namespace TCLAPW { /** * Just like a MultiArg, except that the arguments are unlabeled. Basically, diff --git a/include/tclapw/UnlabeledValueArg.h b/include/tclapw/UnlabeledValueArg.h index a8344ff..6b8a17e 100644 --- a/include/tclapw/UnlabeledValueArg.h +++ b/include/tclapw/UnlabeledValueArg.h @@ -21,8 +21,8 @@ *****************************************************************************/ -#ifndef TCLAP_UNLABELED_VALUE_ARGUMENT_H -#define TCLAP_UNLABELED_VALUE_ARGUMENT_H +#ifndef TCLAPW_UNLABELED_VALUE_ARGUMENT_H +#define TCLAPW_UNLABELED_VALUE_ARGUMENT_H #include #include @@ -31,7 +31,7 @@ #include -namespace TCLAP { +namespace TCLAPW { /** * The basic unlabeled argument that parses a value. diff --git a/include/tclapw/ValueArg.h b/include/tclapw/ValueArg.h index a34eacc..edfbbdb 100644 --- a/include/tclapw/ValueArg.h +++ b/include/tclapw/ValueArg.h @@ -20,8 +20,8 @@ *****************************************************************************/ -#ifndef TCLAP_VALUE_ARGUMENT_H -#define TCLAP_VALUE_ARGUMENT_H +#ifndef TCLAPW_VALUE_ARGUMENT_H +#define TCLAPW_VALUE_ARGUMENT_H #include #include @@ -29,7 +29,7 @@ #include #include -namespace TCLAP { +namespace TCLAPW { /** * The basic labeled argument that parses a value. @@ -420,6 +420,6 @@ void ValueArg::reset() _value = _default; } -} // namespace TCLAP +} // namespace TCLAPW #endif diff --git a/include/tclapw/ValuesConstraint.h b/include/tclapw/ValuesConstraint.h index 7723309..42e9086 100644 --- a/include/tclapw/ValuesConstraint.h +++ b/include/tclapw/ValuesConstraint.h @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef TCLAP_VALUESCONSTRAINT_H -#define TCLAP_VALUESCONSTRAINT_H +#ifndef TCLAPW_VALUESCONSTRAINT_H +#define TCLAPW_VALUESCONSTRAINT_H #include #include @@ -41,7 +41,7 @@ #error L"Need a stringstream (sstream or strstream) to compile!" #endif -namespace TCLAP { +namespace TCLAPW { /** * A Constraint that constrains the Arg to only those values specified @@ -143,6 +143,6 @@ std::wstring ValuesConstraint::description() const } -} //namespace TCLAP +} //namespace TCLAPW #endif diff --git a/include/tclapw/VersionVisitor.h b/include/tclapw/VersionVisitor.h index 73547ae..852d54c 100644 --- a/include/tclapw/VersionVisitor.h +++ b/include/tclapw/VersionVisitor.h @@ -21,14 +21,14 @@ *****************************************************************************/ -#ifndef TCLAP_VERSION_VISITOR_H -#define TCLAP_VERSION_VISITOR_H +#ifndef TCLAPW_VERSION_VISITOR_H +#define TCLAPW_VERSION_VISITOR_H #include #include #include -namespace TCLAP { +namespace TCLAPW { /** * A Vistor that will call the version method of the given CmdLineOutput diff --git a/include/tclapw/Visitor.h b/include/tclapw/Visitor.h index 38ddcbd..4b4c365 100644 --- a/include/tclapw/Visitor.h +++ b/include/tclapw/Visitor.h @@ -20,10 +20,10 @@ *****************************************************************************/ -#ifndef TCLAP_VISITOR_H -#define TCLAP_VISITOR_H +#ifndef TCLAPW_VISITOR_H +#define TCLAPW_VISITOR_H -namespace TCLAP { +namespace TCLAPW { /** * A base class that defines the interface for visitors. diff --git a/include/tclapw/XorHandler.h b/include/tclapw/XorHandler.h index b425697..c37f139 100644 --- a/include/tclapw/XorHandler.h +++ b/include/tclapw/XorHandler.h @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef TCLAP_XORHANDLER_H -#define TCLAP_XORHANDLER_H +#ifndef TCLAPW_XORHANDLER_H +#define TCLAPW_XORHANDLER_H #include #include @@ -29,7 +29,7 @@ #include #include -namespace TCLAP { +namespace TCLAPW { /** * This class handles lists of ArgL's that are to be XOR'd on the command @@ -161,6 +161,6 @@ inline std::vector< std::vector >& XorHandler::getXorList() //END XOR.cpp ////////////////////////////////////////////////////////////////////// -} //namespace TCLAP +} //namespace TCLAPW #endif diff --git a/include/tclapw/ZshCompletionOutput.h b/include/tclapw/ZshCompletionOutput.h index 2046796..5e5bba2 100644 --- a/include/tclapw/ZshCompletionOutput.h +++ b/include/tclapw/ZshCompletionOutput.h @@ -20,8 +20,8 @@ * *****************************************************************************/ -#ifndef TCLAP_ZSHCOMPLETIONOUTPUT_H -#define TCLAP_ZSHCOMPLETIONOUTPUT_H +#ifndef TCLAPW_ZSHCOMPLETIONOUTPUT_H +#define TCLAPW_ZSHCOMPLETIONOUTPUT_H #include #include @@ -34,7 +34,7 @@ #include #include -namespace TCLAP { +namespace TCLAPW { /** * A class that generates a Zsh completion function as output from the usage() @@ -319,5 +319,5 @@ inline std::wstring ZshCompletionOutput::getMutexList( CmdLineInterface& _cmd, A return list.str(); } -} //namespace TCLAP +} //namespace TCLAPW #endif diff --git a/waifu2x-caffe-gui/MainDialog.cpp b/waifu2x-caffe-gui/MainDialog.cpp index aac1865..7104896 100644 --- a/waifu2x-caffe-gui/MainDialog.cpp +++ b/waifu2x-caffe-gui/MainDialog.cpp @@ -2095,22 +2095,22 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData) if (nArgs > 1) { // definition of command line arguments - TCLAP::CmdLine cmd(L"waifu2x reimplementation using Caffe", L' ', L"1.0.0"); + TCLAPW::CmdLine cmd(L"waifu2x reimplementation using Caffe", L' ', L"1.0.0"); // GUIでは-iを付けない - TCLAP::UnlabeledMultiArg cmdInputFile(L"input_file_paths", L"input file paths", false, + TCLAPW::UnlabeledMultiArg cmdInputFile(L"input_file_paths", L"input file paths", false, L"string", cmd); // GUIでは出力先フォルダのみの指定 - TCLAP::ValueArg cmdOutputDir(L"o", L"output_folder", + TCLAPW::ValueArg cmdOutputDir(L"o", L"output_folder", L"path to output image folder", false, L"", L"string", cmd); - TCLAP::ValueArg cmdInputFileExt(L"l", L"input_extention_list", + TCLAPW::ValueArg cmdInputFileExt(L"l", L"input_extention_list", L"extention to input image file when input_path is folder", false, L"png:jpg:jpeg:tif:tiff:bmp:tga", L"string", cmd); - TCLAP::ValueArg cmdOutputFileExt(L"e", L"output_extention", + TCLAPW::ValueArg cmdOutputFileExt(L"e", L"output_extention", L"extention to output image file when output_path is (auto) or input_path is folder", false, L"png", L"string", cmd); @@ -2119,8 +2119,8 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData) cmdModeConstraintV.push_back(L"scale"); cmdModeConstraintV.push_back(L"noise_scale"); cmdModeConstraintV.push_back(L"auto_scale"); - TCLAP::ValuesConstraint cmdModeConstraint(cmdModeConstraintV); - TCLAP::ValueArg cmdMode(L"m", L"mode", L"image processing mode", + TCLAPW::ValuesConstraint cmdModeConstraint(cmdModeConstraintV); + TCLAPW::ValueArg cmdMode(L"m", L"mode", L"image processing mode", false, L"noise_scale", &cmdModeConstraint, cmd); std::vector cmdNRLConstraintV; @@ -2128,43 +2128,43 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData) cmdNRLConstraintV.push_back(1); cmdNRLConstraintV.push_back(2); cmdNRLConstraintV.push_back(3); - TCLAP::ValuesConstraint cmdNRLConstraint(cmdNRLConstraintV); - TCLAP::ValueArg cmdNRLevel(L"n", L"noise_level", L"noise reduction level", + TCLAPW::ValuesConstraint cmdNRLConstraint(cmdNRLConstraintV); + TCLAPW::ValueArg cmdNRLevel(L"n", L"noise_level", L"noise reduction level", false, 0, &cmdNRLConstraint, cmd); - TCLAP::ValueArg cmdScaleRatio(L"s", L"scale_ratio", + TCLAPW::ValueArg cmdScaleRatio(L"s", L"scale_ratio", L"custom scale ratio", false, 2.0, L"double", cmd); - TCLAP::ValueArg cmdScaleWidth(L"w", L"scale_width", + TCLAPW::ValueArg cmdScaleWidth(L"w", L"scale_width", L"custom scale width", false, 0, L"double", cmd); - TCLAP::ValueArg cmdScaleHeight(L"h", L"scale_height", + TCLAPW::ValueArg cmdScaleHeight(L"h", L"scale_height", L"custom scale height", false, 0, L"double", cmd); std::vector cmdProcessConstraintV; cmdProcessConstraintV.push_back(L"cpu"); cmdProcessConstraintV.push_back(L"gpu"); - TCLAP::ValuesConstraint cmdProcessConstraint(cmdProcessConstraintV); - TCLAP::ValueArg cmdProcess(L"p", L"process", L"process mode", + TCLAPW::ValuesConstraint cmdProcessConstraint(cmdProcessConstraintV); + TCLAPW::ValueArg cmdProcess(L"p", L"process", L"process mode", false, L"gpu", &cmdProcessConstraint, cmd); - TCLAP::ValueArg cmdOutputQuality(L"q", L"output_quality", + TCLAPW::ValueArg cmdOutputQuality(L"q", L"output_quality", L"output image quality", false, -1, L"int", cmd); - TCLAP::ValueArg cmdOutputDepth(L"d", L"output_depth", + TCLAPW::ValueArg cmdOutputDepth(L"d", L"output_depth", L"output image chaneel depth bit", false, 8, L"int", cmd); - TCLAP::ValueArg cmdCropSizeFile(L"c", L"crop_size", + TCLAPW::ValueArg cmdCropSizeFile(L"c", L"crop_size", L"input image split size", false, 128, L"int", cmd); - TCLAP::ValueArg cmdBatchSizeFile(L"b", L"batch_size", + TCLAPW::ValueArg cmdBatchSizeFile(L"b", L"batch_size", L"input batch size", false, 1, L"int", cmd); - TCLAP::ValueArg cmdGPUNoFile(L"", L"gpu", + TCLAPW::ValueArg cmdGPUNoFile(L"", L"gpu", L"gpu device no", false, 0, L"int", cmd); @@ -2172,21 +2172,21 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData) cmdBoolConstraintV.push_back(0); cmdBoolConstraintV.push_back(1); - TCLAP::ValuesConstraint cmdTTAConstraint(cmdBoolConstraintV); - TCLAP::ValueArg cmdTTA(L"t", L"tta", L"8x slower and slightly high quality", + TCLAPW::ValuesConstraint cmdTTAConstraint(cmdBoolConstraintV); + TCLAPW::ValueArg cmdTTA(L"t", L"tta", L"8x slower and slightly high quality", false, 0, &cmdTTAConstraint, cmd); // GUI独自 - TCLAP::ValuesConstraint cmdAutoStartConstraint(cmdBoolConstraintV); - TCLAP::ValueArg cmdAutoStart(L"", L"auto_start", L"to run automatically at startup", + TCLAPW::ValuesConstraint cmdAutoStartConstraint(cmdBoolConstraintV); + TCLAPW::ValueArg cmdAutoStart(L"", L"auto_start", L"to run automatically at startup", false, 0, &cmdAutoStartConstraint, cmd); - TCLAP::ValuesConstraint cmdAutoExitConstraint(cmdBoolConstraintV); - TCLAP::ValueArg cmdAutoExit(L"", L"auto_exit", L"exit when the run was succeeded", + TCLAPW::ValuesConstraint cmdAutoExitConstraint(cmdBoolConstraintV); + TCLAPW::ValueArg cmdAutoExit(L"", L"auto_exit", L"exit when the run was succeeded", false, 0, &cmdAutoExitConstraint, cmd); - TCLAP::ValuesConstraint cmdNoOverwriteConstraint(cmdBoolConstraintV); - TCLAP::ValueArg cmdNoOverwrite(L"", L"no_overwrite", L"don't overwrite output file", + TCLAPW::ValuesConstraint cmdNoOverwriteConstraint(cmdBoolConstraintV); + TCLAPW::ValueArg cmdNoOverwrite(L"", L"no_overwrite", L"don't overwrite output file", false, 0, &cmdNoOverwriteConstraint, cmd); std::vector cmdModelTypeConstraintV; @@ -2195,13 +2195,13 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData) cmdModelTypeConstraintV.push_back(L"anime_style_art_rgb"); cmdModelTypeConstraintV.push_back(L"photo"); cmdModelTypeConstraintV.push_back(L"anime_style_art_y"); - TCLAP::ValuesConstraint cmdModelTypeConstraint(cmdModelTypeConstraintV); - TCLAP::ValueArg cmdModelType(L"y", L"model_type", L"model type", + TCLAPW::ValuesConstraint cmdModelTypeConstraint(cmdModelTypeConstraintV); + TCLAPW::ValueArg cmdModelType(L"y", L"model_type", L"model type", false, L"upconv_7_anime_style_art_rgb", &cmdModelTypeConstraint, cmd); // definition of command line argument : end - TCLAP::Arg::enableIgnoreMismatched(); + TCLAPW::Arg::enableIgnoreMismatched(); // parse command line arguments try