-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a finalizer method to the Module template class.
- Loading branch information
1 parent
954d846
commit b505d7d
Showing
1 changed file
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* @file Module.hpp | ||
* | ||
* @date Feb 14, 2022 | ||
* @date 23 Sep 2024 | ||
* @author Tim Spain <[email protected]> | ||
*/ | ||
|
||
|
@@ -165,6 +165,15 @@ template <typename I> class Module { | |
//! Implementation dependent. | ||
static HelpMap& getHelpRecursive(HelpMap& helpMap, bool getAll); | ||
|
||
/*! | ||
* Finalizes the Module by setting both pointers to nullptr. | ||
*/ | ||
static void finalize() | ||
{ | ||
getUniqueInstance(true) = nullptr; | ||
getGenerationFunction() = nullptr; | ||
} | ||
|
||
private: | ||
static std::string getDefaultImplementationName(); | ||
static fn& getGenerationFunction() | ||
|