Template Struct type_caster< Karana::Core::Var< T, quantity > >#
Defined in File pybind11Utils.h
Inheritance Relationships#
Base Type#
public type_caster_base< Karana::Core::Var< T, quantity > >
Struct Documentation#
-
template<typename T, Karana::Math::Quantity quantity>
struct type_caster<Karana::Core::Var<T, quantity>> : public type_caster_base<Karana::Core::Var<T, quantity>># Describe a quantity Var while inheriting native class conversions.
- Template Parameters:
T – Numeric magnitude type.
quantity – Native Math quantity identifier.
Public Static Functions
-
static inline handle cast(const Karana::Core::Var<T, quantity> *value, return_value_policy policy, handle parent)#
Cast a quantity pointer and resolve its unit specification.
- Parameters:
value – Native quantity Var.
policy – Python ownership policy.
parent – Parent Python object for reference policies.
- Returns:
Python instance with resolved units.
-
static inline handle cast(const Karana::Core::Var<T, quantity> &value, return_value_policy policy, handle parent)#
Cast a referenced Var using the pointer conversion path.
- Parameters:
value – Native Var reference.
policy – Python ownership policy.
parent – Parent Python object for reference policies.
- Returns:
Python instance preserving dynamic type and resolved units.
Public Static Attributes
-
static auto name =
[]() {if constexpr (quantity ==Karana::Math::Quantity::none)return const_name("Karana.Core.Var[") + varValueTypeName<T>() + const_name("]");elsereturn const_name("Karana.Core.Var[") +const_name(Karana::Math::QuantityTag<quantity>::pythonTypeName) +const_name("[") +varValueTypeName<T>() + const_name("]]");}()# Public quantity-aware generic annotation.