// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov #include #include #include #include #include #include #include #include #define VTK_CREATE(type, name) vtkSmartPointer name = vtkSmartPointer::New() #define test_expression(expression) \ { \ if (!(expression)) \ { \ std::ostringstream buffer; \ buffer << "Expression failed at line " << __LINE__ << ": " << #expression; \ throw std::runtime_error(buffer.str()); \ } \ } class DowncastTest { public: DowncastTest(int& count) : Count(count) { } template void operator()(T* vtkNotUsed(array)) const { ++Count; } int& Count; private: DowncastTest& operator=(const DowncastTest&); }; template