From 64669dc08d41fd92e419dcba539aff4824270b44 Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Fri, 7 Nov 2025 18:16:37 +0100 Subject: [PATCH] doxygen: improve * stop transforming all // in doxygen comment /// since it doesn't work nicely with our code base, prefer to replace // by /// when needed. --- ortools/cpp/main.cpp.dox.in | 53 +++++++++++++++++++++++++++++++++++++ tools/doc/doxygen_filter.py | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/ortools/cpp/main.cpp.dox.in b/ortools/cpp/main.cpp.dox.in index 3a857905f9..6466709ebd 100644 --- a/ortools/cpp/main.cpp.dox.in +++ b/ortools/cpp/main.cpp.dox.in @@ -3,6 +3,59 @@ * @author Corentin "Mizux" Le Molgat */ +// WARNING: must keep the empty line between example otherwise doxygen has an +// undefined behaviour... + +/// @namespace operations_research OR-Tools root namespace. + +/// @example{lineno} tsp.cc +/// Simple TSP example. + +/// @example{lineno} tsp_circuit_board.cc +/// Simple TSP example. + +/// @example{lineno} tsp_cities.cc +/// Simple TSP example. + +/// @example{lineno} tsp_distance_matrix.cc +/// Simple TSP example. + +/// @example{lineno} vrp_capacity.cc +/// Simple VRP example. + +/// @example{lineno} vrp.cc +/// Simple VRP example. + +/// @example{lineno} vrp_drop_nodes.cc +/// Simple VRP example. + +/// @example{lineno} vrp_global_span.cc +/// Simple VRP example. + +/// @example{lineno} vrp_initial_routes.cc +/// Simple VRP example. + +/// @example{lineno} vrp_pickup_delivery.cc +/// Simple VRP example. + +/// @example{lineno} vrp_pickup_delivery_fifo.cc +/// Simple VRP example. + +/// @example{lineno} vrp_pickup_delivery_lifo.cc +/// Simple VRP example. + +/// @example{lineno} vrp_resources.cc +/// Simple VRP example. + +/// @example{lineno} vrp_starts_ends.cc +/// Simple VRP example. + +/// @example{lineno} vrp_time_windows.cc +/// Simple VRP example. + +/// @example{lineno} vrp_with_time_limit.cc +/// Simple VRP example. + /*! @mainpage OR-Tools C++ Reference This is the reference documentation for Google OR-Tools. diff --git a/tools/doc/doxygen_filter.py b/tools/doc/doxygen_filter.py index 9fa6f7c4dd..3c7e60097c 100644 --- a/tools/doc/doxygen_filter.py +++ b/tools/doc/doxygen_filter.py @@ -97,7 +97,7 @@ class DoxygenFormatter: # Replace pipe-delimited parameter names with backtick-delimiters (re.compile(r"\|(\w+)\|"), r"`\1`", self.COMMENT), # Convert standalone comment lines to Doxygen style. - (re.compile(r"(^\s*)//(?=[^/])"), r"\1///", self.ANYWHERE), + #(re.compile(r"(^\s*)//(?=[^/])"), r"\1///", self.ANYWHERE), # Strip trailing comments from preprocessor directives. (re.compile(r"(^#.*)//.*"), r"\1", self.ANYWHERE), # Convert remaining trailing comments to doxygen style, unless they are