#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <unistd.h>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstdarg>
#include <cstddef>
#include <algorithm>
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <deque>
#include <fstream>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <mutex>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <thread>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <variant>
#include "fmt.h"
#include "StringUtils.h"
#include "LoggerSimple.h"
#include "OSSupport/CriticalSection.h"
#include "OSSupport/Event.h"
#include "OSSupport/File.h"
#include "OSSupport/StackTrace.h"
#include "Vector3.h"
Go to the source code of this file.
|
#define | ARRAYCOUNT(X) (sizeof(X) / sizeof(*(X))) |
| Evaluates to the number of elements in an array (compile-time!) More...
|
|
#define | ASSERT(x) ( !!(x) || ( LOGERROR("Assertion failed: %s, file %s, line %i", #x, __FILE__, __LINE__), std::abort(), 0)) |
|
#define | DISALLOW_COPY_AND_ASSIGN(TypeName) |
|
#define | FAST_FLOOR_DIV(x, div) (((x) - (((x) < 0) ? ((div) - 1) : 0)) / (div)) |
| Faster than (int)floorf((float)x / (float)div) More...
|
|
#define | KiB * 1024 |
| Allows arithmetic expressions like "32 KiB" (but consider using parenthesis around it, "(32 KiB)") More...
|
|
#define | MiB * 1024 * 1024 |
|
#define | PLATFORM_CRYPTOGRAPHY 0 |
|
#define | TOLUA_TEMPLATE_BIND(x) |
|
#define | UNREACHABLE(x) ( FLOGERROR("Hit unreachable code: {0}, file {1}, line {2}", #x, __FILE__, __LINE__), std::abort(), 0) |
|
#define | UNUSED UNUSED_VAR |
|
#define | UNUSED_VAR(X) (void)(X) |
|
#define | VERIFY(x) (!!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__), std::abort(), 0)) |
|
|
typedef unsigned char | Byte |
|
typedef Byte | ColourID |
|
using | ContiguousByteBuffer = std::basic_string< std::byte > |
|
using | ContiguousByteBufferView = std::basic_string_view< std::byte > |
|
using | cTickTime = std::chrono::duration< signed int, std::ratio_multiply< std::chrono::milliseconds::period, std::ratio< 50 > >> |
|
using | cTickTimeLong = std::chrono::duration< signed long long int, cTickTime::period > |
|
typedef signed short | Int16 |
|
typedef signed int | Int32 |
|
typedef signed long long | Int64 |
|
typedef signed char | Int8 |
|
typedef unsigned short | UInt16 |
|
typedef unsigned int | UInt32 |
|
typedef unsigned long long | UInt64 |
|
typedef unsigned char | UInt8 |
|
|
template<typename C = int, typename T > |
std::enable_if< std::is_arithmetic< T >::value, C >::type | CeilC (T a_Value) |
| Ceils a value, then casts it to C (an int by default). More...
|
|
template<typename T > |
T | Clamp (T a_Value, T a_Min, T a_Max) |
| Clamp X to the specified range. More...
|
|
template<typename C = int, typename T > |
std::enable_if< std::is_arithmetic< T >::value, C >::type | FloorC (T a_Value) |
| Floors a value, then casts it to C (an int by default). More...
|
|
template<class T > |
std::enable_if_t<!std::is_array_v< T >, std::unique_ptr< T > > | cpp20::make_unique_for_overwrite () |
|
template<class T > |
std::enable_if_t< std::is_array_v< T > &&(std::extent_v< T >==0), std::unique_ptr< T > > | cpp20::make_unique_for_overwrite (std::size_t a_Size) |
|
constexpr std::string_view | methodName (std::string_view a_PrettyFunction) |
|
template<class... Ts> |
| OverloadedVariantAccess (Ts...) -> OverloadedVariantAccess< Ts... > |
|
template<typename T > |
auto | ToUnsigned (T a_Val) |
|
◆ ARRAYCOUNT
#define ARRAYCOUNT |
( |
|
X | ) |
(sizeof(X) / sizeof(*(X))) |
Evaluates to the number of elements in an array (compile-time!)
Definition at line 231 of file Globals.h.
◆ ASSERT
#define ASSERT |
( |
|
x | ) |
( !!(x) || ( LOGERROR("Assertion failed: %s, file %s, line %i", #x, __FILE__, __LINE__), std::abort(), 0)) |
◆ DISALLOW_COPY_AND_ASSIGN
#define DISALLOW_COPY_AND_ASSIGN |
( |
|
TypeName | ) |
|
Value: TypeName(const TypeName &) = delete; \
TypeName & operator =(const TypeName &) = delete
Definition at line 59 of file Globals.h.
◆ FAST_FLOOR_DIV
#define FAST_FLOOR_DIV |
( |
|
x, |
|
|
|
div |
|
) |
| (((x) - (((x) < 0) ? ((div) - 1) : 0)) / (div)) |
Faster than (int)floorf((float)x / (float)div)
Definition at line 238 of file Globals.h.
◆ KiB
Allows arithmetic expressions like "32 KiB" (but consider using parenthesis around it, "(32 KiB)")
Definition at line 234 of file Globals.h.
◆ MiB
#define MiB * 1024 * 1024 |
◆ PLATFORM_CRYPTOGRAPHY
#define PLATFORM_CRYPTOGRAPHY 0 |
◆ TOLUA_TEMPLATE_BIND
#define TOLUA_TEMPLATE_BIND |
( |
|
x | ) |
|
◆ UNREACHABLE
#define UNREACHABLE |
( |
|
x | ) |
( FLOGERROR("Hit unreachable code: {0}, file {1}, line {2}", #x, __FILE__, __LINE__), std::abort(), 0) |
◆ UNUSED
◆ UNUSED_VAR
#define UNUSED_VAR |
( |
|
X | ) |
(void)(X) |
◆ VERIFY
#define VERIFY |
( |
|
x | ) |
(!!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__), std::abort(), 0)) |
◆ Byte
typedef unsigned char Byte |
◆ ColourID
◆ ContiguousByteBuffer
◆ ContiguousByteBufferView
◆ cTickTime
using cTickTime = std::chrono::duration<signed int, std::ratio_multiply<std::chrono::milliseconds::period, std::ratio<50> >> |
◆ cTickTimeLong
using cTickTimeLong = std::chrono::duration<signed long long int, cTickTime::period> |
◆ Int16
typedef signed short Int16 |
◆ Int32
◆ Int64
typedef signed long long Int64 |
◆ Int8
◆ UInt16
◆ UInt32
◆ UInt64
typedef unsigned long long UInt64 |
◆ UInt8
typedef unsigned char UInt8 |
◆ CeilC()
template<typename C = int, typename T >
std::enable_if<std::is_arithmetic<T>::value, C>::type CeilC |
( |
T |
a_Value | ) |
|
Ceils a value, then casts it to C (an int by default).
Definition at line 354 of file Globals.h.
◆ Clamp()
template<typename T >
T Clamp |
( |
T |
a_Value, |
|
|
T |
a_Min, |
|
|
T |
a_Max |
|
) |
| |
Clamp X to the specified range.
Definition at line 336 of file Globals.h.
◆ FloorC()
template<typename C = int, typename T >
std::enable_if<std::is_arithmetic<T>::value, C>::type FloorC |
( |
T |
a_Value | ) |
|
Floors a value, then casts it to C (an int by default).
Definition at line 347 of file Globals.h.
◆ methodName()
constexpr std::string_view methodName |
( |
std::string_view |
a_PrettyFunction | ) |
|
|
constexpr |
◆ OverloadedVariantAccess()
◆ ToUnsigned()
template<typename T >
auto ToUnsigned |
( |
T |
a_Val | ) |
|