vtk-m2/vtkm/filter/FilterTraits.h

50 lines
1.3 KiB
C
Raw Normal View History

2016-01-19 14:59:31 +00:00
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
2019-04-15 23:24:21 +00:00
//
2016-01-19 14:59:31 +00:00
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#ifndef vtk_m_filter_FilterTraits_h
#define vtk_m_filter_FilterTraits_h
#include <vtkm/List.h>
2016-01-19 14:59:31 +00:00
2017-05-18 14:29:41 +00:00
namespace vtkm
{
namespace filter
{
template <typename Derived>
class Filter;
template <typename Filter>
struct FilterTraits
2016-01-19 14:59:31 +00:00
{
using InputFieldTypeList = typename Filter::SupportedTypes;
using AdditionalFieldStorage = typename Filter::AdditionalFieldStorage;
};
template <typename DerivedPolicy, typename ListOfTypes>
struct DeduceFilterFieldTypes
{
using PList = typename DerivedPolicy::FieldTypeList;
using TypeList = vtkm::ListIntersect<ListOfTypes, PList>;
2016-01-19 14:59:31 +00:00
};
template <typename DerivedPolicy, typename ListOfStorage>
struct DeduceFilterFieldStorage
{
using PList = typename DerivedPolicy::StorageList;
using StorageList = vtkm::ListAppend<ListOfStorage, PList>;
};
2016-01-19 14:59:31 +00:00
}
}
#endif //vtk_m_filter_FilterTraits_h