Commit 5f3fd465 authored by Brad King's avatar Brad King
Browse files

Remove support for pre-C++98 STL

Drop "kwsys/stl/*" and "kwsys_stl::" and use the standard headers and
namespace instead.  Drop the now-unused KWSYS_STL_HAVE_STD check.

Change-Id: I6105fd32cd8f0e487e03f58927976e824a53f0d8
parent 2a581c30
...@@ -342,14 +342,9 @@ ENDIF() ...@@ -342,14 +342,9 @@ ENDIF()
# capabilities and parent project's request. Enforce 0/1 as only # capabilities and parent project's request. Enforce 0/1 as only
# possible values for configuration into Configure.hxx. # possible values for configuration into Configure.hxx.
KWSYS_PLATFORM_CXX_TEST(KWSYS_STL_HAVE_STD
"Checking whether STL classes are in std namespace" DIRECT)
KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_CSTDDEF KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_CSTDDEF
"Checking whether header cstddef is available" DIRECT) "Checking whether header cstddef is available" DIRECT)
SET(KWSYS_PLATFORM_CXX_TEST_DEFINES
-DKWSYS_STL_HAVE_STD=${KWSYS_STL_HAVE_STD})
KWSYS_PLATFORM_CXX_TEST(KWSYS_STL_HAS_ITERATOR_TRAITS KWSYS_PLATFORM_CXX_TEST(KWSYS_STL_HAS_ITERATOR_TRAITS
"Checking whether stl has iterator_traits" DIRECT) "Checking whether stl has iterator_traits" DIRECT)
IF(KWSYS_STL_HAS_ITERATOR_TRAITS) IF(KWSYS_STL_HAS_ITERATOR_TRAITS)
...@@ -769,41 +764,6 @@ IF(KWSYS_INSTALL_DOC_DIR) ...@@ -769,41 +764,6 @@ IF(KWSYS_INSTALL_DOC_DIR)
ENDIF() ENDIF()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Create STL header wrappers to block warnings in the STL headers and
# give standard names by which they may be included.
FOREACH(header
algorithm
deque
exception
functional
iterator
list
map
memory
new
numeric
queue
set
stack
stdexcept
string
utility
vector
)
# Configure the header wrapper.
SET(KWSYS_STL_HEADER "${header}")
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/kwsys_stl.hxx.in
${KWSYS_HEADER_DIR}/stl/${header}
@ONLY IMMEDIATE)
# Create an install target for the header wrapper.
IF(KWSYS_INSTALL_INCLUDE_DIR)
INSTALL(FILES ${KWSYS_HEADER_DIR}/stl/${header}
DESTINATION ${KWSYS_INSTALL_INCLUDE_DIR}/${KWSYS_NAMESPACE}/stl
${KWSYS_INSTALL_INCLUDE_OPTIONS})
ENDIF()
ENDFOREACH()
# Provide cstddef header. # Provide cstddef header.
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/kwsys_cstddef.hxx.in CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/kwsys_cstddef.hxx.in
${KWSYS_HEADER_DIR}/cstddef ${KWSYS_HEADER_DIR}/cstddef
......
...@@ -15,18 +15,16 @@ ...@@ -15,18 +15,16 @@
#include KWSYS_HEADER(Configure.hxx) #include KWSYS_HEADER(Configure.hxx)
#include KWSYS_HEADER(String.hxx) #include KWSYS_HEADER(String.hxx)
#include KWSYS_HEADER(stl/vector)
#include KWSYS_HEADER(stl/map)
#include KWSYS_HEADER(stl/set)
// Work-around CMake dependency scanning limitation. This must // Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers. // duplicate the above list of headers.
#if 0 #if 0
# include "CommandLineArguments.hxx.in" # include "CommandLineArguments.hxx.in"
# include "Configure.hxx.in" # include "Configure.hxx.in"
# include "kwsys_stl.hxx.in"
#endif #endif
#include <vector>
#include <map>
#include <set>
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>
...@@ -66,11 +64,11 @@ struct CommandLineArgumentsCallbackStructure ...@@ -66,11 +64,11 @@ struct CommandLineArgumentsCallbackStructure
}; };
class CommandLineArgumentsVectorOfStrings : class CommandLineArgumentsVectorOfStrings :
public kwsys_stl::vector<kwsys::String> {}; public std::vector<kwsys::String> {};
class CommandLineArgumentsSetOfStrings : class CommandLineArgumentsSetOfStrings :
public kwsys_stl::set<kwsys::String> {}; public std::set<kwsys::String> {};
class CommandLineArgumentsMapOfStrucs : class CommandLineArgumentsMapOfStrucs :
public kwsys_stl::map<kwsys::String, public std::map<kwsys::String,
CommandLineArgumentsCallbackStructure> {}; CommandLineArgumentsCallbackStructure> {};
class CommandLineArgumentsInternal class CommandLineArgumentsInternal
...@@ -151,8 +149,8 @@ void CommandLineArguments::ProcessArgument(const char* arg) ...@@ -151,8 +149,8 @@ void CommandLineArguments::ProcessArgument(const char* arg)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool CommandLineArguments::GetMatchedArguments( bool CommandLineArguments::GetMatchedArguments(
kwsys_stl::vector<kwsys_stl::string>* matches, std::vector<std::string>* matches,
const kwsys_stl::string& arg) const std::string& arg)
{ {
matches->clear(); matches->clear();
CommandLineArguments::Internal::CallbacksMap::iterator it; CommandLineArguments::Internal::CallbacksMap::iterator it;
...@@ -183,15 +181,15 @@ bool CommandLineArguments::GetMatchedArguments( ...@@ -183,15 +181,15 @@ bool CommandLineArguments::GetMatchedArguments(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int CommandLineArguments::Parse() int CommandLineArguments::Parse()
{ {
kwsys_stl::vector<kwsys_stl::string>::size_type cc; std::vector<std::string>::size_type cc;
kwsys_stl::vector<kwsys_stl::string> matches; std::vector<std::string> matches;
if ( this->StoreUnusedArgumentsFlag ) if ( this->StoreUnusedArgumentsFlag )
{ {
this->Internals->UnusedArguments.clear(); this->Internals->UnusedArguments.clear();
} }
for ( cc = 0; cc < this->Internals->Argv.size(); cc ++ ) for ( cc = 0; cc < this->Internals->Argv.size(); cc ++ )
{ {
const kwsys_stl::string& arg = this->Internals->Argv[cc]; const std::string& arg = this->Internals->Argv[cc];
CommandLineArguments_DEBUG("Process argument: " << arg); CommandLineArguments_DEBUG("Process argument: " << arg);
this->Internals->LastArgument = cc; this->Internals->LastArgument = cc;
if ( this->GetMatchedArguments(&matches, arg) ) if ( this->GetMatchedArguments(&matches, arg) )
...@@ -213,7 +211,7 @@ int CommandLineArguments::Parse() ...@@ -213,7 +211,7 @@ int CommandLineArguments::Parse()
// additional value // additional value
CommandLineArgumentsCallbackStructure *cs CommandLineArgumentsCallbackStructure *cs
= &this->Internals->Callbacks[matches[maxidx]]; = &this->Internals->Callbacks[matches[maxidx]];
const kwsys_stl::string& sarg = matches[maxidx]; const std::string& sarg = matches[maxidx];
if ( cs->Argument != sarg ) if ( cs->Argument != sarg )
{ {
abort(); abort();
...@@ -266,7 +264,7 @@ int CommandLineArguments::Parse() ...@@ -266,7 +264,7 @@ int CommandLineArguments::Parse()
CommandLineArguments_DEBUG("This is a multi argument: " << arg); CommandLineArguments_DEBUG("This is a multi argument: " << arg);
for (cc++; cc < this->Internals->Argv.size(); ++ cc ) for (cc++; cc < this->Internals->Argv.size(); ++ cc )
{ {
const kwsys_stl::string& marg = this->Internals->Argv[cc]; const std::string& marg = this->Internals->Argv[cc];
CommandLineArguments_DEBUG(" check multi argument value: " << marg); CommandLineArguments_DEBUG(" check multi argument value: " << marg);
if ( this->GetMatchedArguments(&matches, marg) ) if ( this->GetMatchedArguments(&matches, marg) )
{ {
...@@ -429,13 +427,13 @@ CommandLineArgumentsAddArgumentMacro(BOOL, bool) ...@@ -429,13 +427,13 @@ CommandLineArgumentsAddArgumentMacro(BOOL, bool)
CommandLineArgumentsAddArgumentMacro(INT, int) CommandLineArgumentsAddArgumentMacro(INT, int)
CommandLineArgumentsAddArgumentMacro(DOUBLE, double) CommandLineArgumentsAddArgumentMacro(DOUBLE, double)
CommandLineArgumentsAddArgumentMacro(STRING, char*) CommandLineArgumentsAddArgumentMacro(STRING, char*)
CommandLineArgumentsAddArgumentMacro(STL_STRING, kwsys_stl::string) CommandLineArgumentsAddArgumentMacro(STL_STRING, std::string)
CommandLineArgumentsAddArgumentMacro(VECTOR_BOOL, kwsys_stl::vector<bool>) CommandLineArgumentsAddArgumentMacro(VECTOR_BOOL, std::vector<bool>)
CommandLineArgumentsAddArgumentMacro(VECTOR_INT, kwsys_stl::vector<int>) CommandLineArgumentsAddArgumentMacro(VECTOR_INT, std::vector<int>)
CommandLineArgumentsAddArgumentMacro(VECTOR_DOUBLE, kwsys_stl::vector<double>) CommandLineArgumentsAddArgumentMacro(VECTOR_DOUBLE, std::vector<double>)
CommandLineArgumentsAddArgumentMacro(VECTOR_STRING, kwsys_stl::vector<char*>) CommandLineArgumentsAddArgumentMacro(VECTOR_STRING, std::vector<char*>)
CommandLineArgumentsAddArgumentMacro(VECTOR_STL_STRING, kwsys_stl::vector<kwsys_stl::string>) CommandLineArgumentsAddArgumentMacro(VECTOR_STL_STRING, std::vector<std::string>)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#define CommandLineArgumentsAddBooleanArgumentMacro(type, ctype) \ #define CommandLineArgumentsAddBooleanArgumentMacro(type, ctype) \
...@@ -450,7 +448,7 @@ CommandLineArgumentsAddBooleanArgumentMacro(BOOL, bool) ...@@ -450,7 +448,7 @@ CommandLineArgumentsAddBooleanArgumentMacro(BOOL, bool)
CommandLineArgumentsAddBooleanArgumentMacro(INT, int) CommandLineArgumentsAddBooleanArgumentMacro(INT, int)
CommandLineArgumentsAddBooleanArgumentMacro(DOUBLE, double) CommandLineArgumentsAddBooleanArgumentMacro(DOUBLE, double)
CommandLineArgumentsAddBooleanArgumentMacro(STRING, char*) CommandLineArgumentsAddBooleanArgumentMacro(STRING, char*)
CommandLineArgumentsAddBooleanArgumentMacro(STL_STRING, kwsys_stl::string) CommandLineArgumentsAddBooleanArgumentMacro(STL_STRING, std::string)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::SetClientData(void* client_data) void CommandLineArguments::SetClientData(void* client_data)
...@@ -522,7 +520,7 @@ void CommandLineArguments::GenerateHelp() ...@@ -522,7 +520,7 @@ void CommandLineArguments::GenerateHelp()
// Collapse all arguments into the map of vectors of all arguments that do // Collapse all arguments into the map of vectors of all arguments that do
// the same thing. // the same thing.
CommandLineArguments::Internal::CallbacksMap::iterator it; CommandLineArguments::Internal::CallbacksMap::iterator it;
typedef kwsys_stl::map<CommandLineArguments::Internal::String, typedef std::map<CommandLineArguments::Internal::String,
CommandLineArguments::Internal::SetOfStrings > MapArgs; CommandLineArguments::Internal::SetOfStrings > MapArgs;
MapArgs mp; MapArgs mp;
MapArgs::iterator mpit, smpit; MapArgs::iterator mpit, smpit;
...@@ -679,7 +677,7 @@ void CommandLineArguments::GenerateHelp() ...@@ -679,7 +677,7 @@ void CommandLineArguments::GenerateHelp()
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable( void CommandLineArguments::PopulateVariable(
bool* variable, const kwsys_stl::string& value) bool* variable, const std::string& value)
{ {
if ( value == "1" || value == "ON" || value == "on" || value == "On" || if ( value == "1" || value == "ON" || value == "on" || value == "On" ||
value == "TRUE" || value == "true" || value == "True" || value == "TRUE" || value == "true" || value == "True" ||
...@@ -695,7 +693,7 @@ void CommandLineArguments::PopulateVariable( ...@@ -695,7 +693,7 @@ void CommandLineArguments::PopulateVariable(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable( void CommandLineArguments::PopulateVariable(
int* variable, const kwsys_stl::string& value) int* variable, const std::string& value)
{ {
char* res = 0; char* res = 0;
*variable = static_cast<int>(strtol(value.c_str(), &res, 10)); *variable = static_cast<int>(strtol(value.c_str(), &res, 10));
...@@ -707,7 +705,7 @@ void CommandLineArguments::PopulateVariable( ...@@ -707,7 +705,7 @@ void CommandLineArguments::PopulateVariable(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable( void CommandLineArguments::PopulateVariable(
double* variable, const kwsys_stl::string& value) double* variable, const std::string& value)
{ {
char* res = 0; char* res = 0;
*variable = strtod(value.c_str(), &res); *variable = strtod(value.c_str(), &res);
...@@ -719,7 +717,7 @@ void CommandLineArguments::PopulateVariable( ...@@ -719,7 +717,7 @@ void CommandLineArguments::PopulateVariable(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable( void CommandLineArguments::PopulateVariable(
char** variable, const kwsys_stl::string& value) char** variable, const std::string& value)
{ {
if ( *variable ) if ( *variable )
{ {
...@@ -732,14 +730,14 @@ void CommandLineArguments::PopulateVariable( ...@@ -732,14 +730,14 @@ void CommandLineArguments::PopulateVariable(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable( void CommandLineArguments::PopulateVariable(
kwsys_stl::string* variable, const kwsys_stl::string& value) std::string* variable, const std::string& value)
{ {
*variable = value; *variable = value;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable( void CommandLineArguments::PopulateVariable(
kwsys_stl::vector<bool>* variable, const kwsys_stl::string& value) std::vector<bool>* variable, const std::string& value)
{ {
bool val = false; bool val = false;
if ( value == "1" || value == "ON" || value == "on" || value == "On" || if ( value == "1" || value == "ON" || value == "on" || value == "On" ||
...@@ -753,7 +751,7 @@ void CommandLineArguments::PopulateVariable( ...@@ -753,7 +751,7 @@ void CommandLineArguments::PopulateVariable(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable( void CommandLineArguments::PopulateVariable(
kwsys_stl::vector<int>* variable, const kwsys_stl::string& value) std::vector<int>* variable, const std::string& value)
{ {
char* res = 0; char* res = 0;
variable->push_back(static_cast<int>(strtol(value.c_str(), &res, 10))); variable->push_back(static_cast<int>(strtol(value.c_str(), &res, 10)));
...@@ -765,7 +763,7 @@ void CommandLineArguments::PopulateVariable( ...@@ -765,7 +763,7 @@ void CommandLineArguments::PopulateVariable(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable( void CommandLineArguments::PopulateVariable(
kwsys_stl::vector<double>* variable, const kwsys_stl::string& value) std::vector<double>* variable, const std::string& value)
{ {
char* res = 0; char* res = 0;
variable->push_back(strtod(value.c_str(), &res)); variable->push_back(strtod(value.c_str(), &res));
...@@ -777,7 +775,7 @@ void CommandLineArguments::PopulateVariable( ...@@ -777,7 +775,7 @@ void CommandLineArguments::PopulateVariable(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable( void CommandLineArguments::PopulateVariable(
kwsys_stl::vector<char*>* variable, const kwsys_stl::string& value) std::vector<char*>* variable, const std::string& value)
{ {
char* var = new char[ value.size() + 1 ]; char* var = new char[ value.size() + 1 ];
strcpy(var, value.c_str()); strcpy(var, value.c_str());
...@@ -786,8 +784,8 @@ void CommandLineArguments::PopulateVariable( ...@@ -786,8 +784,8 @@ void CommandLineArguments::PopulateVariable(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::PopulateVariable( void CommandLineArguments::PopulateVariable(
kwsys_stl::vector<kwsys_stl::string>* variable, std::vector<std::string>* variable,
const kwsys_stl::string& value) const std::string& value)
{ {
variable->push_back(value); variable->push_back(value);
} }
...@@ -808,7 +806,7 @@ bool CommandLineArguments::PopulateVariable(CommandLineArgumentsCallbackStructur ...@@ -808,7 +806,7 @@ bool CommandLineArguments::PopulateVariable(CommandLineArgumentsCallbackStructur
CommandLineArguments_DEBUG("Set argument: " << cs->Argument << " to " << value); CommandLineArguments_DEBUG("Set argument: " << cs->Argument << " to " << value);
if ( cs->Variable ) if ( cs->Variable )
{ {
kwsys_stl::string var = "1"; std::string var = "1";
if ( value ) if ( value )
{ {
var = value; var = value;
...@@ -825,25 +823,25 @@ bool CommandLineArguments::PopulateVariable(CommandLineArgumentsCallbackStructur ...@@ -825,25 +823,25 @@ bool CommandLineArguments::PopulateVariable(CommandLineArgumentsCallbackStructur
this->PopulateVariable(static_cast<char**>(cs->Variable), var); this->PopulateVariable(static_cast<char**>(cs->Variable), var);
break; break;
case CommandLineArguments::STL_STRING_TYPE: case CommandLineArguments::STL_STRING_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::string*>(cs->Variable), var); this->PopulateVariable(static_cast<std::string*>(cs->Variable), var);
break; break;
case CommandLineArguments::BOOL_TYPE: case CommandLineArguments::BOOL_TYPE:
this->PopulateVariable(static_cast<bool*>(cs->Variable), var); this->PopulateVariable(static_cast<bool*>(cs->Variable), var);
break; break;
case CommandLineArguments::VECTOR_BOOL_TYPE: case CommandLineArguments::VECTOR_BOOL_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::vector<bool>*>(cs->Variable), var); this->PopulateVariable(static_cast<std::vector<bool>*>(cs->Variable), var);
break; break;
case CommandLineArguments::VECTOR_INT_TYPE: case CommandLineArguments::VECTOR_INT_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::vector<int>*>(cs->Variable), var); this->PopulateVariable(static_cast<std::vector<int>*>(cs->Variable), var);
break; break;
case CommandLineArguments::VECTOR_DOUBLE_TYPE: case CommandLineArguments::VECTOR_DOUBLE_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::vector<double>*>(cs->Variable), var); this->PopulateVariable(static_cast<std::vector<double>*>(cs->Variable), var);
break; break;
case CommandLineArguments::VECTOR_STRING_TYPE: case CommandLineArguments::VECTOR_STRING_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::vector<char*>*>(cs->Variable), var); this->PopulateVariable(static_cast<std::vector<char*>*>(cs->Variable), var);
break; break;
case CommandLineArguments::VECTOR_STL_STRING_TYPE: case CommandLineArguments::VECTOR_STL_STRING_TYPE:
this->PopulateVariable(static_cast<kwsys_stl::vector<kwsys_stl::string>*>(cs->Variable), var); this->PopulateVariable(static_cast<std::vector<std::string>*>(cs->Variable), var);
break; break;
default: default:
std::cerr << "Got unknown variable type: \"" << cs->VariableType << "\"" << std::endl; std::cerr << "Got unknown variable type: \"" << cs->VariableType << "\"" << std::endl;
......
...@@ -15,13 +15,8 @@ ...@@ -15,13 +15,8 @@
#include <@KWSYS_NAMESPACE@/Configure.h> #include <@KWSYS_NAMESPACE@/Configure.h>
#include <@KWSYS_NAMESPACE@/Configure.hxx> #include <@KWSYS_NAMESPACE@/Configure.hxx>
#include <@KWSYS_NAMESPACE@/stl/string> #include <string>
#include <@KWSYS_NAMESPACE@/stl/vector> #include <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
namespace @KWSYS_NAMESPACE@ namespace @KWSYS_NAMESPACE@
{ {
...@@ -155,7 +150,7 @@ public: ...@@ -155,7 +150,7 @@ public:
void AddArgument(const char* argument, ArgumentTypeEnum type, void AddArgument(const char* argument, ArgumentTypeEnum type,
char** variable, const char* help); char** variable, const char* help);
void AddArgument(const char* argument, ArgumentTypeEnum type, 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 * Add handler for argument which is going to set the variable to the
...@@ -163,15 +158,15 @@ public: ...@@ -163,15 +158,15 @@ public:
* appropriate type. This will handle the multi argument values. * appropriate type. This will handle the multi argument values.
*/ */
void AddArgument(const char* argument, ArgumentTypeEnum type, 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, 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, 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, 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, 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 * Add handler for boolean argument. The argument does not take any option
...@@ -187,7 +182,7 @@ public: ...@@ -187,7 +182,7 @@ public:
void AddBooleanArgument(const char* argument, void AddBooleanArgument(const char* argument,
char** variable, const char* help); char** variable, const char* help);
void AddBooleanArgument(const char* argument, void AddBooleanArgument(const char* argument,
kwsys_stl::string* variable, const char* help); std::string* variable, const char* help);
/** /**
* Set the callbacks for error handling. * Set the callbacks for error handling.
...@@ -243,28 +238,28 @@ protected: ...@@ -243,28 +238,28 @@ protected:
void AddArgument(const char* argument, ArgumentTypeEnum type, void AddArgument(const char* argument, ArgumentTypeEnum type,
VariableTypeEnum vtype, void* variable, const char* help); VariableTypeEnum vtype, void* variable, const char* help);
bool GetMatchedArguments(kwsys_stl::vector<kwsys_stl::string>* matches, bool GetMatchedArguments(std::vector<std::string>* matches,
const kwsys_stl::string& arg); const std::string& arg);
//! Populate individual variables //! Populate individual variables
bool PopulateVariable(CommandLineArgumentsCallbackStructure* cs, bool PopulateVariable(CommandLineArgumentsCallbackStructure* cs,
const char* value); const char* value);
//! Populate individual variables of type ... //! Populate individual variables of type ...
void PopulateVariable(bool* variable, const kwsys_stl::string& value); void PopulateVariable(bool* variable, const std::string& value);
void PopulateVariable(int* variable, const kwsys_stl::string& value); void PopulateVariable(int* variable, const std::string& value);
void PopulateVariable(double* variable, const kwsys_stl::string& value); void PopulateVariable(double* variable, const std::string& value);
void PopulateVariable(char** variable, const kwsys_stl::string& value); void PopulateVariable(char** variable, const std::string& value);
void PopulateVariable(kwsys_stl::string* variable, const kwsys_stl::string& value); void PopulateVariable(std::string* variable, const std::string& value);
void PopulateVariable(kwsys_stl::vector<bool>* variable, const kwsys_stl::string& value); void PopulateVariable(std::vector<bool>* variable, const std::string& value);
void PopulateVariable(kwsys_stl::vector<int>* variable, const kwsys_stl::string& value); void PopulateVariable(std::vector<int>* variable, const std::string& value);
void PopulateVariable(kwsys_stl::vector<double>* variable, const kwsys_stl::string& value); void PopulateVariable(std::vector<double>* variable, const std::string& value);
void PopulateVariable(kwsys_stl::vector<char*>* variable, const kwsys_stl::string& value); void PopulateVariable(std::vector<char*>* variable, const std::string& value);
void PopulateVariable(kwsys_stl::vector<kwsys_stl::string>* variable, const kwsys_stl::string& value); void PopulateVariable(std::vector<std::string>* variable, const std::string& value);
typedef CommandLineArgumentsInternal Internal; typedef CommandLineArgumentsInternal Internal;
Internal* Internals; Internal* Internals;
kwsys_stl::string Help; std::string Help;
unsigned int LineLength; unsigned int LineLength;
...@@ -273,11 +268,6 @@ protected: ...@@ -273,11 +268,6 @@ protected:
} // namespace @KWSYS_NAMESPACE@ } // namespace @KWSYS_NAMESPACE@
/* Undefine temporary macro. */
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# undef kwsys_stl
#endif
#endif #endif
......
...@@ -15,19 +15,9 @@ ...@@ -15,19 +15,9 @@
/* Include C configuration. */ /* Include C configuration. */
#include <@KWSYS_NAMESPACE@/Configure.h> #include <@KWSYS_NAMESPACE@/Configure.h>
/* Whether STL is in std namespace. */
#define @KWSYS_NAMESPACE@_STL_HAVE_STD @KWSYS_STL_HAVE_STD@
/* Whether wstring is available. */ /* Whether wstring is available. */
#define @KWSYS_NAMESPACE@_STL_HAS_WSTRING @KWSYS_STL_HAS_WSTRING@ #define @KWSYS_NAMESPACE@_STL_HAS_WSTRING @KWSYS_STL_HAS_WSTRING@
/* Define the stl namespace macro. */
#if @KWSYS_NAMESPACE@_STL_HAVE_STD
# define @KWSYS_NAMESPACE@_stl std
#else
# define @KWSYS_NAMESPACE@_stl
#endif
/* Whether the cstddef header is available. */ /* Whether the cstddef header is available. */
#define @KWSYS_NAMESPACE@_CXX_HAS_CSTDDEF @KWSYS_CXX_HAS_CSTDDEF@ #define @KWSYS_NAMESPACE@_CXX_HAS_CSTDDEF @KWSYS_CXX_HAS_CSTDDEF@
...@@ -95,11 +85,9 @@ ...@@ -95,11 +85,9 @@
access to the macros without a configured namespace. */ access to the macros without a configured namespace. */
#if defined(KWSYS_NAMESPACE) #if defined(KWSYS_NAMESPACE)
# if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS # if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# define kwsys_stl @KWSYS_NAMESPACE@_stl
# define kwsys @KWSYS_NAMESPACE@ # define kwsys @KWSYS_NAMESPACE@
# endif # endif
# define KWSYS_NAME_IS_KWSYS @KWSYS_NAMESPACE@_NAME_IS_KWSYS