diff options
Diffstat (limited to 'Source/kwsys/CommandLineArguments.hxx.in')
-rw-r--r-- | Source/kwsys/CommandLineArguments.hxx.in | 56 |
1 files changed, 23 insertions, 33 deletions
diff --git a/Source/kwsys/CommandLineArguments.hxx.in b/Source/kwsys/CommandLineArguments.hxx.in index cbf6ee3..e4f6d02 100644 --- a/Source/kwsys/CommandLineArguments.hxx.in +++ b/Source/kwsys/CommandLineArguments.hxx.in @@ -15,13 +15,8 @@ #include <@KWSYS_NAMESPACE@/Configure.h> #include <@KWSYS_NAMESPACE@/Configure.hxx> -#include <@KWSYS_NAMESPACE@/stl/string> -#include <@KWSYS_NAMESPACE@/stl/vector> - -/* Define this macro temporarily to keep the code readable. */ -#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS -# define kwsys_stl @KWSYS_NAMESPACE@_stl -#endif +#include <string> +#include <vector> namespace @KWSYS_NAMESPACE@ { @@ -64,7 +59,7 @@ struct CommandLineArgumentsCallbackStructure; * "This is help string for --something"); * if ( !arg.Parse() ) * { - * kwsys_ios::cerr << "Problem parsing arguments" << kwsys_ios::endl; + * std::cerr << "Problem parsing arguments" << std::endl; * res = 1; * } * @@ -155,7 +150,7 @@ public: void AddArgument(const char* argument, ArgumentTypeEnum type, char** variable, const char* help); void AddArgument(const char* argument, ArgumentTypeEnum type, - kwsys_stl::string* variable, const char* help); + std::string* variable, const char* help); /** * Add handler for argument which is going to set the variable to the @@ -163,15 +158,15 @@ public: * appropriate type. This will handle the multi argument values. */ void AddArgument(const char* argument, ArgumentTypeEnum type, - kwsys_stl::vector<bool>* variable, const char* help); + std::vector<bool>* variable, const char* help); void AddArgument(const char* argument, ArgumentTypeEnum type, - kwsys_stl::vector<int>* variable, const char* help); + std::vector<int>* variable, const char* help); void AddArgument(const char* argument, ArgumentTypeEnum type, - kwsys_stl::vector<double>* variable, const char* help); + std::vector<double>* variable, const char* help); void AddArgument(const char* argument, ArgumentTypeEnum type, - kwsys_stl::vector<char*>* variable, const char* help); + std::vector<char*>* variable, const char* help); void AddArgument(const char* argument, ArgumentTypeEnum type, - kwsys_stl::vector<kwsys_stl::string>* variable, const char* help); + std::vector<std::string>* variable, const char* help); /** * Add handler for boolean argument. The argument does not take any option @@ -187,7 +182,7 @@ public: void AddBooleanArgument(const char* argument, char** variable, const char* help); void AddBooleanArgument(const char* argument, - kwsys_stl::string* variable, const char* help); + std::string* variable, const char* help); /** * Set the callbacks for error handling. @@ -243,28 +238,28 @@ protected: void AddArgument(const char* argument, ArgumentTypeEnum type, VariableTypeEnum vtype, void* variable, const char* help); - bool GetMatchedArguments(kwsys_stl::vector<kwsys_stl::string>* matches, - const kwsys_stl::string& arg); + bool GetMatchedArguments(std::vector<std::string>* matches, + const std::string& arg); //! Populate individual variables bool PopulateVariable(CommandLineArgumentsCallbackStructure* cs, const char* value); //! Populate individual variables of type ... - void PopulateVariable(bool* variable, const kwsys_stl::string& value); - void PopulateVariable(int* variable, const kwsys_stl::string& value); - void PopulateVariable(double* variable, const kwsys_stl::string& value); - void PopulateVariable(char** variable, const kwsys_stl::string& value); - void PopulateVariable(kwsys_stl::string* variable, const kwsys_stl::string& value); - void PopulateVariable(kwsys_stl::vector<bool>* variable, const kwsys_stl::string& value); - void PopulateVariable(kwsys_stl::vector<int>* variable, const kwsys_stl::string& value); - void PopulateVariable(kwsys_stl::vector<double>* variable, const kwsys_stl::string& value); - void PopulateVariable(kwsys_stl::vector<char*>* variable, const kwsys_stl::string& value); - void PopulateVariable(kwsys_stl::vector<kwsys_stl::string>* variable, const kwsys_stl::string& value); + void PopulateVariable(bool* variable, const std::string& value); + void PopulateVariable(int* variable, const std::string& value); + void PopulateVariable(double* variable, const std::string& value); + void PopulateVariable(char** variable, const std::string& value); + void PopulateVariable(std::string* variable, const std::string& value); + void PopulateVariable(std::vector<bool>* variable, const std::string& value); + void PopulateVariable(std::vector<int>* variable, const std::string& value); + void PopulateVariable(std::vector<double>* variable, const std::string& value); + void PopulateVariable(std::vector<char*>* variable, const std::string& value); + void PopulateVariable(std::vector<std::string>* variable, const std::string& value); typedef CommandLineArgumentsInternal Internal; Internal* Internals; - kwsys_stl::string Help; + std::string Help; unsigned int LineLength; @@ -273,11 +268,6 @@ protected: } // namespace @KWSYS_NAMESPACE@ -/* Undefine temporary macro. */ -#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS -# undef kwsys_stl -#endif - #endif |