VTK  9.7.1
vtkWebGPUShaderDatabase.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
22 #ifndef vtkWebGPUShaderDatabase_h
23 #define vtkWebGPUShaderDatabase_h
24 
25 #include "vtkObject.h"
26 
27 #include "vtkRenderingWebGPUModule.h" // for export macro
28 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
29 
30 #include <memory> // for unique_ptr
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 
34 class VTKRENDERINGWEBGPU_EXPORT VTK_MARSHALAUTO vtkWebGPUShaderDatabase : public vtkObject
35 {
36 public:
37  static vtkWebGPUShaderDatabase* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
45  void AddShaderSource(const std::string& key, const std::string& source);
46 
50  std::string GetShaderSource(const std::string& key) const;
51 
55  void RemoveShaderSource(const std::string& key);
56 
57 protected:
59  ~vtkWebGPUShaderDatabase() override;
60 
61 private:
63  void operator=(const vtkWebGPUShaderDatabase&) = delete;
64 
65  class vtkInternals;
66  std::unique_ptr<vtkInternals> Internals;
67 };
68 
69 VTK_ABI_NAMESPACE_END
70 
71 #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
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Class to add and retrieve source code for shader files for a specified key.
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...