API Reference: How to Document Your C++

The API Reference below is generated from your headers using Doxygen → Breathe/Exhale.

To improve the generated pages, add short Doxygen comments in headers, especially for public structs/classes and functions.

Minimal Examples

File header

/// \file hydro.h
/// Core hydrostatic solver types and interfaces.

Struct/class

/// Hydrostatic model container (radius, P, T, rho as functions of mass).
/// Units: P [Pa], T [K], rho [kg m^-3], r [m].
struct HydroModel {
  /// Integrate structure. Throws on EOS lookup failure.
  /// \param m_core Initial mass coordinate [kg]
  /// \param dr Target radial step [m]
  /// \returns Number of steps taken
  int integrate(double m_core, double dr);
};

Function

/// Compute adiabatic temperature gradient dT/dP.
/// \param P Pressure [Pa]
/// \param T Temperature [K]
/// \param alpha Thermal expansivity [1/K]
/// \param Cp Heat capacity [J/(kg K)]
/// \param rho Density [kg/m^3]
/// \return dT/dP [K/Pa]
double dT_dP(double P, double T, double alpha, double Cp, double rho);