ParaView
vtkSMCoreUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMCoreUtilities.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 vtkSMCoreUtilities_h
23 #define vtkSMCoreUtilities_h
24 
25 #include "vtkObject.h"
26 #include "vtkPVServerManagerCoreModule.h" //needed for exports
27 #include "vtkStdString.h" // needed for vtkStdString.
28 
29 class vtkSMProxy;
30 
31 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMCoreUtilities : public vtkObject
32 {
33 public:
34  static vtkSMCoreUtilities* New();
35  vtkTypeMacro(vtkSMCoreUtilities, vtkObject);
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
43  static const char* GetFileNameProperty(vtkSMProxy*);
44 
48  static vtkStdString SanitizeName(const char*);
49 
51 
55  static bool AdjustRangeForLog(double range[2]);
56  static bool AdjustRangeForLog(double& rmin, double& rmax)
57  {
58  double range[2] = { rmin, rmax };
59  bool retVal = vtkSMCoreUtilities::AdjustRangeForLog(range);
60  rmin = range[0];
61  rmax = range[1];
62  return retVal;
63  }
65 
67 
74  static bool AdjustRange(double range[2]);
75  static bool AdjustRange(double& rmin, double& rmax)
76  {
77  double range[2] = { rmin, rmax };
78  bool retVal = vtkSMCoreUtilities::AdjustRange(range);
79  rmin = range[0];
80  rmax = range[1];
81  return retVal;
82  }
84 
85 protected:
88 
89 private:
90  vtkSMCoreUtilities(const vtkSMCoreUtilities&) VTK_DELETE_FUNCTION;
91  void operator=(const vtkSMCoreUtilities&) VTK_DELETE_FUNCTION;
92 };
93 
94 #endif
static bool AdjustRange(double range[2])
Given a range, adjusts it so that it is a valid range i.e.
collection of utilities.
static bool AdjustRangeForLog(double range[2])
Given a range, converts it to be a valid range to switch to log space.
static bool AdjustRangeForLog(double &rmin, double &rmax)
Given a range, converts it to be a valid range to switch to log space.
static bool AdjustRange(double &rmin, double &rmax)
Given a range, adjusts it so that it is a valid range i.e.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152