VTK  9.7.1
vtkCellTypeUtilities.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
12 #ifndef vtkCellTypeUtilities_h
13 #define vtkCellTypeUtilities_h
14 
15 #include "vtkCommonDataModelModule.h" // For export macro
16 #include "vtkObject.h"
17 
18 #include <string>
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 
22 class VTKCOMMONDATAMODEL_EXPORT vtkCellTypeUtilities : public vtkObject
23 {
24 public:
25  static vtkCellTypeUtilities* New();
26 
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
34  static std::string GetTypeAsString(int typeId);
35 
40  static int GetTypeIdFromName(const std::string& name);
41 
46  static const char* GetClassNameFromTypeId(int typeId);
47 
52  static int GetTypeIdFromClassName(const char* classname);
53 
60  static int IsLinear(unsigned char type);
61 
65  static int GetDimension(unsigned char type);
66 
67 protected:
68  vtkCellTypeUtilities() = default;
69  ~vtkCellTypeUtilities() override = default;
70 
71 private:
73  void operator=(const vtkCellTypeUtilities&) = delete;
74 };
75 
76 VTK_ABI_NAMESPACE_END
77 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkCellTypeUtilities is a collection of methods for cell type lookup.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...