VTK  9.1.0
vtkResourceFileLocator.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkResourceFileLocator.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm 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=========================================================================*/
32#ifndef vtkResourceFileLocator_h
33#define vtkResourceFileLocator_h
34
35#include "vtkCommonMiscModule.h" // For export macro
36#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_0_0
37#include "vtkObject.h"
38
39#include <string> // needed for std::string
40#include <vector> // needed for std::vector
41
42class VTKCOMMONMISC_EXPORT vtkResourceFileLocator : public vtkObject
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
58 VTK_DEPRECATED_IN_9_0_0("Use vtkResourceFileLocator::SetLogVerbosity")
59 void SetPrintDebugInformation(bool);
61 bool GetPrintDebugInformation();
63 void PrintDebugInformationOn();
65 void PrintDebugInformationOff();
67
69
73 vtkSetMacro(LogVerbosity, int);
74 vtkGetMacro(LogVerbosity, int);
76
78
83 virtual std::string Locate(const std::string& anchor, const std::string& landmark,
84 const std::string& defaultDir = std::string());
86
88
96 virtual std::string Locate(const std::string& anchor,
97 const std::vector<std::string>& landmark_prefixes, const std::string& landmark,
98 const std::string& defaultDir = std::string());
100
102
110 static VTK_FILEPATH std::string GetLibraryPathForSymbolUnix(const char* symbolname);
111 static VTK_FILEPATH std::string GetLibraryPathForSymbolWin32(const void* fptr);
113
114protected:
117
118private:
120 void operator=(const vtkResourceFileLocator&) = delete;
121
122 int LogVerbosity;
123};
124
125#if defined(_WIN32) && !defined(__CYGWIN__)
126#define vtkGetLibraryPathForSymbol(function) \
127 vtkResourceFileLocator::GetLibraryPathForSymbolWin32(reinterpret_cast<const void*>(&function))
128#else
129#define vtkGetLibraryPathForSymbol(function) \
130 vtkResourceFileLocator::GetLibraryPathForSymbolUnix(#function)
131#endif
132
133#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
utility to locate resource files.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkResourceFileLocator * New()
@ vector
Definition: vtkX3D.h:243
#define VTK_DEPRECATED_IN_9_0_0(reason)
#define VTK_FILEPATH