TrinityCore
|
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. More... | |
void | RemoveUsedScriptsFromContainer (std::unordered_set< std::string > &scripts) final override |
void | Unload () final override |
Unloads the script registry. More... | |
void | SyncScriptNames () final override |
Updates the scripts to reflect the current id. More... | |
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 |
virtual void | ReleaseContext (std::string const &context)=0 |
virtual void | SwapContext (bool initialize)=0 |
Injects and updates the changed script objects. More... | |
virtual void | RemoveUsedScriptsFromContainer (std::unordered_set< std::string > &scripts)=0 |
virtual void | Unload ()=0 |
Unloads the script registry. More... | |
virtual void | SyncScriptNames ()=0 |
Updates the scripts to reflect the current id. More... | |
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 182 of file ScriptMgr.cpp.
|
inlineprivate |
Definition at line 185 of file ScriptMgr.cpp.
|
inlineprivate |
|
inline |
Definition at line 221 of file ScriptMgr.cpp.
|
inlinestatic |
Definition at line 281 of file ScriptMgr.cpp.
|
inline |
Definition at line 272 of file ScriptMgr.cpp.
|
inlineprivate |
Definition at line 288 of file ScriptMgr.cpp.
|
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 229 of file ScriptMgr.cpp.
|
inlinefinaloverridevirtual |
Removes the scripts used by this registry from the given container. Used to find unused script names.
Implements ScriptRegistryInterface.
Definition at line 253 of file ScriptMgr.cpp.
|
inline |
Definition at line 214 of file ScriptMgr.cpp.
|
inlinefinaloverridevirtual |
Injects and updates the changed script objects.
Implements ScriptRegistryInterface.
Definition at line 245 of file ScriptMgr.cpp.
|
inlinefinaloverridevirtual |
Updates the scripts to reflect the current id.
Implements ScriptRegistryInterface.
Definition at line 265 of file ScriptMgr.cpp.
|
inlinefinaloverridevirtual |
Unloads the script registry.
Implements ScriptRegistryInterface.
Definition at line 259 of file ScriptMgr.cpp.
|
friend |
Definition at line 188 of file ScriptMgr.cpp.
|
private |
Definition at line 300 of file ScriptMgr.cpp.
|
private |
Definition at line 298 of file ScriptMgr.cpp.
|
private |
Definition at line 305 of file ScriptMgr.cpp.