vtk-m/vtkm/filter/FilterTraits.h
Kenneth Moreland 8b133288ce Fix deprecation warnings
There was an error that caused deprecation warnings in VTK-m to be
suppressed, which meant that many uses of deprecated features went
unnoticed. This fixes those deprecation warnings.

The majority of the warnings were caused by the use of the deprecated
`Cast`, `CopyTo`, and `ResetTypes` methods of `UnknownArrayHandle` (or
`VariantArrayHandle`). Both `Cast` and `CopyTo` have been subsumed by
`AsArrayHandle` (to make the functionality more clear). `ResetTypes` now
requires a second template argument to define the storage types to try.

Also fixed some issues with `SerializableField` being deprecated.
This class is no longer necessary because `Field` can now be directly
serialized.
2021-01-26 07:56:39 -07:00

50 lines
1.3 KiB
C++

//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// 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>
namespace vtkm
{
namespace filter
{
template <typename Derived>
class Filter;
template <typename Filter>
struct FilterTraits
{
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>;
};
template <typename DerivedPolicy, typename ListOfStorage>
struct DeduceFilterFieldStorage
{
using PList = typename DerivedPolicy::StorageList;
using StorageList = vtkm::ListAppend<ListOfStorage, PList>;
};
}
}
#endif //vtk_m_filter_FilterTraits_h