Otclient
14/8/2020
|
Classes | |
class | any |
struct | boolean |
struct | can_pack_in_any |
class | cast_exception |
class | dynamic_storage |
class | exception |
struct | expand_snprintf |
struct | expand_snprintf< 0 > |
class | packed_any |
class | packed_storage |
class | packed_vector |
struct | remove_const_ref |
struct | replace_extent |
struct | replace_extent< T[]> |
struct | replace_extent< T[N]> |
class | shared_base |
class | shared_object |
class | shared_object_ptr |
class | shared_ptr |
struct | timer |
class | weak_ptr |
Functions | |
template<typename T > | |
const T & | any_cast (const any &operand) |
template<typename T , typename R > | |
bool | cast (const T &in, R &out) |
template<typename T > | |
bool | cast (const T &in, std::string &out) |
template<> | |
bool | cast (const std::string &in, std::string &out) |
template<> | |
bool | cast (const std::string &in, bool &b) |
template<> | |
bool | cast (const std::string &in, char &c) |
template<> | |
bool | cast (const std::string &in, long &l) |
template<> | |
bool | cast (const std::string &in, int &i) |
template<> | |
bool | cast (const std::string &in, double &d) |
template<> | |
bool | cast (const std::string &in, float &f) |
template<> | |
bool | cast (const bool &in, std::string &out) |
template<typename R , typename T > | |
R | safe_cast (const T &t) |
template<typename R , typename T > | |
R | unsafe_cast (const T &t, R def=R()) |
const char * | demangle_name (const char *name) |
Demangle names for GNU g++ compiler. More... | |
template<typename T > | |
std::string | demangle_class () |
Returns the name of a class. More... | |
template<typename T > | |
std::string | demangle_type () |
Returns the name of a type. More... | |
void | throw_exception (const std::string &what) |
Throws a generic exception. More... | |
template<class T > | |
void | print_ostream (std::ostringstream &stream, const T &last) |
template<class T , class... Args> | |
void | print_ostream (std::ostringstream &stream, const T &first, const Args &... rest) |
template<class... T> | |
void | print (const T &... args) |
template<typename T > | |
std::enable_if< std::is_integral< T >::value||std::is_pointer< T >::value||std::is_floating_point< T >::value||std::is_enum< T >::value, T >::type | sprintf_cast (const T &t) |
const char * | sprintf_cast (const char *s) |
const char * | sprintf_cast (const std::string &s) |
template<typename... Args> | |
int | snprintf (char *s, size_t maxlen, const char *format, const Args &... args) |
template<typename... Args> | |
int | snprintf (char *s, size_t maxlen, const char *format) |
template<typename... Args> | |
std::string | format () |
template<typename... Args> | |
std::string | format (const std::string &format) |
template<typename... Args> | |
std::string | format (const std::string &format, const Args &... args) |
uint32_t | adler32 (const uint8_t *buffer, size_t size) |
long | random_range (long min, long max) |
float | random_range (float min, float max) |
double | round (double r) |
bool | is_power_of_two (size_t v) |
size_t | to_power_of_two (size_t v) |
uint16_t | readULE16 (const uchar *addr) |
uint32_t | readULE32 (const uchar *addr) |
uint64_t | readULE64 (const uchar *addr) |
void | writeULE16 (uchar *addr, uint16_t value) |
void | writeULE32 (uchar *addr, uint32_t value) |
void | writeULE64 (uchar *addr, uint64_t value) |
int16_t | readSLE16 (const uchar *addr) |
int32_t | readSLE32 (const uchar *addr) |
int64_t | readSLE64 (const uchar *addr) |
void | writeSLE16 (uchar *addr, int16_t value) |
void | writeSLE32 (uchar *addr, int32_t value) |
void | writeSLE64 (uchar *addr, int64_t value) |
template<typename T > | |
T | clamp (T x, T min, T max) |
std::string | ip_to_string (uint32 ip) |
uint32 | string_to_ip (const std::string &string) |
std::vector< uint32 > | listSubnetAddresses (uint32 address, uint8 mask) |
template<typename T > | |
std::enable_if< can_pack_in_any< T >::value, T >::type | packed_any_cast (const packed_any &operand) |
template<typename T > | |
std::enable_if<!can_pack_in_any< T >::value, T >::type | packed_any_cast (const packed_any &operand) |
template<class T , class U > | |
bool | operator== (shared_object_ptr< T > const &a, shared_object_ptr< U > const &b) |
template<class T , class U > | |
bool | operator!= (shared_object_ptr< T > const &a, shared_object_ptr< U > const &b) |
template<class T , class U > | |
bool | operator== (shared_object_ptr< T > const &a, U *b) |
template<class T , class U > | |
bool | operator!= (shared_object_ptr< T > const &a, U *b) |
template<class T , class U > | |
bool | operator== (T *a, shared_object_ptr< U > const &b) |
template<class T , class U > | |
bool | operator!= (T *a, shared_object_ptr< U > const &b) |
template<class T > | |
bool | operator< (shared_object_ptr< T > const &a, shared_object_ptr< T > const &b) |
template<class T > | |
T * | get_pointer (shared_object_ptr< T > const &p) |
template<class T , class U > | |
shared_object_ptr< T > | static_pointer_cast (shared_object_ptr< U > const &p) |
template<class T , class U > | |
shared_object_ptr< T > | const_pointer_cast (shared_object_ptr< U > const &p) |
template<class T , class U > | |
shared_object_ptr< T > | dynamic_pointer_cast (shared_object_ptr< U > const &p) |
template<class T , typename... Args> | |
stdext::shared_object_ptr< T > | make_shared_object (Args... args) |
template<class E , class T , class Y > | |
std::basic_ostream< E, T > & | operator<< (std::basic_ostream< E, T > &os, shared_object_ptr< Y > const &p) |
template<class T , class U > | |
bool | operator== (shared_ptr< T > const &a, shared_ptr< U > const &b) |
template<class T , class U > | |
bool | operator== (weak_ptr< T > const &a, weak_ptr< U > const &b) |
template<class T , class U > | |
bool | operator== (shared_ptr< T > const &a, weak_ptr< U > const &b) |
template<class T , class U > | |
bool | operator== (weak_ptr< T > const &a, shared_ptr< U > const &b) |
template<class T , class U > | |
bool | operator!= (shared_ptr< T > const &a, shared_ptr< U > const &b) |
template<class T , class U > | |
bool | operator!= (weak_ptr< T > const &a, weak_ptr< U > const &b) |
template<class T , class U > | |
bool | operator!= (shared_ptr< T > const &a, weak_ptr< U > const &b) |
template<class T , class U > | |
bool | operator!= (weak_ptr< T > const &a, shared_ptr< U > const &b) |
template<class T , class U > | |
bool | operator== (shared_ptr< T > const &a, U *b) |
template<class T , class U > | |
bool | operator== (weak_ptr< T > const &a, U *b) |
template<class T , class U > | |
bool | operator!= (shared_ptr< T > const &a, U *b) |
template<class T , class U > | |
bool | operator!= (weak_ptr< T > const &a, U *b) |
template<class T , class U > | |
bool | operator== (T *a, shared_ptr< U > const &b) |
template<class T , class U > | |
bool | operator== (T *a, weak_ptr< U > const &b) |
template<class T , class U > | |
bool | operator!= (T *a, shared_ptr< U > const &b) |
template<class T , class U > | |
bool | operator!= (T *a, weak_ptr< U > const &b) |
template<class T > | |
bool | operator< (shared_ptr< T > const &a, shared_ptr< T > const &b) |
template<class T > | |
bool | operator< (weak_ptr< T > const &a, weak_ptr< T > const &b) |
template<class T > | |
T * | get_pointer (shared_ptr< T > const &p) |
template<class T > | |
T * | get_pointer (weak_ptr< T > const &p) |
template<class T , class U > | |
shared_ptr< T > | static_pointer_cast (shared_ptr< U > const &p) |
template<class T , class U > | |
shared_ptr< T > | const_pointer_cast (shared_ptr< U > const &p) |
template<class T , class U > | |
shared_ptr< T > | dynamic_pointer_cast (shared_ptr< U > const &p) |
template<class T , typename... Args> | |
stdext::shared_ptr< T > | make_shared (Args... args) |
template<class E , class T , class Y > | |
std::basic_ostream< E, T > & | operator<< (std::basic_ostream< E, T > &os, shared_ptr< Y > const &p) |
template<class E , class T , class Y > | |
std::basic_ostream< E, T > & | operator<< (std::basic_ostream< E, T > &os, weak_ptr< Y > const &p) |
std::string | resolve_path (const std::string &filePath, std::string sourcePath) |
Resolve a file path by combining sourcePath with filePath. More... | |
std::string | date_time_string () |
Get current date and time in a std::string. More... | |
std::string | dec_to_hex (uint64_t num) |
uint64_t | hex_to_dec (const std::string &str) |
bool | is_valid_utf8 (const std::string &src) |
std::string | utf8_to_latin1 (const std::string &src) |
std::string | latin1_to_utf8 (const std::string &src) |
void | tolower (std::string &str) |
void | toupper (std::string &str) |
void | trim (std::string &str) |
char | upchar (char c) |
char | lochar (char c) |
void | ucwords (std::string &str) |
bool | ends_with (const std::string &str, const std::string &test) |
bool | starts_with (const std::string &str, const std::string &test) |
void | replace_all (std::string &str, const std::string &search, const std::string &replacement) |
std::vector< std::string > | split (const std::string &str, const std::string &separators) |
template<typename T > | |
std::string | to_string (const T &t) |
template<typename T > | |
T | from_string (const std::string &str, T def=T()) |
ticks_t | time () |
ticks_t | millis () |
ticks_t | micros () |
void | millisleep (size_t ms) |
void | microsleep (size_t us) |
uint32_t stdext::adler32 | ( | const uint8_t * | buffer, |
size_t | size | ||
) |
const T& stdext::any_cast | ( | const any & | operand | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool stdext::cast | ( | const T & | in, |
R & | out | ||
) |
bool stdext::cast | ( | const T & | in, |
std::string & | out | ||
) |
shared_object_ptr<T> stdext::const_pointer_cast | ( | shared_object_ptr< U > const & | p | ) |
Definition at line 121 of file shared_object.h.
shared_ptr<T> stdext::const_pointer_cast | ( | shared_ptr< U > const & | p | ) |
Definition at line 210 of file shared_ptr.h.
std::string stdext::date_time_string | ( | ) |
Get current date and time in a std::string.
Definition at line 48 of file string.cpp.
std::string stdext::dec_to_hex | ( | uint64_t | num | ) |
Definition at line 58 of file string.cpp.
std::string stdext::demangle_class | ( | ) |
Returns the name of a class.
Definition at line 35 of file demangle.h.
const char * stdext::demangle_name | ( | const char * | name | ) |
Demangle names for GNU g++ compiler.
Definition at line 45 of file demangle.cpp.
std::string stdext::demangle_type | ( | ) |
Returns the name of a type.
Definition at line 44 of file demangle.h.
shared_object_ptr<T> stdext::dynamic_pointer_cast | ( | shared_object_ptr< U > const & | p | ) |
Definition at line 122 of file shared_object.h.
shared_ptr<T> stdext::dynamic_pointer_cast | ( | shared_ptr< U > const & | p | ) |
Definition at line 211 of file shared_ptr.h.
bool stdext::ends_with | ( | const std::string & | str, |
const std::string & | test | ||
) |
|
inline |
|
inline |
std::string stdext::format | ( | const std::string & | format, |
const Args &... | args | ||
) |
T stdext::from_string | ( | const std::string & | str, |
T | def = T() |
||
) |
T* stdext::get_pointer | ( | shared_object_ptr< T > const & | p | ) |
Definition at line 119 of file shared_object.h.
T* stdext::get_pointer | ( | shared_ptr< T > const & | p | ) |
Definition at line 207 of file shared_ptr.h.
T* stdext::get_pointer | ( | weak_ptr< T > const & | p | ) |
uint64_t stdext::hex_to_dec | ( | const std::string & | str | ) |
std::string stdext::ip_to_string | ( | uint32 | ip | ) |
|
inline |
bool stdext::is_valid_utf8 | ( | const std::string & | src | ) |
std::string stdext::latin1_to_utf8 | ( | const std::string & | src | ) |
char stdext::lochar | ( | char | c | ) |
stdext::shared_ptr<T> stdext::make_shared | ( | Args... | args | ) |
stdext::shared_object_ptr<T> stdext::make_shared_object | ( | Args... | args | ) |
Definition at line 123 of file shared_object.h.
ticks_t stdext::micros | ( | ) |
void stdext::microsleep | ( | size_t | us | ) |
ticks_t stdext::millis | ( | ) |
void stdext::millisleep | ( | size_t | ms | ) |
bool stdext::operator!= | ( | shared_object_ptr< T > const & | a, |
shared_object_ptr< U > const & | b | ||
) |
Definition at line 112 of file shared_object.h.
bool stdext::operator!= | ( | shared_object_ptr< T > const & | a, |
U * | b | ||
) |
Definition at line 114 of file shared_object.h.
bool stdext::operator!= | ( | shared_ptr< T > const & | a, |
shared_ptr< U > const & | b | ||
) |
Definition at line 192 of file shared_ptr.h.
bool stdext::operator!= | ( | shared_ptr< T > const & | a, |
U * | b | ||
) |
Definition at line 198 of file shared_ptr.h.
bool stdext::operator!= | ( | shared_ptr< T > const & | a, |
weak_ptr< U > const & | b | ||
) |
bool stdext::operator!= | ( | T * | a, |
shared_object_ptr< U > const & | b | ||
) |
Definition at line 116 of file shared_object.h.
bool stdext::operator!= | ( | T * | a, |
shared_ptr< U > const & | b | ||
) |
Definition at line 202 of file shared_ptr.h.
bool stdext::operator!= | ( | T * | a, |
weak_ptr< U > const & | b | ||
) |
bool stdext::operator!= | ( | weak_ptr< T > const & | a, |
shared_ptr< U > const & | b | ||
) |
bool stdext::operator!= | ( | weak_ptr< T > const & | a, |
U * | b | ||
) |
bool stdext::operator< | ( | shared_object_ptr< T > const & | a, |
shared_object_ptr< T > const & | b | ||
) |
Definition at line 117 of file shared_object.h.
bool stdext::operator< | ( | shared_ptr< T > const & | a, |
shared_ptr< T > const & | b | ||
) |
Definition at line 204 of file shared_ptr.h.
std::basic_ostream<E, T>& stdext::operator<< | ( | std::basic_ostream< E, T > & | os, |
shared_object_ptr< Y > const & | p | ||
) |
Definition at line 126 of file shared_object.h.
std::basic_ostream<E, T>& stdext::operator<< | ( | std::basic_ostream< E, T > & | os, |
shared_ptr< Y > const & | p | ||
) |
Definition at line 215 of file shared_ptr.h.
std::basic_ostream<E, T>& stdext::operator<< | ( | std::basic_ostream< E, T > & | os, |
weak_ptr< Y > const & | p | ||
) |
bool stdext::operator== | ( | shared_object_ptr< T > const & | a, |
shared_object_ptr< U > const & | b | ||
) |
Definition at line 111 of file shared_object.h.
bool stdext::operator== | ( | shared_object_ptr< T > const & | a, |
U * | b | ||
) |
Definition at line 113 of file shared_object.h.
bool stdext::operator== | ( | shared_ptr< T > const & | a, |
shared_ptr< U > const & | b | ||
) |
Definition at line 188 of file shared_ptr.h.
bool stdext::operator== | ( | shared_ptr< T > const & | a, |
U * | b | ||
) |
Definition at line 196 of file shared_ptr.h.
bool stdext::operator== | ( | shared_ptr< T > const & | a, |
weak_ptr< U > const & | b | ||
) |
bool stdext::operator== | ( | T * | a, |
shared_object_ptr< U > const & | b | ||
) |
Definition at line 115 of file shared_object.h.
bool stdext::operator== | ( | T * | a, |
shared_ptr< U > const & | b | ||
) |
Definition at line 200 of file shared_ptr.h.
bool stdext::operator== | ( | T * | a, |
weak_ptr< U > const & | b | ||
) |
bool stdext::operator== | ( | weak_ptr< T > const & | a, |
shared_ptr< U > const & | b | ||
) |
bool stdext::operator== | ( | weak_ptr< T > const & | a, |
U * | b | ||
) |
std::enable_if<can_pack_in_any<T>::value, T>::type stdext::packed_any_cast | ( | const packed_any & | operand | ) |
Definition at line 93 of file packed_any.h.
std::enable_if<!can_pack_in_any<T>::value, T>::type stdext::packed_any_cast | ( | const packed_any & | operand | ) |
void stdext::print | ( | const T &... | args | ) |
void stdext::print_ostream | ( | std::ostringstream & | stream, |
const T & | first, | ||
const Args &... | rest | ||
) |
void stdext::print_ostream | ( | std::ostringstream & | stream, |
const T & | last | ||
) |
long stdext::random_range | ( | long | min, |
long | max | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void stdext::replace_all | ( | std::string & | str, |
const std::string & | search, | ||
const std::string & | replacement | ||
) |
std::string stdext::resolve_path | ( | const std::string & | filePath, |
std::string | sourcePath | ||
) |
Resolve a file path by combining sourcePath with filePath.
Definition at line 35 of file string.cpp.
double stdext::round | ( | double | r | ) |
R stdext::safe_cast | ( | const T & | t | ) |
|
inline |
int stdext::snprintf | ( | char * | s, |
size_t | maxlen, | ||
const char * | format, | ||
const Args &... | args | ||
) |
std::vector< std::string > stdext::split | ( | const std::string & | str, |
const std::string & | separators | ||
) |
|
inline |
std::enable_if<std::is_integral<T>::value || std::is_pointer<T>::value || std::is_floating_point<T>::value || std::is_enum<T>::value, T>::type stdext::sprintf_cast | ( | const T & | t | ) |
bool stdext::starts_with | ( | const std::string & | str, |
const std::string & | test | ||
) |
shared_object_ptr<T> stdext::static_pointer_cast | ( | shared_object_ptr< U > const & | p | ) |
Definition at line 120 of file shared_object.h.
shared_ptr<T> stdext::static_pointer_cast | ( | shared_ptr< U > const & | p | ) |
Definition at line 209 of file shared_ptr.h.
uint32 stdext::string_to_ip | ( | const std::string & | string | ) |
|
inline |
Throws a generic exception.
Definition at line 43 of file exception.h.
ticks_t stdext::time | ( | ) |
|
inline |
std::string stdext::to_string | ( | const T & | t | ) |
void stdext::tolower | ( | std::string & | str | ) |
Definition at line 216 of file string.cpp.
void stdext::toupper | ( | std::string & | str | ) |
Definition at line 221 of file string.cpp.
void stdext::trim | ( | std::string & | str | ) |
void stdext::ucwords | ( | std::string & | str | ) |
Definition at line 245 of file string.cpp.
R stdext::unsafe_cast | ( | const T & | t, |
R | def = R() |
||
) |
char stdext::upchar | ( | char | c | ) |
std::string stdext::utf8_to_latin1 | ( | const std::string & | src | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |