allow to not set the res value from a plugin function
Add PluginInfo::has_res (bool, default true). If set to false by a plugin function then the PluginInfo::res value is not taken into account when calculating how many plugins have returned true or false.
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008-2022, Tomasz Sowa
|
||||
/*
|
||||
* Copyright (c) 2008-2023, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -120,6 +120,12 @@ struct PluginInfo
|
||||
// to create your plugin's session data
|
||||
PluginDataBase * plugin_data_base; // !! zmienic nazwe na plugin_session_base ? a moze session_base; a moze plugin_session?
|
||||
|
||||
// whether or not there is a res (bool) value set
|
||||
// default: true
|
||||
// if set to false then the 'res' is not taken into account when calculating how many plugins
|
||||
// have returned true or false
|
||||
bool has_res;
|
||||
|
||||
// function return status
|
||||
// default: false (if not set by the plugin)
|
||||
bool res;
|
||||
@@ -137,6 +143,7 @@ struct PluginInfo
|
||||
plugin_id = -1;
|
||||
plugin_data_base = 0;
|
||||
|
||||
has_res = true;
|
||||
res = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user