17template <
typename T,
typename MeshType,
typename AttributeType_,
int Dim>
42 variant<char, int64_t, double, wmtk::Rational, std::tuple<char, wmtk::Rational, double>>;
46 template <HeldType Type>
49 template <HeldType Type>
106 template <typename T>
131 template <
typename T,
int Dim = Eigen::Dynamic,
typename MeshType = Mesh>
133 template <
typename T,
int Dim = Eigen::Dynamic,
typename MeshType = Mesh>
139 std::string
name()
const;
151 return as_from_held_type<held_type_from_primitive<T>()>();
158 return holds_from_held_type<held_type_from_primitive<T>()>();
165 constexpr static bool value =
false;
183 [](
const auto& h)
noexcept ->
bool {
188template <MeshAttributeHandle::HeldType Type>
191 return std::get<held_handle_type<Type>>(
m_handle);
194template <MeshAttributeHandle::HeldType Type>
197 return std::holds_alternative<held_handle_type<Type>>(
m_handle);
203 return held_type_from_handle<TypedAttributeHandle<T>>();
208 return attribute_type_enum_from_type<typename T::Type>();
213 return std::visit([](
const auto& h) {
return h.primitive_type(); },
m_handle);
218 return std::get<T>(
m_handle).primitive_type();
221template <
typename T,
int Dim,
typename MeshType>
227template <
typename T,
int Dim,
typename MeshType>
An Accessor that uses tuples for accessing attributes instead of indices.
typename held_handle_type< Type >::Type held_primitive_type
static constexpr HeldType held_type_from_handle()
const HandleVariant & handle() const
HeldType held_type() const
bool holds_basic_type() const
int64_t dimension() const
std::variant< TypedAttributeHandle< char >, TypedAttributeHandle< int64_t >, TypedAttributeHandle< double >, TypedAttributeHandle< wmtk::Rational > > HandleVariant
PrimitiveType primitive_typeT() const
MeshAttributeHandle & operator=(MeshAttributeHandle &&o)=default
MeshAttributeHandle(MeshAttributeHandle &&o)=default
std::variant_alternative_t< size_t(Type), HandleVariant > held_handle_type
bool is_same_mesh(const Mesh &) const
const Accessor< T, MeshType, CachingAttribute< T >, Dim > create_const_accessor() const
static constexpr HeldType held_type_from_primitive()
Accessor< T, MeshType, CachingAttribute< T >, Dim > create_accessor() const
auto as() const -> const held_handle_type< held_type_from_primitive< T >()> &
static constexpr bool handle_type_is_basic()
MeshAttributeHandle & operator=(const MeshAttributeHandle &o)=default
MeshAttributeHandle()=default
std::variant< char, int64_t, double, wmtk::Rational, std::tuple< char, wmtk::Rational, double > > ValueVariant
bool is_valid() const
Returns true if handle was initialized.
auto as_from_held_type() const -> const held_handle_type< Type > &
PrimitiveType primitive_type() const
MeshAttributeHandle(const MeshAttributeHandle &o)=default
bool operator==(const MeshAttributeHandle &o) const
bool holds_from_held_type() const
Handle that represents attributes for some mesh.
static constexpr bool value