An update will be applied January 25th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit 5180d6a7 authored by Robert Maynard's avatar Robert Maynard
Browse files

DynamicCellSet has the same free function support as VariantArrayHandle

parent 8f545662
......@@ -272,6 +272,27 @@ private:
friend struct detail::DynamicCellSetCopyHelper;
};
//=============================================================================
// Free function casting helpers
/// Returns true if \c dynamicCellSet matches the type of CellSetType.
///
template <typename CellSetType, typename Ts>
VTKM_CONT inline bool IsType(const vtkm::cont::DynamicCellSetBase<Ts>& dynamicCellSet)
{
return dynamicCellSet.template IsType<CellSetType>();
}
/// Returns \c dynamicCellSet cast to the given \c CellSet type. Throws \c
/// ErrorBadType if the cast does not work. Use \c IsType
/// to check if the cast can happen.
///
template <typename CellSetType, typename Ts>
VTKM_CONT inline CellSetType Cast(const vtkm::cont::DynamicCellSetBase<Ts>& dynamicCellSet)
{
return dynamicCellSet.template Cast<CellSetType>();
}
namespace detail
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment