mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[docs] Fix Doxygen warnings, add CI docs lint job (#3639)
The CI docs lint build is configured to fail on Doxygen warnings.
This commit is contained in:
@@ -8,10 +8,25 @@
|
||||
|
||||
#include "Eigen/Core"
|
||||
|
||||
/**
|
||||
* Formatter for Eigen::Matrix<>.
|
||||
*
|
||||
* @tparam Rows Number of rows.
|
||||
* @tparam Cols Number of columns.
|
||||
* @tparam Args Defaulted template arguments to Eigen::Matrix<>.
|
||||
*/
|
||||
template <int Rows, int Cols, int... Args>
|
||||
struct fmt::formatter<Eigen::Matrix<double, Rows, Cols, Args...>> {
|
||||
/**
|
||||
* Storage for format specifier.
|
||||
*/
|
||||
char presentation = 'f';
|
||||
|
||||
/**
|
||||
* Format string parser.
|
||||
*
|
||||
* @param ctx Format string context.
|
||||
*/
|
||||
constexpr auto parse(fmt::format_parse_context& ctx) {
|
||||
auto it = ctx.begin(), end = ctx.end();
|
||||
if (it != end && (*it == 'f' || *it == 'e')) {
|
||||
@@ -25,6 +40,13 @@ struct fmt::formatter<Eigen::Matrix<double, Rows, Cols, Args...>> {
|
||||
return it;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a formatted matrix.
|
||||
*
|
||||
* @tparam FormatContext Format string context type.
|
||||
* @param mat Matrix to format.
|
||||
* @param ctx Format string context.
|
||||
*/
|
||||
template <typename FormatContext>
|
||||
auto format(const Eigen::Matrix<double, Rows, Cols, Args...>& mat,
|
||||
FormatContext& ctx) {
|
||||
|
||||
@@ -8,9 +8,28 @@
|
||||
|
||||
#include "units/base.h"
|
||||
|
||||
/**
|
||||
* Formatter for unit types.
|
||||
*
|
||||
* @tparam Units Unit tag for which type of units the `unit_t` represents (e.g.
|
||||
* meters).
|
||||
* @tparam T Underlying type of the storage. Defaults to double.
|
||||
* @tparam NonLinearScale Optional scale class for the units. Defaults to linear
|
||||
* (i.e. does not scale the unit value). Examples of
|
||||
* non-linear scales could be logarithmic, decibel, or
|
||||
* richter scales. Non-linear scales must adhere to the
|
||||
* non-linear-scale concept.
|
||||
*/
|
||||
template <class Units, typename T, template <typename> class NonLinearScale>
|
||||
struct fmt::formatter<units::unit_t<Units, T, NonLinearScale>>
|
||||
: fmt::formatter<double> {
|
||||
/**
|
||||
* Writes out a formatted unit.
|
||||
*
|
||||
* @tparam FormatContext Format string context type.
|
||||
* @param obj Unit instance.
|
||||
* @param ctx Format string context.
|
||||
*/
|
||||
template <typename FormatContext>
|
||||
auto format(const units::unit_t<Units, T, NonLinearScale>& obj,
|
||||
FormatContext& ctx) {
|
||||
|
||||
Reference in New Issue
Block a user