ENH: change vtk::Tools from a class to a namespace

- allows localized extension of functionality
This commit is contained in:
Mark Olesen
2019-01-31 13:43:18 +01:00
parent acc66c217b
commit fe21c9c327
3 changed files with 43 additions and 35 deletions

View File

@ -21,7 +21,7 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Namespace
Foam::vtk::Tools
Description
@ -50,19 +50,26 @@ SourceFiles
#include "symmTensor.H"
// VTK includes
#include <vtkCellArray.h>
#include <vtkFloatArray.h>
#include <vtkDoubleArray.h>
#include <vtkIdTypeArray.h>
#include <vtkSmartPointer.h>
#include <vtkUnsignedCharArray.h>
#include <vtkPoints.h>
#include <vtkPolyData.h>
#include "vtkCellArray.h"
#include "vtkFloatArray.h"
#include "vtkDoubleArray.h"
#include "vtkIdTypeArray.h"
#include "vtkSmartPointer.h"
#include "vtkUnsignedCharArray.h"
#include "vtkPoints.h"
#include "vtkPolyData.h"
#include <utility>
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Forward declarations
class vtkDataSet;
class vtkCellData;
class vtkPointData;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace vtk
@ -72,7 +79,6 @@ namespace vtk
Class vtk::Caching Declaration
\*---------------------------------------------------------------------------*/
//- Bookkeeping for internal caching.
// Retain an original copy of the geometry as well as a shallow copy
// with the output fields.
@ -158,13 +164,11 @@ struct Caching
/*---------------------------------------------------------------------------*\
Class vtk::Tools Declaration
Namespace vtk::Tools
\*---------------------------------------------------------------------------*/
class Tools
namespace Tools
{
public:
//- Wrap vtkUnsignedCharArray as a UList
inline static UList<uint8_t> asUList
(