Commit Graph

10 Commits

Author SHA1 Message Date
Kenneth Moreland
c238cfea50 Improve deprecation support for moved or renamed headers
VTK-m has a deprecation method that supports API changes in minor
releases. When an API change is made, the old API is marked with the
VTKM_DEPRECATED macro. If code attempts to use the old API, it still
works, but the compiler issues a warning that the thing is deprecated
and where to find the new API.

We have recently run into an issue when the API changes have a header
file renamed or moved. We still keep the old header file with the old
API, so code including that file will still work. However, sometimes
code expected the contents of that header file without directly
including that header file. In these cases, the code could get an error
about missing classes.

As an example, consider the change from `DynamicCellSet` to
`UnknownCellSet`/`UncertainCellSet`. The deprecated `DynamicCellSet` is
still around. But there is a lot of code that did not directly include
DynamicCellSet.h. This header file was necessarily included by
DataSet.h. Now, when this code uses `vtkm::cont::DynamicCellSet`, you
get a confusing error that the class does not exist. Backward
compatibility broken.

In response to this, we should be more careful about where we put the
deprecated API. Instead of containing the deprecated API, moved headers
should be empty except for a warning and an inclusion of the new header
file. The deprecated API should be moved to the new header file. For
example, in the case of `DynamicCellSet`, the implementation for the
deprecated `DynamicCellSet` is moved to UnknownCellSet.h, which is
included by anything that was including DynamicCellSet.h before.
2022-02-16 07:08:05 -07:00
Li-Ta Lo
77650a9ca0 migrate connected components filters 2022-01-16 12:15:03 -07:00
Kenneth Moreland
cd302effb3 Update lists in TypeListTag.h
A new header named TypeList.h and the type lists have been redefined in
this new file. All the types have been renamed from `TypeListTag*` to
`TypeList*`. TypeListTag.h has been gutted to provide deprecated
versions of the old type list names.

There were also some other type lists that were changed from using the
old `ListTagBase` to the new `List`.
2019-12-05 11:05:19 -07:00
Robert Maynard
25fb666df9 CellSetConnectivity now inherits from FilterDataSet
Fixes #409
2019-09-30 08:50:40 -04:00
Robert Maynard
cec717015a CreateResult is now part of vtkm::filter instead of being inside internals 2019-08-09 12:44:43 -04:00
Robert Maynard
3a7d3cb5ff VTK-m filters now launch all worklets via a vtkm::cont::Invoker
This has been done as to showcase the recommend best practices
for new VTK-m contributors.
2019-08-09 10:37:35 -04:00
Robert Maynard
d7b2ff04c9 Provide a simpler way to restrict value types for filters 2019-08-06 17:04:07 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Kenneth Moreland
d25db19c87 Fix inconsistencies in connected components filters
The connected components filters had some simple issues that were
inconsistent with the operation of other filters.

  * Set the output to the OutputFieldName defined in the filter rather
    than hardcoding it to "component". The default value is still
    "component", but now you can change it.
  * Make sure the output field association is correct. The field
    association for CellSetConnectivity is always cell and the field
    association for ImageConnectivity is always point.
  * Check that the field association for the input field of
    ImageConnectivity is point. The filter will fail if it is not.
  * Make both filters inherit from FilterCell instead of FilterField.
    The superclasses are similar but the latter allows the user to set the
    active cell set correctly.
  * Properly get the cell set specified by GetActiveCellSetIndex.
    Previously it was set to the active coordinates, which is wrong.
2019-03-28 18:35:46 -06:00
Li-Ta Lo
d185ca7ed7 add CellSetConnectivity filter 2019-02-28 09:11:08 -07:00