![]() |
TrinityCore
|
Namespaces | |
namespace | Asio |
namespace | Banner |
namespace | ChatCommands |
namespace | Containers |
namespace | Crypto |
namespace | Currency |
namespace | Encoding |
namespace | Honor |
namespace | Hyperlinks |
namespace | Impl |
namespace | Legacy |
namespace | Net |
namespace | Predicates |
namespace | SpellScripts |
namespace | XP |
Typedefs | |
using | regex = TC_REGEX_NAMESPACE ::regex |
using | wregex = TC_REGEX_NAMESPACE ::wregex |
template<typename... Args> | |
using | FormatString = fmt::format_string< Args... > |
template<template< typename... > typename Check, typename... Ts> | |
using | find_type_if_t = typename find_type_if< Check, Ts... >::type |
Functions | |
void | Assert (char const *file, int line, char const *function, std::string debugInfo, char const *message) |
void | Assert (char const *file, int line, char const *function, std::string debugInfo, char const *message, char const *format,...) |
void | Fatal (char const *file, int line, char const *function, char const *message,...) |
void | Error (char const *file, int line, char const *function, char const *message) |
void | Warning (char const *file, int line, char const *function, char const *message) |
void | Abort (char const *file, int line, char const *function) |
void | Abort (char const *file, int line, char const *function, char const *message,...) |
void | AbortHandler (int sigval) |
template<typename T > | |
void | hash_combine (std::size_t &seed, T const &val) |
template<typename T , typename Del > | |
auto | make_unique_ptr_with_deleter (T ptr, Del &&deleter) |
template<typename T > | |
auto | MakeTCLogSink (T &&callback) -> TCLogSink< typename std::decay< T >::type > |
template<typename T > | |
static int | CreateChildProcess (T waiter, std::string const &executable, std::vector< std::string > const &argsVector, std::string const &logger, std::string const &input, bool secure) |
int | StartProcess (std::string const &executable, std::vector< std::string > const &args, std::string const &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> | |
std::string | StringFormat (FormatString< Args... > fmt, Args &&... args) |
Default TC string format function. More... | |
bool | IsFormatEmptyOrNull (char const *fmt) |
Returns true if the given char pointer is null. More... | |
bool | IsFormatEmptyOrNull (std::string const &fmt) |
Returns true if the given std::string is empty. More... | |
constexpr bool | IsFormatEmptyOrNull (std::string_view fmt) |
Returns true if the given std::string_view is empty. More... | |
constexpr bool | IsFormatEmptyOrNull (fmt::string_view fmt) |
template<class T , class Tuple > | |
T * | new_from_tuple (Tuple &&args) |
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 SPECIFIC_TYPE , class KEY_TYPE , class H , class T > | |
bool | Insert (ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *obj) |
template<class SPECIFIC_TYPE , class KEY_TYPE , class H , class T > | |
SPECIFIC_TYPE * | Find (ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *obj) |
template<class SPECIFIC_TYPE , class KEY_TYPE , class H , class T > | |
bool | Remove (ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *obj) |
template<class SPECIFIC_TYPE , class KEY_TYPE , class H , class T > | |
bool | Size (ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > const &elements, std::size_t *size, SPECIFIC_TYPE *obj) |
template<class SPECIFIC_TYPE , class H , class T > | |
size_t | Count (ContainerMapList< TypeList< H, T > > const &elements, SPECIFIC_TYPE *fake) |
template<class SPECIFIC_TYPE , class H , class T > | |
SPECIFIC_TYPE * | Insert (ContainerMapList< TypeList< H, T > > &elements, SPECIFIC_TYPE *obj) |
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) |
uint32 | GetExpansionForLevel (uint32 level) |
void | SelectRandomInjuredTargets (std::list< WorldObject * > &targets, size_t maxTargets, bool prioritizePlayers) |
Variables | |
template<typename T , typename... Us> | |
constexpr bool | has_type_v = has_type<T, Us...>::value |
template<typename... Ts> | |
constexpr bool | is_tuple_v = is_tuple<Ts...>::value |
template<typename T > | |
constexpr bool | dependant_false_v = dependant_false<T>::value |
using Trinity::find_type_if_t = typedef typename find_type_if<Check, Ts...>::type |
using Trinity::FormatString = typedef fmt::format_string<Args...> |
Definition at line 26 of file StringFormat.h.
using Trinity::regex = typedef TC_REGEX_NAMESPACE :: regex |
using Trinity::wregex = typedef TC_REGEX_NAMESPACE :: wregex |
TC_COMMON_API void Trinity::Abort | ( | char const * | file, |
int | line, | ||
char const * | function | ||
) |
Definition at line 124 of file Errors.cpp.
TC_COMMON_API void Trinity::Abort | ( | char const * | file, |
int | line, | ||
char const * | function, | ||
char const * | message, | ||
... | |||
) |
Definition at line 132 of file Errors.cpp.
TC_COMMON_API void Trinity::AbortHandler | ( | int | sigval | ) |
Definition at line 146 of file Errors.cpp.
TC_COMMON_API void Trinity::Assert | ( | char const * | file, |
int | line, | ||
char const * | function, | ||
std::string | debugInfo, | ||
char const * | message | ||
) |
Definition at line 73 of file Errors.cpp.
TC_COMMON_API void Trinity::Assert | ( | char const * | file, |
int | line, | ||
char const * | function, | ||
std::string | debugInfo, | ||
char const * | message, | ||
char const * | format, | ||
... | |||
) |
Definition at line 81 of file Errors.cpp.
|
inline |
Definition at line 193 of file GridDefines.h.
|
inline |
Definition at line 216 of file GridDefines.h.
|
inline |
Definition at line 221 of file GridDefines.h.
|
inline |
Definition at line 204 of file GridDefines.h.
|
inline |
Definition at line 209 of file GridDefines.h.
|
inline |
Definition at line 112 of file TypeContainerFunctions.h.
|
static |
Definition at line 80 of file StartProcess.cpp.
TC_COMMON_API void TC_COMMON_API void TC_COMMON_API void Trinity::Error | ( | char const * | file, |
int | line, | ||
char const * | function, | ||
char const * | message | ||
) |
Definition at line 110 of file Errors.cpp.
TC_COMMON_API void TC_COMMON_API void Trinity::Fatal | ( | char const * | file, |
int | line, | ||
char const * | function, | ||
char const * | message, | ||
... | |||
) |
Definition at line 95 of file Errors.cpp.
|
inline |
Definition at line 60 of file TypeContainerFunctions.h.
Definition at line 31 of file Formulas.h.
std::string Trinity::GetTypeName | ( | ) |
std::string Trinity::GetTypeName | ( | T && | v | ) |
|
inline |
|
inline |
Definition at line 127 of file TypeContainerFunctions.h.
|
inline |
Definition at line 35 of file TypeContainerFunctions.h.
|
inline |
Returns true if the given char pointer is null.
Definition at line 43 of file StringFormat.h.
|
inlineconstexpr |
Definition at line 60 of file StringFormat.h.
|
inline |
Returns true if the given std::string is empty.
Definition at line 49 of file StringFormat.h.
|
inlineconstexpr |
Returns true if the given std::string_view is empty.
Definition at line 55 of file StringFormat.h.
|
inline |
Definition at line 241 of file GridDefines.h.
|
inline |
|
inline |
|
inline |
auto Trinity::make_unique_ptr_with_deleter | ( | T | ptr, |
Del && | deleter | ||
) |
Definition at line 41 of file Memory.h.
auto Trinity::MakeTCLogSink | ( | T && | callback | ) | -> TCLogSink<typename std::decay<T>::type> |
Definition at line 73 of file StartProcess.cpp.
T * Trinity::new_from_tuple | ( | Tuple && | args | ) |
|
inline |
Definition at line 233 of file GridDefines.h.
|
inline |
Definition at line 79 of file TypeContainerFunctions.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 268 of file StartProcess.cpp.
TC_GAME_API void Trinity::SelectRandomInjuredTargets | ( | std::list< WorldObject * > & | targets, |
size_t | maxTargets, | ||
bool | prioritizePlayers | ||
) |
Definition at line 9049 of file Spell.cpp.
|
inline |
Definition at line 95 of file TypeContainerFunctions.h.
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 258 of file StartProcess.cpp.
TC_COMMON_API int Trinity::StartProcess | ( | std::string const & | executable, |
std::vector< std::string > const & | args, | ||
std::string const & | 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 156 of file StartProcess.cpp.
|
inline |
Default TC string format function.
Definition at line 30 of file StringFormat.h.
Optional< Result > Trinity::StringTo | ( | std::string_view | str, |
Params &&... | params | ||
) |
Definition at line 263 of file StringConvert.h.
|
inline |
Definition at line 50 of file Util.h.
|
delete |
|
delete |
std::vector< std::string_view > Trinity::Tokenize | ( | std::string_view | str, |
char | sep, | ||
bool | keepEmpty | ||
) |
Definition at line 40 of file Util.cpp.
std::string Trinity::ToString | ( | Type && | val, |
Params &&... | params | ||
) |
Definition at line 269 of file StringConvert.h.
TC_COMMON_API void Trinity::Warning | ( | char const * | file, |
int | line, | ||
char const * | function, | ||
char const * | message | ||
) |
Definition at line 118 of file Errors.cpp.
|
constexpr |
|
constexpr |