Commit 484a24cc authored by Marcus D. Hanwell's avatar Marcus D. Hanwell

ENH: Removed the use of vtkstd

The vtkstd forwarding headers are deprecated, move to using the STL
headers directly.

Change-Id: Iaeb5ea0c10d40b8e934b6a8ca18f28c3b022b924
parent 8752056c
......@@ -215,7 +215,7 @@ protected:
// Description:
// This structure provides a list of children, along with convenience
// functions to paint the children etc. It is derived from
// vtkstd::vector<vtkAbstractContextItem>, defined in a private header.
// std::vector<vtkAbstractContextItem>, defined in a private header.
vtkContextScenePrivate* Children;
// Description: Store the visibility of the item (default is true).
......
......@@ -867,7 +867,7 @@ void vtkAxis::GenerateTickLabels(double min, double max)
if (this->TickLabelAlgorithm == vtkAxis::TICK_SIMPLE)
{
vtksys_ios::ostringstream ostr;
ostr.imbue(vtkstd::locale::classic());
ostr.imbue(std::locale::classic());
if (this->Notation > 0)
{
ostr.precision(this->Precision);
......@@ -908,7 +908,7 @@ void vtkAxis::GenerateTickLabels()
}
// Now create a label for the tick position
vtksys_ios::ostringstream ostr;
ostr.imbue(vtkstd::locale::classic());
ostr.imbue(std::locale::classic());
if (this->Notation > 0)
{
ostr.precision(this->Precision);
......@@ -940,7 +940,7 @@ void vtkAxis::GenerateTickLabels()
void vtkAxis::GenerateLabelFormat(int notation, double n)
{
vtksys_ios::ostringstream ostr;
ostr.imbue(vtkstd::locale::classic());
ostr.imbue(std::locale::classic());
switch(notation)
{
......@@ -1270,7 +1270,7 @@ void vtkAxis::GenerateLogScaleTickMarks(int order,
// Now create a label for the tick position
vtksys_ios::ostringstream ostr;
ostr.imbue(vtkstd::locale::classic());
ostr.imbue(std::locale::classic());
if (this->Notation > 0)
{
ostr.precision(this->Precision);
......
......@@ -196,7 +196,7 @@ double vtkAxisExtended::FormatLegibilityScore(double n, int format)
int vtkAxisExtended::FormatStringLength(int format, double n, int precision)
{
vtksys_ios::ostringstream ostr;
ostr.imbue(vtkstd::locale::classic());
ostr.imbue(std::locale::classic());
int numSize(0);
switch(format)
......
......@@ -136,7 +136,7 @@ vtkStdString vtkPlot::GetNumber(double position, vtkAxis *axis)
{
// Determine and format the X and Y position in the chart
vtksys_ios::ostringstream ostr;
ostr.imbue(vtkstd::locale::classic());
ostr.imbue(std::locale::classic());
ostr.precision(this->GetTooltipPrecision());
if(this->GetTooltipNotation() == vtkAxis::SCIENTIFIC_NOTATION)
......
......@@ -33,7 +33,7 @@
{ \
vtksys_ios::ostringstream buffer; \
buffer << "Expression failed at line " << __LINE__ << ": " << #expression; \
throw vtkstd::runtime_error(buffer.str()); \
throw std::runtime_error(buffer.str()); \
} \
}
......@@ -44,11 +44,11 @@ int TestArrayAPI(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
vtkSmartPointer<vtkArray> array;
// Test to see that we can create every supported combination of storage- and value-type.
vtkstd::vector<int> storage_types;
std::vector<int> storage_types;
storage_types.push_back(vtkArray::DENSE);
storage_types.push_back(vtkArray::SPARSE);
vtkstd::vector<int> value_types;
std::vector<int> value_types;
value_types.push_back(VTK_CHAR);
value_types.push_back(VTK_UNSIGNED_CHAR);
value_types.push_back(VTK_SHORT);
......@@ -62,7 +62,7 @@ int TestArrayAPI(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
value_types.push_back(VTK_STRING);
value_types.push_back(VTK_VARIANT);
vtkstd::vector<vtkVariant> sample_values;
std::vector<vtkVariant> sample_values;
sample_values.push_back(static_cast<char>(1));
sample_values.push_back(static_cast<unsigned char>(2));
sample_values.push_back(static_cast<short>(3));
......@@ -76,7 +76,7 @@ int TestArrayAPI(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
sample_values.push_back(vtkStdString("11"));
sample_values.push_back(vtkVariant(12.0));
for(vtkstd::vector<int>::const_iterator storage_type = storage_types.begin(); storage_type != storage_types.end(); ++storage_type)
for(std::vector<int>::const_iterator storage_type = storage_types.begin(); storage_type != storage_types.end(); ++storage_type)
{
for(size_t value_type = 0; value_type != value_types.size(); ++value_type)
{
......@@ -105,7 +105,7 @@ int TestArrayAPI(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
return 0;
}
catch(vtkstd::exception& e)
catch(std::exception& e)
{
cerr << e.what() << endl;
return 1;
......
......@@ -32,7 +32,7 @@
{ \
vtksys_ios::ostringstream buffer; \
buffer << "Expression failed at line " << __LINE__ << ": " << #expression; \
throw vtkstd::runtime_error(buffer.str()); \
throw std::runtime_error(buffer.str()); \
} \
}
......@@ -69,7 +69,7 @@ int TestArrayAPIConvenience(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
return 0;
}
catch(vtkstd::exception& e)
catch(std::exception& e)
{
cerr << e.what() << endl;
return 1;
......
......@@ -32,7 +32,7 @@
{ \
vtksys_ios::ostringstream buffer; \
buffer << "Expression failed at line " << __LINE__ << ": " << #expression; \
throw vtkstd::runtime_error(buffer.str()); \
throw std::runtime_error(buffer.str()); \
} \
}
......@@ -159,7 +159,7 @@ int TestArrayAPIDense(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
return 0;
}
catch(vtkstd::exception& e)
catch(std::exception& e)
{
cerr << e.what() << endl;
return 1;
......
......@@ -28,7 +28,7 @@
#define test_expression(expression) \
{ \
if(!(expression)) \
throw vtkstd::runtime_error("Expression failed: " #expression); \
throw std::runtime_error("Expression failed: " #expression); \
}
int TestArrayAPISparse(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
......@@ -155,7 +155,7 @@ int TestArrayAPISparse(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
return 0;
}
catch(vtkstd::exception& e)
catch(std::exception& e)
{
cerr << e.what() << endl;
return 1;
......
......@@ -33,7 +33,7 @@
{ \
vtksys_ios::ostringstream buffer; \
buffer << "Expression failed at line " << __LINE__ << ": " << #expression; \
throw vtkstd::runtime_error(buffer.str()); \
throw std::runtime_error(buffer.str()); \
} \
}
......@@ -67,7 +67,7 @@ int TestArrayBool(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
return 0;
}
catch(vtkstd::exception& e)
catch(std::exception& e)
{
cerr << e.what() << endl;
return 1;
......
......@@ -37,9 +37,9 @@
{ \
if(!(expression)) \
{ \
vtkstd::ostringstream buffer; \
std::ostringstream buffer; \
buffer << "Expression failed at line " << __LINE__ << ": " << #expression; \
throw vtkstd::runtime_error(buffer.str()); \
throw std::runtime_error(buffer.str()); \
} \
}
......@@ -69,16 +69,16 @@ void SuccessTest(vtkObject* source, int line)
int count = 0;
if(!vtkTryDowncast<TargetT, TypesT>(source, DowncastTest(count)))
{
vtkstd::ostringstream buffer;
std::ostringstream buffer;
buffer << "Expression failed at line " << line;
throw vtkstd::runtime_error(buffer.str());
throw std::runtime_error(buffer.str());
}
if(count != 1)
{
vtkstd::ostringstream buffer;
std::ostringstream buffer;
buffer << "Functor was called " << count << " times at line " << line;
throw vtkstd::runtime_error(buffer.str());
throw std::runtime_error(buffer.str());
}
}
......@@ -88,16 +88,16 @@ void FailTest(vtkObject* source, int line)
int count = 0;
if(vtkTryDowncast<TargetT, TypesT>(source, DowncastTest(count)))
{
vtkstd::ostringstream buffer;
std::ostringstream buffer;
buffer << "Expression failed at line " << line;
throw vtkstd::runtime_error(buffer.str());
throw std::runtime_error(buffer.str());
}
if(count != 0)
{
vtkstd::ostringstream buffer;
std::ostringstream buffer;
buffer << "Functor was called " << count << " times at line " << line;
throw vtkstd::runtime_error(buffer.str());
throw std::runtime_error(buffer.str());
}
}
......@@ -147,7 +147,7 @@ struct Transpose
void operator()(vtkDenseArray<ValueT>* input) const
{
if(input->GetDimensions() != 2 || input->GetExtents()[0] != input->GetExtents()[1])
throw vtkstd::runtime_error("A square matrix is required.");
throw std::runtime_error("A square matrix is required.");
vtkDenseArray<ValueT>* output = vtkDenseArray<ValueT>::SafeDownCast(input->DeepCopy());
for(vtkIdType i = 0; i != input->GetExtents()[0]; ++i)
......@@ -257,7 +257,7 @@ int main(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
return 0;
}
catch(vtkstd::exception& e)
catch(std::exception& e)
{
cerr << e.what() << endl;
return 1;
......
......@@ -33,7 +33,7 @@
{ \
vtksys_ios::ostringstream buffer; \
buffer << "Expression failed at line " << __LINE__ << ": " << #expression; \
throw vtkstd::runtime_error(buffer.str()); \
throw std::runtime_error(buffer.str()); \
} \
}
......@@ -73,7 +73,7 @@ int TestArrayExtents(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
return 0;
}
catch(vtkstd::exception& e)
catch(std::exception& e)
{
cerr << e.what() << endl;
return 1;
......
......@@ -26,10 +26,10 @@
#include <vtksys/ios/iostream>
#include <vtksys/stl/stdexcept>
void test_expression(const bool expression, const vtkstd::string& message)
void test_expression(const bool expression, const std::string& message)
{
if(!expression)
throw vtkstd::runtime_error(message);
throw std::runtime_error(message);
}
int TestArrayInterpolationDense(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
......@@ -76,7 +76,7 @@ int TestArrayInterpolationDense(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
return 0;
}
catch(vtkstd::exception& e)
catch(std::exception& e)
{
cerr << e.what() << endl;
return 1;
......
......@@ -466,7 +466,7 @@ int TestArrayLookupInt(vtkIdType numVal, bool runComparison)
vtksys_stl::multimap<int, vtkIdType> map;
for (vtkIdType i = 0; i < arrSize; ++i, ++ptr)
{
map.insert(vtkstd::pair<const int, vtkIdType>(*ptr, i));
map.insert(std::pair<const int, vtkIdType>(*ptr, i));
}
timer->StopTimer();
cerr << "," << timer->GetElapsedTime();
......
......@@ -35,26 +35,26 @@ void VerifyType(const T& DefaultNull, const T& AlternateNull)
// Verify that the default NULL value is iniitialized correctly ...
if(array->GetNullValue() != DefaultNull)
{
throw vtkstd::runtime_error("Incorrect default NULL value for " + vtkstd::string(array->GetClassName()));
throw std::runtime_error("Incorrect default NULL value for " + std::string(array->GetClassName()));
}
// Verify that GetValue() returns the default NULL value for NULL elements ...
if(array->GetValue(1) != DefaultNull)
{
throw vtkstd::runtime_error("Empty value did not return default NULL for " + vtkstd::string(array->GetClassName()));
throw std::runtime_error("Empty value did not return default NULL for " + std::string(array->GetClassName()));
}
// Verify that we can override the default NULL value ...
array->SetNullValue(AlternateNull);
if(array->GetNullValue() != AlternateNull)
{
throw vtkstd::runtime_error("Error overriding NULL value for " + vtkstd::string(array->GetClassName()));
throw std::runtime_error("Error overriding NULL value for " + std::string(array->GetClassName()));
}
// Verify that GetValue() returns the alternate NULL value forr NULL elements ...
if(array->GetValue(1) != AlternateNull)
{
throw vtkstd::runtime_error("Empty value did not overridden NULL for " + vtkstd::string(array->GetClassName()));
throw std::runtime_error("Empty value did not overridden NULL for " + std::string(array->GetClassName()));
}
}
......@@ -75,7 +75,7 @@ int TestArrayNullValues(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
return 0;
}
catch(vtkstd::exception& e)
catch(std::exception& e)
{
cerr << e.what() << endl;
return 1;
......
......@@ -33,7 +33,7 @@
{ \
vtksys_ios::ostringstream buffer; \
buffer << "Expression failed at line " << __LINE__ << ": " << #expression; \
throw vtkstd::runtime_error(buffer.str()); \
throw std::runtime_error(buffer.str()); \
} \
}
......@@ -109,7 +109,7 @@ int TestArrayUserTypes(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
return 0;
}
catch(vtkstd::exception& e)
catch(std::exception& e)
{
cerr << e.what() << endl;
return 1;
......
......@@ -32,7 +32,7 @@
{ \
vtksys_ios::ostringstream buffer; \
buffer << "Expression failed at line " << __LINE__ << ": " << #expression; \
throw vtkstd::runtime_error(buffer.str()); \
throw std::runtime_error(buffer.str()); \
} \
}
......@@ -69,7 +69,7 @@ int TestArrayVariants(int vtkNotUsed(argc), char *vtkNotUsed(argv)[])
return 0;
}
catch(vtkstd::exception& e)
catch(std::exception& e)
{
cerr << e.what() << endl;
return 1;
......
......@@ -158,7 +158,7 @@ NestedTestOuter::~NestedTestOuter()
// Fails on kulu.crd IRIX64-6.5-CC-o32 (old SGI compiler).
void UsingStdVector()
{
using vtkstd::vector;
using std::vector;
vector<int>();
}
#endif
......
......@@ -9,7 +9,7 @@
#include "vtkMath.h"
#include "vtkMathConfigure.h"
#include <vtkstd/limits>
#include <limits>
#ifndef ABS
#define ABS(x) ((x) < 0 ? -(x) : (x))
......@@ -24,7 +24,7 @@ bool fuzzyCompare1DWeak(A a, A b)
template<class A>
bool fuzzyCompare1D(A a, A b)
{
return ABS(a - b) < vtkstd::numeric_limits<A>::epsilon();
return ABS(a - b) < std::numeric_limits<A>::epsilon();
}
template<class A>
......
......@@ -18,12 +18,12 @@
#include "vtkObjectFactory.h"
#include "vtkSmartPointer.h"
#include <vtkstd/map>
#include <map>
class vtkHandler : public vtkObject
{
public:
static vtkstd::map<int, int> EventCounts;
static std::map<int, int> EventCounts;
static int VoidEventCounts;
public:
static vtkHandler* New();
......@@ -38,12 +38,12 @@ public:
vtkStandardNewMacro(vtkHandler);
int vtkHandler::VoidEventCounts = 0;
vtkstd::map<int, int> vtkHandler::EventCounts;
std::map<int, int> vtkHandler::EventCounts;
class OtherHandler
{
public:
static vtkstd::map<int, int> EventCounts;
static std::map<int, int> EventCounts;
static int VoidEventCounts;
public:
void VoidCallback() { this->VoidEventCounts++; }
......@@ -54,7 +54,7 @@ public:
};
int OtherHandler::VoidEventCounts = 0;
vtkstd::map<int, int> OtherHandler::EventCounts;
std::map<int, int> OtherHandler::EventCounts;
int TestObservers(int, char*[])
{
......
......@@ -17,7 +17,7 @@
#include "vtkPlane.h"
#include "vtkSmartPointer.h"
#include <vtkstd/limits>
#include <limits>
#ifndef ABS
#define ABS(x) ((x) < 0 ? -(x) : (x))
......@@ -26,7 +26,7 @@
template<class A>
bool fuzzyCompare1D(A a