38#ifndef FPFITTER_SUBTYPES_HPP_INCLUDED
39#define FPFITTER_SUBTYPES_HPP_INCLUDED
110inline std::optional<fpFitterVariant>
112 if (handle.cptr ==
nullptr)
return std::nullopt;
113 if (class_name ==
nullptr) {
114 throw std::runtime_error(
115 "wrap_fitpack_fitter: handle non-null but class_name null "
116 "(generator bug: select_type fanout missed an arm).");
118 if (std::strcmp(class_name,
"fitpack_periodic_curve") == 0)
120 *
reinterpret_cast<fitpack_periodic_curve_c*
>(&handle),
122 if (std::strcmp(class_name,
"fitpack_convex_curve") == 0)
124 *
reinterpret_cast<fitpack_convex_curve_c*
>(&handle),
126 if (std::strcmp(class_name,
"fitpack_curve") == 0)
128 *
reinterpret_cast<fitpack_curve_c*
>(&handle),
130 if (std::strcmp(class_name,
"fitpack_closed_curve") == 0)
132 *
reinterpret_cast<fitpack_closed_curve_c*
>(&handle),
134 if (std::strcmp(class_name,
"fitpack_constrained_curve") == 0)
136 *
reinterpret_cast<fitpack_constrained_curve_c*
>(&handle),
138 if (std::strcmp(class_name,
"fitpack_parametric_curve") == 0)
140 *
reinterpret_cast<fitpack_parametric_curve_c*
>(&handle),
142 if (std::strcmp(class_name,
"fitpack_surface") == 0)
144 *
reinterpret_cast<fitpack_surface_c*
>(&handle),
146 if (std::strcmp(class_name,
"fitpack_grid_surface") == 0)
148 *
reinterpret_cast<fitpack_grid_surface_c*
>(&handle),
150 if (std::strcmp(class_name,
"fitpack_gridded_spline") == 0)
152 *
reinterpret_cast<fitpack_gridded_spline_c*
>(&handle),
154 if (std::strcmp(class_name,
"fitpack_parametric_surface") == 0)
156 *
reinterpret_cast<fitpack_parametric_surface_c*
>(&handle),
158 if (std::strcmp(class_name,
"fitpack_polar") == 0)
160 *
reinterpret_cast<fitpack_polar_c*
>(&handle),
162 if (std::strcmp(class_name,
"fitpack_grid_polar") == 0)
164 *
reinterpret_cast<fitpack_grid_polar_c*
>(&handle),
166 if (std::strcmp(class_name,
"fitpack_sphere") == 0)
168 *
reinterpret_cast<fitpack_sphere_c*
>(&handle),
170 if (std::strcmp(class_name,
"fitpack_grid_sphere") == 0)
172 *
reinterpret_cast<fitpack_grid_sphere_c*
>(&handle),
174 throw std::runtime_error(
175 std::string(
"wrap_fitpack_fitter: unbound dynamic type '") +
176 class_name +
"' (regenerate bindings).");
Standalone C++ RAII wrapper for Fortran fitpack_closed_curve.
Definition fpClosedCurve.hpp:54
Standalone C++ RAII wrapper for Fortran fitpack_constrained_curve.
Definition fpConstrainedCurve.hpp:55
Standalone C++ RAII wrapper for Fortran fitpack_convex_curve.
Definition fpConvexCurve.hpp:54
Standalone C++ RAII wrapper for Fortran fitpack_curve.
Definition fpCurve.hpp:56
Standalone C++ RAII wrapper for Fortran fitpack_grid_polar.
Definition fpGridPolar.hpp:55
Standalone C++ RAII wrapper for Fortran fitpack_grid_sphere.
Definition fpGridSphere.hpp:55
Standalone C++ RAII wrapper for Fortran fitpack_gridded_spline.
Definition fpGridSpline.hpp:56
Standalone C++ RAII wrapper for Fortran fitpack_grid_surface.
Definition fpGridSurface.hpp:56
Standalone C++ RAII wrapper for Fortran fitpack_parametric_curve.
Definition fpParametricCurve.hpp:56
Standalone C++ RAII wrapper for Fortran fitpack_parametric_surface.
Definition fpParametricSurface.hpp:55
Standalone C++ RAII wrapper for Fortran fitpack_periodic_curve.
Definition fpPeriodicCurve.hpp:54
Standalone C++ RAII wrapper for Fortran fitpack_polar.
Definition fpPolar.hpp:55
Standalone C++ RAII wrapper for Fortran fitpack_sphere.
Definition fpSphere.hpp:55
Standalone C++ RAII wrapper for Fortran fitpack_surface.
Definition fpSurface.hpp:56
std::optional< fpFitterVariant > wrap_fitpack_fitter(fitpack_fitter_c handle, const char *class_name)
Resolve a (handle, class_name) pair into the right concrete variant alternative.
Definition fpFitter_subtypes.hpp:111
std::variant< fpPeriodicCurve, fpConvexCurve, fpCurve, fpClosedCurve, fpConstrainedCurve, fpParametricCurve, fpSurface, fpGridSurface, fpGridSpline, fpParametricSurface, fpPolar, fpGridPolar, fpSphere, fpGridSphere > fpFitterVariant
Variant of bound concrete subtypes of class(fitpack_fitter).
Definition fpFitter_subtypes.hpp:71
Tag type for non-owning view constructors of polymorphic concrete subtypes. Declared on roots and abs...
Definition fpFitter.hpp:103