![]() |
TrinityCore
|
Inheritance diagram for ScriptRegistryCompositum:Classes | |
| class | DeleteableObject |
| class | DeleteableObjectBase |
| Type erasure wrapper for objects. More... | |
Public Member Functions | |
| void | SetScriptNameInContext (std::string const &scriptname, std::string const &context) |
| std::string const & | GetScriptContextOfScriptName (std::string const &scriptname) const |
| void | ReleaseContext (std::string const &context) final override |
| void | SwapContext (bool initialize) final override |
| Injects and updates the changed script objects. | |
| void | RemoveUsedScriptsFromContainer (std::unordered_set< std::string > &scripts) final override |
| void | Unload () final override |
| Unloads the script registry. | |
| template<typename T > | |
| void | QueueForDelayedDelete (T &&any) |
Public Member Functions inherited from ScriptRegistryInterface | |
| ScriptRegistryInterface () | |
| virtual | ~ScriptRegistryInterface () |
| ScriptRegistryInterface (ScriptRegistryInterface const &)=delete | |
| ScriptRegistryInterface (ScriptRegistryInterface &&)=delete | |
| ScriptRegistryInterface & | operator= (ScriptRegistryInterface const &)=delete |
| ScriptRegistryInterface & | operator= (ScriptRegistryInterface &&)=delete |
Static Public Member Functions | |
| static ScriptRegistryCompositum * | Instance () |
Private Member Functions | |
| ScriptRegistryCompositum () | |
| void | Register (ScriptRegistryInterface *registry) |
| void | DoDelayedDelete () |
Private Attributes | |
| std::unordered_set< ScriptRegistryInterface * > | _registries |
| std::vector< std::unique_ptr< DeleteableObjectBase > > | _delayed_delete_queue |
| std::unordered_map< std::string, std::string > | _scriptnames_to_context |
Friends | |
| template<class > | |
| class | ScriptRegistry |
Definition at line 143 of file ScriptMgr.cpp.
|
inlineprivate |
Definition at line 146 of file ScriptMgr.cpp.
|
inlineprivate |
Definition at line 248 of file ScriptMgr.cpp.
References _delayed_delete_queue.
Referenced by SwapContext().
|
inline |
Definition at line 182 of file ScriptMgr.cpp.
References _scriptnames_to_context, and ASSERT.
|
inlinestatic |
Definition at line 236 of file ScriptMgr.cpp.
|
inline |
Definition at line 227 of file ScriptMgr.cpp.
References _delayed_delete_queue.
|
inlineprivate |
Definition at line 243 of file ScriptMgr.cpp.
References _registries.
|
inlinefinaloverridevirtual |
Removes all scripts associated with the given script context. Requires ScriptRegistryBase::SwapContext to be called after all transfers have finished.
Implements ScriptRegistryInterface.
Definition at line 190 of file ScriptMgr.cpp.
References _registries, and _scriptnames_to_context.
|
inlinefinaloverridevirtual |
Removes the scripts used by this registry from the given container. Used to find unused script names.
Implements ScriptRegistryInterface.
Definition at line 214 of file ScriptMgr.cpp.
References _registries.
|
inline |
Definition at line 175 of file ScriptMgr.cpp.
References _scriptnames_to_context, and ASSERT.
|
inlinefinaloverridevirtual |
Injects and updates the changed script objects.
Implements ScriptRegistryInterface.
Definition at line 206 of file ScriptMgr.cpp.
References _registries, and DoDelayedDelete().
|
inlinefinaloverridevirtual |
Unloads the script registry.
Implements ScriptRegistryInterface.
Definition at line 220 of file ScriptMgr.cpp.
References _registries.
|
friend |
Definition at line 149 of file ScriptMgr.cpp.
|
private |
Definition at line 255 of file ScriptMgr.cpp.
Referenced by DoDelayedDelete(), and QueueForDelayedDelete().
|
private |
Definition at line 253 of file ScriptMgr.cpp.
Referenced by Register(), ReleaseContext(), RemoveUsedScriptsFromContainer(), SwapContext(), and Unload().
|
private |
Definition at line 260 of file ScriptMgr.cpp.
Referenced by GetScriptContextOfScriptName(), ReleaseContext(), and SetScriptNameInContext().