vtkPVTestUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVTestUtilities.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef vtkPVTestUtilities_h
23 #define vtkPVTestUtilities_h
24 
25 #include "vtkObject.h"
26 #include "vtkPVVTKExtensionsCoreModule.h" // needed for export macro
27 
28 class vtkPolyData;
29 class vtkDataArray;
30 
32 {
33 public:
34  // the usual vtk stuff
35  vtkTypeMacro(vtkPVTestUtilities, vtkObject);
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37  static vtkPVTestUtilities* New();
38 
42  void Initialize(int argc, char** argv);
51  char* GetDataFilePath(const char* name) { return this->GetFilePath(this->DataRoot, name); }
60  char* GetTempFilePath(const char* name) { return this->GetFilePath(this->TempRoot, name); }
61 
62 protected:
63  vtkPVTestUtilities() { this->Initialize(0, 0); }
64  ~vtkPVTestUtilities() override { this->Initialize(0, 0); }
65 
66 private:
67  vtkPVTestUtilities(const vtkPVTestUtilities&) = delete;
68  void operator=(const vtkPVTestUtilities&) = delete;
70  char GetPathSep();
71  char* GetDataRoot();
72  char* GetTempRoot();
73  char* GetCommandTailArgument(const char* tag);
74  char* GetFilePath(const char* base, const char* name);
75  //
76  int Argc;
77  char** Argv;
78  char* DataRoot;
79  char* TempRoot;
80 };
81 
82 #endif
~vtkPVTestUtilities() override
#define VTKPVVTKEXTENSIONSCORE_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
name
char * GetTempFilePath(const char *name)
Given a path relative to the working directory (provided in argv by -T option), construct a OS indepe...
A class to facilitate common test operations.
char * GetDataFilePath(const char *name)
Given a path relative to the Data root (provided in argv by -D option), construct a OS independent pa...
static vtkObject * New()
void operator=(const vtkObjectBase &)