![]() |
TrinityCore
|
Namespaces | |
| namespace | Asio |
| namespace | Banner |
| namespace | ChatCommands |
| namespace | Containers |
| namespace | Crypto |
| namespace | Currency |
| namespace | DB |
| namespace | Encoding |
| namespace | Honor |
| namespace | Hyperlinks |
| namespace | Impl |
| namespace | Legacy |
| namespace | Locale |
| namespace | Net |
| namespace | Predicates |
| namespace | Service |
| namespace | SpellScripts |
| namespace | Timezone |
| namespace | XP |
Concepts | |
| concept | invocable_r |
| concept | HashablePrimitive |
Typedefs | |
| using | regex = TC_REGEX_NAMESPACE ::regex |
| using | wregex = TC_REGEX_NAMESPACE ::wregex |
| template<typename... Args> | |
| using | FormatString = fmt::format_string< Args... > |
| using | FormatStringView = fmt::string_view |
| using | FormatArgs = fmt::format_args |
| template<typename... Ts> | |
| using | is_tuple_t = std::bool_constant< is_tuple_v< Ts... > > |
| template<typename T , typename... Us> | |
| using | tuple_has_type_t = std::bool_constant< tuple_has_type_v< T, Us... > > |
| template<template< typename... > typename Check, typename... Ts> | |
| using | find_type_in_list_if = decltype(Impl::find_type_in_list_if_impl< Check, Ts... >()) |
Enumerations | |
| enum class | WorldObjectSearcherContinuation { Continue , Return } |
| enum class | WorldObjectSpellAreaTargetSearchReason { Area , Chain } |
Functions | |
| void | Assert (char const *file, int line, char const *function, char const *message, std::string debugInfo) noexcept |
| void | Assert (char const *file, int line, char const *function, char const *message, std::string debugInfo, char const *format,...) noexcept |
| void | Fatal (char const *file, int line, char const *function, char const *message,...) noexcept |
| void | Error (char const *file, int line, char const *function, char const *message) noexcept |
| void | Warning (char const *file, int line, char const *function, char const *message) noexcept |
| void | Abort (char const *file, int line, char const *function) noexcept |
| void | Abort (char const *file, int line, char const *function, char const *message,...) noexcept |
| void | AbortHandler (int sigval) noexcept |
| template<typename T > | |
| void | hash_combine (std::size_t &seed, T const &val) |
| template<typename Ptr , typename Del > requires std::invocable<Del, Ptr> && std::is_pointer_v<Ptr> | |
| Impl::stateful_unique_ptr_deleter< Ptr, Del > | unique_ptr_deleter (Del deleter) |
| template<typename Ptr , auto Del> requires std::invocable<decltype(Del), Ptr> && std::is_pointer_v<Ptr> | |
| Impl::stateless_unique_ptr_deleter< Ptr, Del > | unique_ptr_deleter () |
| template<typename Ptr , typename T = std::remove_pointer_t<Ptr>, typename Del > requires std::invocable<Del, Ptr> && std::is_pointer_v<Ptr> | |
| std::unique_ptr< T, Impl::stateful_unique_ptr_deleter< Ptr, Del > > | make_unique_ptr_with_deleter (Ptr ptr, Del deleter) |
| template<auto Del, typename Ptr , typename T = std::remove_pointer_t<Ptr>> requires std::invocable<decltype(Del), Ptr> && std::is_pointer_v<Ptr> | |
| std::unique_ptr< T, Impl::stateless_unique_ptr_deleter< Ptr, Del > > | make_unique_ptr_with_deleter (Ptr ptr) |
| int32 | StartProcess (std::string executable, std::vector< std::string > args, std::string logger, std::string input_file, bool secure) |
| std::shared_ptr< AsyncProcessResult > | StartAsyncProcess (std::string executable, std::vector< std::string > args, std::string logger, std::string input_file, bool secure) |
| std::string | SearchExecutableInPath (std::string const &filename) |
| template<typename Result , typename... Params> | |
| Optional< Result > | StringTo (std::string_view str, Params &&... params) |
| template<typename Type , typename... Params> | |
| std::string | ToString (Type &&val, Params &&... params) |
| template<typename... Args> | |
| constexpr auto | MakeFormatArgs (Args &&... args) |
| template<typename OutputIt > | |
| OutputIt | StringVFormatTo (OutputIt out, FormatStringView fmt, FormatArgs args) noexcept |
| template<typename... Args> | |
| std::string | StringFormat (FormatString< Args... > fmt, Args &&... args) noexcept |
| Default TC string format function. | |
| template<typename OutputIt , typename... Args> | |
| OutputIt | StringFormatTo (OutputIt out, FormatString< Args... > fmt, Args &&... args) noexcept |
| bool | IsFormatEmptyOrNull (char const *fmt) |
| Returns true if the given char pointer is null. | |
| bool | IsFormatEmptyOrNull (std::string const &fmt) |
| Returns true if the given std::string is empty. | |
| constexpr bool | IsFormatEmptyOrNull (std::string_view fmt) |
| Returns true if the given std::string_view is empty. | |
| constexpr bool | IsFormatEmptyOrNull (fmt::string_view fmt) |
| template<class T , class Tuple > | |
| T * | new_from_tuple (Tuple &&args) |
| template<typename T1 , typename T2 > | |
| bool | operator== (unique_trackable_ptr< T1 > const &left, unique_trackable_ptr< T2 > const &right) |
| template<typename T1 , typename T2 > | |
| std::strong_ordering | operator<=> (unique_trackable_ptr< T1 > const &left, unique_trackable_ptr< T2 > const &right) |
| template<typename T1 > | |
| bool | operator== (unique_trackable_ptr< T1 > const &left, std::nullptr_t) |
| template<typename T1 > | |
| std::strong_ordering | operator<=> (unique_trackable_ptr< T1 > const &left, std::nullptr_t) |
| template<typename T , typename... Args> | |
| std::enable_if_t<!std::is_array_v< T >, unique_trackable_ptr< T > > | make_unique_trackable (Args &&... args) |
| template<typename T > | |
| std::enable_if_t< std::is_unbounded_array_v< T >, unique_trackable_ptr< T > > | make_unique_trackable (std::size_t N) |
| template<typename T > | |
| std::enable_if_t< std::is_unbounded_array_v< T >, unique_trackable_ptr< T > > | make_unique_trackable (std::size_t N, std::remove_extent_t< T > const &val) |
| template<typename T > | |
| std::enable_if_t< std::is_bounded_array_v< T >, unique_trackable_ptr< T > > | make_unique_trackable () |
| template<typename T > | |
| std::enable_if_t< std::is_bounded_array_v< T >, unique_trackable_ptr< T > > | make_unique_trackable (std::remove_extent_t< T > const &val) |
| template<class To , class From > | |
| unique_weak_ptr< To > | static_pointer_cast (unique_weak_ptr< From > const &other) |
| template<class To , class From > | |
| unique_weak_ptr< To > | const_pointer_cast (unique_weak_ptr< From > const &other) |
| template<class To , class From > | |
| unique_weak_ptr< To > | reinterpret_pointer_cast (unique_weak_ptr< From > const &other) |
| template<class To , class From > | |
| unique_weak_ptr< To > | dynamic_pointer_cast (unique_weak_ptr< From > const &other) |
| template<typename T1 , typename T2 > | |
| bool | operator== (unique_strong_ref_ptr< T1 > const &left, unique_strong_ref_ptr< T2 > const &right) |
| template<typename T1 , typename T2 > | |
| std::strong_ordering | operator<=> (unique_strong_ref_ptr< T1 > const &left, unique_strong_ref_ptr< T2 > const &right) |
| template<typename T1 > | |
| bool | operator== (unique_strong_ref_ptr< T1 > const &left, std::nullptr_t) |
| template<typename T1 > | |
| std::strong_ordering | operator<=> (unique_strong_ref_ptr< T1 > const &left, std::nullptr_t) |
| template<class To , class From > | |
| unique_strong_ref_ptr< To > | static_pointer_cast (unique_strong_ref_ptr< From > const &other) |
| template<class To , class From > | |
| unique_strong_ref_ptr< To > | static_pointer_cast (unique_strong_ref_ptr< From > &&other) |
| template<class To , class From > | |
| unique_strong_ref_ptr< To > | const_pointer_cast (unique_strong_ref_ptr< From > const &other) |
| template<class To , class From > | |
| unique_strong_ref_ptr< To > | const_pointer_cast (unique_strong_ref_ptr< From > &&other) |
| template<class To , class From > | |
| unique_strong_ref_ptr< To > | reinterpret_pointer_cast (unique_strong_ref_ptr< From > const &other) |
| template<class To , class From > | |
| unique_strong_ref_ptr< To > | reinterpret_pointer_cast (unique_strong_ref_ptr< From > &&other) |
| template<class To , class From > | |
| unique_strong_ref_ptr< To > | dynamic_pointer_cast (unique_strong_ref_ptr< From > const &other) |
| template<class To , class From > | |
| unique_strong_ref_ptr< To > | dynamic_pointer_cast (unique_strong_ref_ptr< From > &&other) |
| TC_COMMON_API void | VerifyOsVersion () |
| TC_COMMON_API std::vector< std::string_view > | Tokenize (std::string_view str, char sep, bool keepEmpty) |
| std::vector< std::string_view > | Tokenize (std::string &&, char, bool)=delete |
| std::vector< std::string_view > | Tokenize (std::string const &&, char, bool)=delete |
| std::vector< std::string_view > | Tokenize (char const *str, char sep, bool keepEmpty) |
| template<typename T > | |
| std::string | GetTypeName () |
| template<typename T > | |
| std::string | GetTypeName (T &&v) |
| template<class RET_TYPE , int CENTER_VAL> | |
| RET_TYPE | Compute (float x, float y, float center_offset, float size) |
| GridCoord | ComputeGridCoord (float x, float y) |
| GridCoord | ComputeGridCoordSimple (float x, float y) |
| CellCoord | ComputeCellCoord (float x, float y) |
| CellCoord | ComputeCellCoord (float x, float y, float &x_off, float &y_off) |
| void | NormalizeMapCoord (float &c) |
| bool | IsValidMapCoord (float c) |
| bool | IsValidMapCoord (float x, float y) |
| bool | IsValidMapCoord (float x, float y, float z) |
| bool | IsValidMapCoord (float x, float y, float z, float o) |
| template<class Check , typename Container > | |
| WorldObjectListSearcher (PhaseShift const &, Container &, Check const &) -> WorldObjectListSearcher< Check const > | |
| template<class Check , typename Container > | |
| WorldObjectListSearcher (WorldObject const *, Container &, Check const &) -> WorldObjectListSearcher< Check const > | |
| template<class Check , typename Container > | |
| GameObjectListSearcher (PhaseShift const &, Container &, Check const &) -> GameObjectListSearcher< Check const > | |
| template<class Check , typename Container > | |
| GameObjectListSearcher (WorldObject const *, Container &, Check const &) -> GameObjectListSearcher< Check const > | |
| uint32 | GetExpansionForLevel (uint32 level) |
| void | SelectRandomInjuredTargets (std::list< WorldObject * > &targets, size_t maxTargets, bool prioritizePlayers, Unit const *prioritizeGroupMembersOf) |
| void | SortTargetsWithPriorityRules (std::list< WorldObject * > &targets, size_t maxTargets, std::span< TargetPriorityRule const > rules) |
| template<std::size_t N> | |
| void | SortTargetsWithPriorityRules (std::list< WorldObject * > &targets, size_t maxTargets, std::array< TargetPriorityRule, N > const &rules) |
Variables | |
| template<typename... Ts> | |
| constexpr bool | is_tuple_v = false |
| template<typename T , typename... Us> | |
| constexpr bool | tuple_has_type_v = false |
| template<std::size_t I> | |
| constexpr auto | TupleElement = []<typename Tuple>(Tuple&& tuple) constexpr -> decltype(auto) { return std::get<I>(std::forward<Tuple>(tuple)); } |
| template<typename T , typename... Us> | |
| constexpr bool | has_type_in_list_v = std::disjunction_v<std::is_same<T, Us>...> |
| template<typename T > | |
| constexpr bool | dependant_false_v = dependant_false<T>::value |
| using Trinity::find_type_in_list_if = typedef decltype(Impl::find_type_in_list_if_impl<Check, Ts...>()) |
| using Trinity::FormatArgs = typedef fmt::format_args |
Definition at line 33 of file StringFormat.h.
| using Trinity::FormatString = typedef fmt::format_string<Args...> |
Definition at line 29 of file StringFormat.h.
| using Trinity::FormatStringView = typedef fmt::string_view |
Definition at line 31 of file StringFormat.h.
| using Trinity::is_tuple_t = typedef std::bool_constant<is_tuple_v<Ts...> > |
| using Trinity::regex = typedef TC_REGEX_NAMESPACE :: regex |
| using Trinity::tuple_has_type_t = typedef std::bool_constant<tuple_has_type_v<T, Us...> > |
| using Trinity::wregex = typedef TC_REGEX_NAMESPACE :: wregex |
|
strong |
| Enumerator | |
|---|---|
| Continue | |
| Return | |
Definition at line 250 of file GridNotifiers.h.
|
strong |
|
noexcept |
|
noexcept |
|
noexcept |
Definition at line 160 of file Errors.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
noexcept |
Definition at line 76 of file Errors.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
noexcept |
|
inline |
Definition at line 179 of file GridDefines.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 202 of file GridDefines.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
inline |
Definition at line 190 of file GridDefines.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 195 of file GridDefines.h.
Here is the call graph for this function:
Here is the caller graph for this function:| unique_strong_ref_ptr< To > Trinity::const_pointer_cast | ( | unique_strong_ref_ptr< From > && | other | ) |
Definition at line 478 of file UniqueTrackablePtr.h.
| unique_strong_ref_ptr< To > Trinity::const_pointer_cast | ( | unique_strong_ref_ptr< From > const & | other | ) |
Definition at line 472 of file UniqueTrackablePtr.h.
| unique_weak_ptr< To > Trinity::const_pointer_cast | ( | unique_weak_ptr< From > const & | other | ) |
Definition at line 410 of file UniqueTrackablePtr.h.
| unique_strong_ref_ptr< To > Trinity::dynamic_pointer_cast | ( | unique_strong_ref_ptr< From > && | other | ) |
Definition at line 502 of file UniqueTrackablePtr.h.
| unique_strong_ref_ptr< To > Trinity::dynamic_pointer_cast | ( | unique_strong_ref_ptr< From > const & | other | ) |
Definition at line 496 of file UniqueTrackablePtr.h.
| unique_weak_ptr< To > Trinity::dynamic_pointer_cast | ( | unique_weak_ptr< From > const & | other | ) |
Definition at line 426 of file UniqueTrackablePtr.h.
|
noexcept |
|
noexcept |
| Trinity::GameObjectListSearcher | ( | PhaseShift const & | , |
| Container & | , | ||
| Check const & | |||
| ) | -> GameObjectListSearcher< Check const > |
| Trinity::GameObjectListSearcher | ( | WorldObject const * | , |
| Container & | , | ||
| Check const & | |||
| ) | -> GameObjectListSearcher< Check const > |
| std::string Trinity::GetTypeName | ( | ) |
| std::string Trinity::GetTypeName | ( | T && | v | ) |
|
inline |
|
inline |
Returns true if the given char pointer is null.
Definition at line 69 of file StringFormat.h.
Here is the caller graph for this function:
|
inlineconstexpr |
Definition at line 86 of file StringFormat.h.
|
inline |
Returns true if the given std::string is empty.
Definition at line 75 of file StringFormat.h.
|
inlineconstexpr |
Returns true if the given std::string_view is empty.
Definition at line 81 of file StringFormat.h.
|
inline |
Definition at line 227 of file GridDefines.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
inline |
|
inline |
|
inline |
Utility function to construct a std::unique_ptr object with custom stateless deleter (function pointer, captureless lambda)
| Del | The freeing function. This can be either a free function pointer that accepts T* as argument, pointer to a member function of T that accepts no arguments or a lambda with no captures |
| Ptr | Type of the pointer |
| T | Type of the pointed-to object (defaults to std::remove_pointer_t<Ptr>) |
| ptr | Raw pointer to owned object |
Example uses
|
inline |
Utility function to construct a std::unique_ptr object with custom stateful deleter (such as lambda with captures)
| Ptr | Type of the pointer |
| T | Type of the pointed-to object (defaults to std::remove_pointer_t<Ptr>) |
| Del | Type of object freeing function (deduced from second argument) |
| ptr | Raw pointer to owned object |
| deleter | Object deleter |
Example use
Definition at line 133 of file Memory.h.
Here is the caller graph for this function:| std::enable_if_t< std::is_bounded_array_v< T >, unique_trackable_ptr< T > > Trinity::make_unique_trackable | ( | ) |
Definition at line 384 of file UniqueTrackablePtr.h.
| std::enable_if_t<!std::is_array_v< T >, unique_trackable_ptr< T > > Trinity::make_unique_trackable | ( | Args &&... | args | ) |
Definition at line 360 of file UniqueTrackablePtr.h.
| std::enable_if_t< std::is_bounded_array_v< T >, unique_trackable_ptr< T > > Trinity::make_unique_trackable | ( | std::remove_extent_t< T > const & | val | ) |
Definition at line 392 of file UniqueTrackablePtr.h.
| std::enable_if_t< std::is_unbounded_array_v< T >, unique_trackable_ptr< T > > Trinity::make_unique_trackable | ( | std::size_t | N | ) |
Definition at line 368 of file UniqueTrackablePtr.h.
| std::enable_if_t< std::is_unbounded_array_v< T >, unique_trackable_ptr< T > > Trinity::make_unique_trackable | ( | std::size_t | N, |
| std::remove_extent_t< T > const & | val | ||
| ) |
Definition at line 376 of file UniqueTrackablePtr.h.
|
constexpr |
|
inline |
|
inline |
Definition at line 219 of file GridDefines.h.
Here is the call graph for this function:
Here is the caller graph for this function:| std::strong_ordering Trinity::operator<=> | ( | unique_strong_ref_ptr< T1 > const & | left, |
| std::nullptr_t | |||
| ) |
| std::strong_ordering Trinity::operator<=> | ( | unique_strong_ref_ptr< T1 > const & | left, |
| unique_strong_ref_ptr< T2 > const & | right | ||
| ) |
| std::strong_ordering Trinity::operator<=> | ( | unique_trackable_ptr< T1 > const & | left, |
| std::nullptr_t | |||
| ) |
| std::strong_ordering Trinity::operator<=> | ( | unique_trackable_ptr< T1 > const & | left, |
| unique_trackable_ptr< T2 > const & | right | ||
| ) |
| bool Trinity::operator== | ( | unique_strong_ref_ptr< T1 > const & | left, |
| std::nullptr_t | |||
| ) |
| bool Trinity::operator== | ( | unique_strong_ref_ptr< T1 > const & | left, |
| unique_strong_ref_ptr< T2 > const & | right | ||
| ) |
| bool Trinity::operator== | ( | unique_trackable_ptr< T1 > const & | left, |
| std::nullptr_t | |||
| ) |
| bool Trinity::operator== | ( | unique_trackable_ptr< T1 > const & | left, |
| unique_trackable_ptr< T2 > const & | right | ||
| ) |
| unique_strong_ref_ptr< To > Trinity::reinterpret_pointer_cast | ( | unique_strong_ref_ptr< From > && | other | ) |
Definition at line 490 of file UniqueTrackablePtr.h.
| unique_strong_ref_ptr< To > Trinity::reinterpret_pointer_cast | ( | unique_strong_ref_ptr< From > const & | other | ) |
Definition at line 484 of file UniqueTrackablePtr.h.
| unique_weak_ptr< To > Trinity::reinterpret_pointer_cast | ( | unique_weak_ptr< From > const & | other | ) |
Definition at line 418 of file UniqueTrackablePtr.h.
| TC_COMMON_API std::string Trinity::SearchExecutableInPath | ( | std::string const & | filename | ) |
Searches for the given executable in the PATH variable and returns a non-empty string when it was found.
Definition at line 223 of file StartProcess.cpp.
Here is the caller graph for this function:
|
private |
|
inline |
|
private |
| TC_COMMON_API std::shared_ptr< AsyncProcessResult > Trinity::StartAsyncProcess | ( | std::string | executable, |
| std::vector< std::string > | args, | ||
| std::string | logger, | ||
| std::string | input_file = "", |
||
| bool | secure = false |
||
| ) |
Starts a process asynchronously with the given arguments and parameters and returns an AsyncProcessResult immediately which is set, when the process exits. When an input path is given, the file will be routed to the processes stdin. When the process is marked as secure no arguments are leaked to logs. Note that most executables expect it's name as the first argument.
Definition at line 213 of file StartProcess.cpp.
| TC_COMMON_API int32 Trinity::StartProcess | ( | std::string | executable, |
| std::vector< std::string > | args, | ||
| std::string | logger, | ||
| std::string | input_file = "", |
||
| bool | secure = false |
||
| ) |
Starts a process with the given arguments and parameters and will block until the process is finished. When an input path is given, the file will be routed to the processes stdin. When the process is marked as secure no arguments are leaked to logs. Note that most executables expect it's name as the first argument.
Definition at line 204 of file StartProcess.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| unique_strong_ref_ptr< To > Trinity::static_pointer_cast | ( | unique_strong_ref_ptr< From > && | other | ) |
Definition at line 466 of file UniqueTrackablePtr.h.
| unique_strong_ref_ptr< To > Trinity::static_pointer_cast | ( | unique_strong_ref_ptr< From > const & | other | ) |
Definition at line 460 of file UniqueTrackablePtr.h.
| unique_weak_ptr< To > Trinity::static_pointer_cast | ( | unique_weak_ptr< From > const & | other | ) |
Definition at line 402 of file UniqueTrackablePtr.h.
|
inlinenoexcept |
Default TC string format function.
Definition at line 57 of file StringFormat.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinenoexcept |
Definition at line 63 of file StringFormat.h.
Here is the call graph for this function:
Here is the caller graph for this function:| Optional< Result > Trinity::StringTo | ( | std::string_view | str, |
| Params &&... | params | ||
| ) |
|
inlinenoexcept |
Definition at line 48 of file StringFormat.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
delete |
|
delete |
| std::vector< std::string_view > Trinity::Tokenize | ( | std::string_view | str, |
| char | sep, | ||
| bool | keepEmpty | ||
| ) |
| std::string Trinity::ToString | ( | Type && | val, |
| Params &&... | params | ||
| ) |
Definition at line 272 of file StringConvert.h.
Here is the call graph for this function:
Here is the caller graph for this function:| Impl::stateless_unique_ptr_deleter< Ptr, Del > Trinity::unique_ptr_deleter | ( | ) |
Convenience function to construct type aliases for std::unique_ptr stateful deleters (such as lambda with captures)
Main use is for forming struct/class members without the call to make_unique_ptr_with_deleter
| Ptr | Type of the pointer |
| Del | The freeing function. This can be either a free function pointer that accepts T* as argument, pointer to a member function of T that accepts no arguments or a lambda with no captures |
Example use
| Impl::stateful_unique_ptr_deleter< Ptr, Del > Trinity::unique_ptr_deleter | ( | Del | deleter | ) |
Convenience function to construct type aliases for std::unique_ptr stateful deleters (such as lambda with captures)
| Ptr | Type of the pointer |
| Del | Type of object freeing function (deduced from argument) |
| deleter | Object deleter |
Example use
| void Trinity::VerifyOsVersion | ( | ) |
|
noexcept |
Definition at line 129 of file Errors.cpp.
| Trinity::WorldObjectListSearcher | ( | PhaseShift const & | , |
| Container & | , | ||
| Check const & | |||
| ) | -> WorldObjectListSearcher< Check const > |
| Trinity::WorldObjectListSearcher | ( | WorldObject const * | , |
| Container & | , | ||
| Check const & | |||
| ) | -> WorldObjectListSearcher< Check const > |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |