![]() |
TrinityCore
|
Namespaces | |
Asio | |
Banner | |
ChatCommands | |
Containers | |
Crypto | |
Currency | |
Encoding | |
Honor | |
Hyperlinks | |
Impl | |
Legacy | |
Net | |
Predicates | |
SpellScripts | |
XP | |
Typedefs | |
using | regex = TC_REGEX_NAMESPACE ::regex |
using | wregex = TC_REGEX_NAMESPACE ::wregex |
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<class T > | |
constexpr T * | AddressOrSelf (T *ptr) |
template<class T > | |
constexpr T * | AddressOrSelf (T ¬_ptr) |
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 Format , typename... Args> | |
std::string | StringFormat (Format &&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... | |
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<class SPECIFIC_TYPE , class KEY_TYPE > | |
bool | Insert (ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *obj) |
template<class SPECIFIC_TYPE , class KEY_TYPE > | |
bool | Insert (ContainerUnorderedMap< TypeNull, KEY_TYPE > &, KEY_TYPE const &, SPECIFIC_TYPE *) |
template<class SPECIFIC_TYPE , class KEY_TYPE , class T > | |
bool | Insert (ContainerUnorderedMap< T, KEY_TYPE > &, KEY_TYPE const &, SPECIFIC_TYPE *) |
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 > | |
SPECIFIC_TYPE * | Find (ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *) |
template<class SPECIFIC_TYPE , class KEY_TYPE > | |
SPECIFIC_TYPE * | Find (ContainerUnorderedMap< TypeNull, KEY_TYPE > const &, KEY_TYPE const &, SPECIFIC_TYPE *) |
template<class SPECIFIC_TYPE , class KEY_TYPE , class T > | |
SPECIFIC_TYPE * | Find (ContainerUnorderedMap< T, KEY_TYPE > const &, KEY_TYPE const &, SPECIFIC_TYPE *) |
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 *) |
template<class SPECIFIC_TYPE , class KEY_TYPE > | |
bool | Remove (ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *) |
template<class SPECIFIC_TYPE , class KEY_TYPE > | |
bool | Remove (ContainerUnorderedMap< TypeNull, KEY_TYPE > &, KEY_TYPE const &, SPECIFIC_TYPE *) |
template<class SPECIFIC_TYPE , class KEY_TYPE , class T > | |
bool | Remove (ContainerUnorderedMap< T, KEY_TYPE > &, KEY_TYPE const &, SPECIFIC_TYPE *) |
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 *) |
template<class SPECIFIC_TYPE , class KEY_TYPE > | |
bool | Size (ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, std::size_t *size, SPECIFIC_TYPE *) |
template<class SPECIFIC_TYPE , class KEY_TYPE > | |
bool | Size (ContainerUnorderedMap< TypeNull, KEY_TYPE > const &, std::size_t *, SPECIFIC_TYPE *) |
template<class SPECIFIC_TYPE , class KEY_TYPE , class T > | |
bool | Size (ContainerUnorderedMap< T, KEY_TYPE > const &, std::size_t *, SPECIFIC_TYPE *) |
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 *) |
template<class SPECIFIC_TYPE > | |
size_t | Count (ContainerMapList< SPECIFIC_TYPE > const &elements, SPECIFIC_TYPE *) |
template<class SPECIFIC_TYPE > | |
size_t | Count (ContainerMapList< TypeNull > const &, SPECIFIC_TYPE *) |
template<class SPECIFIC_TYPE , class T > | |
size_t | Count (ContainerMapList< T > const &, SPECIFIC_TYPE *) |
template<class SPECIFIC_TYPE , class T > | |
size_t | Count (ContainerMapList< TypeList< SPECIFIC_TYPE, T >> const &elements, SPECIFIC_TYPE *fake) |
template<class SPECIFIC_TYPE , class H , class T > | |
size_t | Count (ContainerMapList< TypeList< H, T >> const &elements, SPECIFIC_TYPE *fake) |
template<class SPECIFIC_TYPE > | |
SPECIFIC_TYPE * | Insert (ContainerMapList< SPECIFIC_TYPE > &elements, SPECIFIC_TYPE *obj) |
template<class SPECIFIC_TYPE > | |
SPECIFIC_TYPE * | Insert (ContainerMapList< TypeNull > &, SPECIFIC_TYPE *) |
template<class SPECIFIC_TYPE , class T > | |
SPECIFIC_TYPE * | Insert (ContainerMapList< T > &, SPECIFIC_TYPE *) |
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::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 | ||
) |
TC_COMMON_API void Trinity::Abort | ( | char const * | file, |
int | line, | ||
char const * | function, | ||
char const * | message, | ||
... | |||
) |
TC_COMMON_API void Trinity::AbortHandler | ( | int | sigval | ) |
|
inline |
|
inline |
TC_COMMON_API void Trinity::Assert | ( | char const * | file, |
int | line, | ||
char const * | function, | ||
std::string | debugInfo, | ||
char const * | message | ||
) |
TC_COMMON_API void Trinity::Assert | ( | char const * | file, |
int | line, | ||
char const * | function, | ||
std::string | debugInfo, | ||
char const * | message, | ||
char const * | format, | ||
... | |||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
size_t Trinity::Count | ( | ContainerMapList< SPECIFIC_TYPE > const & | elements, |
SPECIFIC_TYPE * | |||
) |
size_t Trinity::Count | ( | ContainerMapList< TypeNull > const & | , |
SPECIFIC_TYPE * | |||
) |
size_t Trinity::Count | ( | ContainerMapList< T > const & | , |
SPECIFIC_TYPE * | |||
) |
size_t Trinity::Count | ( | ContainerMapList< TypeList< SPECIFIC_TYPE, T >> const & | elements, |
SPECIFIC_TYPE * | fake | ||
) |
size_t Trinity::Count | ( | ContainerMapList< TypeList< H, T >> const & | elements, |
SPECIFIC_TYPE * | fake | ||
) |
|
static |
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 | ||
) |
TC_COMMON_API void TC_COMMON_API void Trinity::Fatal | ( | char const * | file, |
int | line, | ||
char const * | function, | ||
char const * | message, | ||
... | |||
) |
SPECIFIC_TYPE* Trinity::Find | ( | ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const & | elements, |
KEY_TYPE const & | handle, | ||
SPECIFIC_TYPE * | |||
) |
SPECIFIC_TYPE* Trinity::Find | ( | ContainerUnorderedMap< TypeNull, KEY_TYPE > const & | , |
KEY_TYPE const & | , | ||
SPECIFIC_TYPE * | |||
) |
SPECIFIC_TYPE* Trinity::Find | ( | ContainerUnorderedMap< T, KEY_TYPE > const & | , |
KEY_TYPE const & | , | ||
SPECIFIC_TYPE * | |||
) |
SPECIFIC_TYPE* Trinity::Find | ( | ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > const & | elements, |
KEY_TYPE const & | handle, | ||
SPECIFIC_TYPE * | |||
) |
|
inline |
bool Trinity::Insert | ( | ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > & | elements, |
KEY_TYPE const & | handle, | ||
SPECIFIC_TYPE * | obj | ||
) |
bool Trinity::Insert | ( | ContainerUnorderedMap< TypeNull, KEY_TYPE > & | , |
KEY_TYPE const & | , | ||
SPECIFIC_TYPE * | |||
) |
bool Trinity::Insert | ( | ContainerUnorderedMap< T, KEY_TYPE > & | , |
KEY_TYPE const & | , | ||
SPECIFIC_TYPE * | |||
) |
bool Trinity::Insert | ( | ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > & | elements, |
KEY_TYPE const & | handle, | ||
SPECIFIC_TYPE * | obj | ||
) |
SPECIFIC_TYPE* Trinity::Insert | ( | ContainerMapList< SPECIFIC_TYPE > & | elements, |
SPECIFIC_TYPE * | obj | ||
) |
SPECIFIC_TYPE* Trinity::Insert | ( | ContainerMapList< TypeNull > & | , |
SPECIFIC_TYPE * | |||
) |
SPECIFIC_TYPE* Trinity::Insert | ( | ContainerMapList< T > & | , |
SPECIFIC_TYPE * | |||
) |
SPECIFIC_TYPE* Trinity::Insert | ( | ContainerMapList< TypeList< H, T >> & | elements, |
SPECIFIC_TYPE * | obj | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
auto Trinity::make_unique_ptr_with_deleter | ( | T | ptr, |
Del && | deleter | ||
) |
auto Trinity::MakeTCLogSink | ( | T && | callback | ) | -> TCLogSink<typename std::decay<T>::type> |
T* Trinity::new_from_tuple | ( | Tuple && | args | ) |
|
inline |
bool Trinity::Remove | ( | ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > & | elements, |
KEY_TYPE const & | handle, | ||
SPECIFIC_TYPE * | |||
) |
bool Trinity::Remove | ( | ContainerUnorderedMap< TypeNull, KEY_TYPE > & | , |
KEY_TYPE const & | , | ||
SPECIFIC_TYPE * | |||
) |
bool Trinity::Remove | ( | ContainerUnorderedMap< T, KEY_TYPE > & | , |
KEY_TYPE const & | , | ||
SPECIFIC_TYPE * | |||
) |
bool Trinity::Remove | ( | ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > & | elements, |
KEY_TYPE const & | handle, | ||
SPECIFIC_TYPE * | |||
) |
TC_COMMON_API std::string Trinity::SearchExecutableInPath | ( | std::string const & | filename | ) |
TC_GAME_API void Trinity::SelectRandomInjuredTargets | ( | std::list< WorldObject *> & | targets, |
size_t | maxTargets, | ||
bool | prioritizePlayers | ||
) |
bool Trinity::Size | ( | ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const & | elements, |
std::size_t * | size, | ||
SPECIFIC_TYPE * | |||
) |
bool Trinity::Size | ( | ContainerUnorderedMap< TypeNull, KEY_TYPE > const & | , |
std::size_t * | , | ||
SPECIFIC_TYPE * | |||
) |
bool Trinity::Size | ( | ContainerUnorderedMap< T, KEY_TYPE > const & | , |
std::size_t * | , | ||
SPECIFIC_TYPE * | |||
) |
bool Trinity::Size | ( | ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > const & | elements, |
std::size_t * | size, | ||
SPECIFIC_TYPE * | |||
) |
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.
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.
|
inline |
Optional<Result> Trinity::StringTo | ( | std::string_view | str, |
Params &&... | params | ||
) |
std::vector< std::string_view > Trinity::Tokenize | ( | std::string_view | str, |
char | sep, | ||
bool | keepEmpty | ||
) |
|
delete |
|
delete |
|
inline |
std::string Trinity::ToString | ( | Type && | val, |
Params &&... | params | ||
) |
TC_COMMON_API void Trinity::Warning | ( | char const * | file, |
int | line, | ||
char const * | function, | ||
char const * | message | ||
) |
constexpr bool Trinity::dependant_false_v = dependant_false<T>::value |
constexpr bool Trinity::has_type_v = has_type<T, Us...>::value |
constexpr bool Trinity::is_tuple_v = is_tuple<Ts...>::value |