# 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 ```cpp /// \file hydro.h /// Core hydrostatic solver types and interfaces. ``` ### Struct/class ```cpp /// 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 ```cpp /// 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); ``` ### Grouping related items ```cpp /// \defgroup eos Equation of State /// EOS primitives and models. ``` > After adding comments, rebuild docs: > ```bash > doxygen Doxyfile && sphinx-build -b html docs docs/_build/html > ``` The next page, **C++ API Reference**, is auto-generated by Exhale/Breathe from your code.