Skip to content

Commit c129b33

Browse files
committed
CoinParam: add topic metadata field for semantic parameter grouping
Add a topic_ string field with getter/setter to CoinParam, enabling parameters to be grouped by function (e.g., Cuts, Heuristics, Output, Stopping) independently of their data type. This supports future documentation generation (LaTeX, man pages) and topic-filtered help. The field defaults to empty string; no existing API is changed.
1 parent 71f66f3 commit c129b33

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/CoinParam.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,18 @@ class COINUTILSLIB_EXPORT CoinParam
401401
/*! \brief Retrieve the long help message */
402402
inline std::string longHelp() const { return (longHelp_); }
403403

404+
/*! \brief Set the topic (semantic category) for this parameter.
405+
406+
Topics group parameters by function (e.g., "Cuts", "Heuristics",
407+
"Stopping", "Output") independently of their data type. Useful for
408+
generating documentation grouped by subject and for topic-filtered
409+
help listings.
410+
*/
411+
inline void setTopic(const std::string &topic) { topic_ = topic; }
412+
413+
/*! \brief Retrieve the topic string (empty if not set) */
414+
inline const std::string &topic() const { return (topic_); }
415+
404416
/*! \brief Print long help
405417
406418
Prints the long help string, plus the valid range and/or keywords if
@@ -568,6 +580,9 @@ class COINUTILSLIB_EXPORT CoinParam
568580

569581
/// Display when processing lists of parameters?
570582
CoinDisplayPriority display_;
583+
584+
/// Topic (semantic category, e.g. "Cuts", "Heuristics", "Output")
585+
std::string topic_;
571586
//@}
572587
};
573588

0 commit comments

Comments
 (0)