The help implementation caches data parsed from the game_config. More...
#include <help.hpp>
Classes | |
| class | implementation |
Public Member Functions | |
| help_manager (const help_manager &)=delete | |
| help_manager & | operator= (const help_manager &)=delete |
| ~help_manager () | |
| Defined out-of-line so the implementation class is visible. More... | |
| const section & | regenerate () |
| Regenerates the cached help topics if necessary. More... | |
Static Public Member Functions | |
| static std::shared_ptr< help_manager > | get_instance () |
| Returns the existing help_manager instance, or a newly allocated object otherwise. More... | |
Private Member Functions | |
| help_manager () | |
| Private default constructor. More... | |
Private Attributes | |
| std::unique_ptr< implementation > | impl_ |
| Pointer-to-implementation to reduce include dependencies. More... | |
Static Private Attributes | |
| static std::weak_ptr< help_manager > | singleton_ |
The help implementation caches data parsed from the game_config.
This class is used to control the lifecycle of that cache, so that the cache will be cleared before the game_config itself changes.
Note: it's okay to call any of the help::show_* functions without creating an instance of help_manager - that will simply mean that the cache is cleared before the show function returns.
Creating two instances of this will cause an assert.
|
delete |
|
default |
Defined out-of-line so the implementation class is visible.
|
private |
Private default constructor.
Use get_instance to get a managed instance instead.
|
static |
Returns the existing help_manager instance, or a newly allocated object otherwise.
Definition at line 152 of file help.cpp.
References singleton_.
Referenced by help::show_help().
|
delete |
| const section & help::help_manager::regenerate | ( | ) |
|
private |
Pointer-to-implementation to reduce include dependencies.
Definition at line 69 of file help.hpp.
Referenced by regenerate().
|
inlinestaticprivate |
Definition at line 71 of file help.hpp.
Referenced by get_instance().