Add include_user_metadata parameter to Database::general_messages()

The C++ wrapper defaults it to true, so the behaviour hasn't changed for
existing callers that don't pass a value for the evaluateConditions
parameter, i.e. that call GetGeneralMessages().

Since the new parameter comes before evaluateConditions,
existing GetGeneralMessages(true) and GetGeneralMessages(false) calls
need to be replaced with GetGeneralMessages(true, true) and
GetGeneralMessages(true, false) to retain their existing behaviour. The
parameter order was chosen to match that of GetPluginMetadata(), at the
cost of this backwards incompatibility.
This commit is contained in:
Oliver Hamlet
2026-01-02 16:41:43 +00:00
parent f582a513bc
commit 96b2ed2373
9 changed files with 92 additions and 17 deletions
+5
View File
@@ -167,6 +167,10 @@ public:
/**
* @brief Get all general messages listed in the loaded metadata lists.
* @param includeUserMetadata
* If true, any general messages present in the userlist are included
* in the returned metadata, otherwise the metadata returned only
* includes metadata from the masterlist.
* @param evaluateConditions
* If true, any metadata conditions are evaluated before the metadata
* is returned, otherwise unevaluated metadata is returned. Evaluating
@@ -176,6 +180,7 @@ public:
* to any particular plugin.
*/
virtual std::vector<Message> GetGeneralMessages(
bool includeUserMetadata = true,
bool evaluateConditions = false) const = 0;
/**