VTK-m  2.0
ControlSignatureTagBase.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 #ifndef vtk_m_cont_arg_ControlSignatureTagBase_h
11 #define vtk_m_cont_arg_ControlSignatureTagBase_h
12 
13 #include <vtkm/StaticAssert.h>
15 
16 #include <type_traits>
17 
18 namespace vtkm
19 {
20 namespace cont
21 {
22 namespace arg
23 {
24 
37 {
38 };
39 
40 namespace internal
41 {
42 
43 template <typename ControlSignatureTag>
44 struct ControlSignatureTagCheck
45 {
46  static constexpr bool Valid =
47  std::is_base_of<vtkm::cont::arg::ControlSignatureTagBase, ControlSignatureTag>::value;
48 };
49 
50 } // namespace internal
51 
57 #define VTKM_IS_CONTROL_SIGNATURE_TAG(tag) \
58  VTKM_STATIC_ASSERT_MSG(::vtkm::cont::arg::internal::ControlSignatureTagCheck<tag>::Valid, \
59  "Provided a type that is not a valid ControlSignature tag.")
60 }
61 }
62 } // namespace vtkm::cont::arg
63 
64 #endif //vtk_m_cont_arg_ControlSignatureTagBase_h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
ExportMacros.h
vtkm::cont::arg::ControlSignatureTagBase
The base class for all tags used in a ControlSignature.
Definition: ControlSignatureTagBase.h:36
StaticAssert.h