VTK  9.2.20230330
vtkRangeIterableTraits.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRangeIterableTraits.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 =========================================================================*/
15 
16 #ifndef vtkRangeIterableTraits_h
17 #define vtkRangeIterableTraits_h
18 
19 #include "vtkABINamespace.h"
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkCollection;
24 class vtkDataObjectTree;
25 VTK_ABI_NAMESPACE_END
26 
27 namespace vtk
28 {
29 namespace detail
30 {
31 VTK_ABI_NAMESPACE_BEGIN
32 
33 template <typename CollectionType>
34 struct CollectionRange;
35 
36 struct CompositeDataSetRange;
37 struct DataObjectTreeRange;
38 
39 //------------------------------------------------------------------------------
40 // DeduceRangeType:
41 // These function signatures define a mapping from an Iterable (e.g. vtkObject)
42 // to a RangeType (e.g. the for-range iterable object).
43 // They are not implemented, as only the signatures are important. Classes used
44 // should only be forward declared in this header.
45 // Since classes are only forward declared, the argument type should be const&
46 // qualified, and the return type should be a reference.
47 
48 // vtkCollection subclasses --> CollectionRange
49 template <typename CollectionType,
52 
53 // vtkCompositeDataSet --> CompositeDataSetRange
55 
56 // vtkDataObjectTree --> DataObjectTreeRange
58 
59 // Traits class that defines a RangeType corresponding to the iterable range
60 // type most appropriate for Iterable.
61 template <typename Iterable>
63 {
64 private:
65  using RangeTypeInternal = decltype(vtk::detail::DeduceRangeType(std::declval<Iterable>()));
66 
67 public:
69 };
70 
71 VTK_ABI_NAMESPACE_END
72 }
73 }
74 
75 #endif // vtkRangeIterableTraits_h
76 
77 // VTK-HeaderTest-Exclude: vtkRangeIterableTraits.h
create and manipulate ordered lists of objects
Definition: vtkCollection.h:57
abstract superclass for composite (multi-block or AMR) datasets
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
@ value
Definition: vtkX3D.h:232
@ type
Definition: vtkX3D.h:528
CollectionRange< CollectionType > & DeduceRangeType(const CollectionType &)
Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.
typename std::decay< RangeTypeInternal >::type RangeType