VTK  9.3.0
vtkCellGridResponder.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
10 #ifndef vtkCellGridResponder_h
11 #define vtkCellGridResponder_h
12 
14 
15 VTK_ABI_NAMESPACE_BEGIN
16 template <typename QueryClass>
18 {
19 public:
21  void PrintSelf(ostream& os, vtkIndent indent) override
22  {
23  this->Superclass::PrintSelf(os, indent);
24  }
25 
27  vtkCellGridQuery* query, vtkCellMetadata* cellType, vtkCellGridResponders* caches) override
28  {
29  auto* qq = dynamic_cast<QueryClass*>(query);
30  if (qq)
31  {
32  return this->Query(qq, cellType, caches);
33  }
34  return false;
35  }
36 
37  virtual bool Query(
38  QueryClass* query, vtkCellMetadata* cellType, vtkCellGridResponders* caches) = 0;
39 
40 protected:
41  vtkCellGridResponder() = default;
42  ~vtkCellGridResponder() override = default;
43 
44 private:
46  void operator=(const vtkCellGridResponder&) = delete;
47 };
48 
49 VTK_ABI_NAMESPACE_END
50 #endif // vtkCellGridResponder_h
51 // VTK-HeaderTest-Exclude: vtkCellGridResponder.h
Perform an operation on cells in a vtkCellMetadata instance.
Respond to a query on one particular type of cell.
Respond to a query on one particular type of cell.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkCellGridResponder() override=default
vtkCellGridResponder()=default
virtual bool Query(QueryClass *query, vtkCellMetadata *cellType, vtkCellGridResponders *caches)=0
bool EvaluateQuery(vtkCellGridQuery *query, vtkCellMetadata *cellType, vtkCellGridResponders *caches) override
Respond to the query for cells of cellType, possibly using caches.
A container that holds objects able to respond to queries specialized for particular vtkCellMetadata ...
Metadata for a particular type of cell (finite element).
a simple class to control print indentation
Definition: vtkIndent.h:29
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_ALWAYS_EXPORT
Definition: vtkCompiler.h:65