2 #if defined(MTAO_DEBUG_MESH_COMP)
3 #include <spdlog/spdlog.h>
42 variant<char, int64_t, double, wmtk::Rational, std::tuple<char, wmtk::Rational, double>>;
46 template <HeldType Type>
49 template <HeldType Type>
79 #if defined(MTAO_DEBUG_MESH_COMP)
81 [&](
const auto& h,
const auto& oh) {
103 template <
typename T>
108 template <
typename T>
117 template <typename T>
152 std::string
name()
const;
160 template <
typename T>
164 return as_from_held_type<held_type_from_primitive<T>()>();
168 template <
typename T>
171 return holds_from_held_type<held_type_from_primitive<T>()>();
175 template <
typename T>
178 constexpr
static bool value =
false;
180 template <
typename T>
187 template <
typename T>
196 [](
const auto& h) noexcept ->
bool {
201 template <MeshAttributeHandle::HeldType Type>
204 return std::get<held_handle_type<Type>>(
m_handle);
207 template <MeshAttributeHandle::HeldType Type>
210 return std::holds_alternative<held_handle_type<Type>>(
m_handle);
213 template <
typename T>
216 return held_type_from_handle<TypedAttributeHandle<T>>();
218 template <
typename T>
221 return attribute_type_enum_from_type<typename T::Type>();
226 return std::visit([](
const auto& h) {
return h.primitive_type(); },
m_handle);
228 template <
typename T>
231 return std::get<T>(
m_handle).primitive_type();
typename held_handle_type< Type >::Type held_primitive_type
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
constexpr static HeldType held_type_from_handle()
PrimitiveType primitive_typeT() const
MeshAttributeHandle(MeshAttributeHandle &&o)=default
std::variant_alternative_t< size_t(Type), HandleVariant > held_handle_type
bool is_same_mesh(const Mesh &) const
constexpr static bool handle_type_is_basic()
auto as() const -> const held_handle_type< held_type_from_primitive< T >()> &
constexpr static HeldType held_type_from_primitive()
MeshAttributeHandle()=default
std::variant< char, int64_t, double, wmtk::Rational, std::tuple< char, wmtk::Rational, double > > ValueVariant
auto as_from_held_type() const -> const held_handle_type< Type > &
PrimitiveType primitive_type() const
MeshAttributeHandle(const MeshAttributeHandle &o)=default
MeshAttributeHandle & operator=(const MeshAttributeHandle &o)=default
bool operator==(const MeshAttributeHandle &o) const
bool holds_from_held_type() const
MeshAttributeHandle & operator=(MeshAttributeHandle &&o)=default
constexpr static bool value