1
0

Add cPluginManager::GenericCallHook (#4027)

Replace repetitive CallHook functions with a generic implementation.
Also converts some loops to range-based for.

Related to #1134
This commit is contained in:
peterbell10 2018-03-02 10:40:48 +00:00 committed by GitHub
parent 999faa9d90
commit 4f26f653e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 252 additions and 632 deletions

File diff suppressed because it is too large Load Diff

View File

@ -444,6 +444,12 @@ private:
/** Returns the folders that are specified in the settings ini to load plugins from. */ /** Returns the folders that are specified in the settings ini to load plugins from. */
AStringVector GetFoldersToLoad(cSettingsRepositoryInterface & a_Settings); AStringVector GetFoldersToLoad(cSettingsRepositoryInterface & a_Settings);
/** Calls a_HookFunction on each plugin registered to the hook HookName.
Returns false if the action is to continue or true if the plugin wants to abort.
Accessible only from within PluginManager.cpp */
template <typename HookFunction>
bool GenericCallHook(PluginHook a_HookName, HookFunction a_HookFunction);
} ; // tolua_export } ; // tolua_export