fitpack
Modern Fortran library for curve and surface fitting with splines
Loading...
Searching...
No Matches
fpFitter_subtypes.hpp File Reference
#include "fpFitter.hpp"
#include "fpPeriodicCurve.hpp"
#include "fpConvexCurve.hpp"
#include "fpCurve.hpp"
#include "fpClosedCurve.hpp"
#include "fpConstrainedCurve.hpp"
#include "fpParametricCurve.hpp"
#include "fpSurface.hpp"
#include "fpGridSurface.hpp"
#include "fpGridSpline.hpp"
#include "fpParametricSurface.hpp"
#include "fpPolar.hpp"
#include "fpGridPolar.hpp"
#include "fpSphere.hpp"
#include "fpGridSphere.hpp"
#include <variant>
#include <optional>
#include <stdexcept>
#include <string>
#include <cstring>
Include dependency graph for fpFitter_subtypes.hpp:

Go to the source code of this file.

Typedefs

using fpFitterVariant
 Variant of bound concrete subtypes of class(fitpack_fitter).
 

Functions

std::optional< fpFitterVariantwrap_fitpack_fitter (fitpack_fitter_c handle, const char *class_name)
 Resolve a (handle, class_name) pair into the right concrete variant alternative.
 

Typedef Documentation

◆ fpFitterVariant

Initial value:
std::variant<
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

Variant of bound concrete subtypes of class(fitpack_fitter).

Stack-allocated tagged union — same size as one wrapper plus a tag (all *_c wrappers share the trivial cptr+is_pointer layout). The alternative-set is the C++-bound concrete subtypes enumerated at generation time.

Function Documentation

◆ wrap_fitpack_fitter()

std::optional< fpFitterVariant > wrap_fitpack_fitter ( fitpack_fitter_c handle,
const char * class_name )
inline

Resolve a (handle, class_name) pair into the right concrete variant alternative.

Parameters
handleA base-class C handle (e.g. from a polymorphic component accessor — any caller that has a fitpack_fitter_c plus the dynamic type name).
class_nameThe dynamic Fortran type name string returned alongside the handle (e.g. "fitpack_periodic_curve").
Returns
std::nullopt when handle.cptr is null (component unallocated, or class default arm fired in Fortran).
Exceptions
std::runtime_errorif class_name is null but the handle isn't (a generator bug — the polymorphic accessor's select_type fanout missed an arm) or if class_name does not match any registered subtype (binding/YAML drift — regenerate bindings).

Currently constructs a non-owning view of the handle's storage (is_pointer=true on the inner C handle). A future overload may construct an owned variant from a transferred handle.