Enigma
3.2.0
A Simple, Reliable and Efficient Encryption Tool
|
Go to the source code of this file.
Macros | |
#define | ENIGMA_MACROS_H |
#define | NS_ENIGMA_BEGIN namespace Enigma { |
Enable/Disable Assertions. More... | |
#define | NS_ENIGMA_END } |
#define | USING_NS_ENIGMA using namespace Enigma; |
Enigma NAME SPACE DECLARATION. More... | |
#define | enigma Enigma |
#define | ENIGMA_BIND_FUN(fun) [this](auto&&...args) -> decltype(auto) { return this->fun(std::forward<decltype(args)>(args)...); } |
Bind Event function call back macro (alternative to std::bind for modern & better c++) More... | |
#define | ENIGMA_ASSERT(x, ...) |
Asserts. More... | |
#define | ENIGMA_ASSERT(x, ...) |
Asserts. More... | |
#define | ENIGMA_ASSERT_OR_THROW(x, msg) |
#define | ENIGMA_ASSERT_OR_RETURN(x, msg, ret) |
#define | ENIGMA_SAFE_DELETE_PTR(ptr) |
Enigma Memory Safe Operations. More... | |
#define | ENIGMA_SAFE_DELETE_ARRAY_PTR(ptr) |
#define | ENIGMA_SAFE_DELETE_LIST_PTR(list) |
#define | BIT(x) (1 << x) |
Bit Shift. More... | |
#define | ENIGMA_ARRAY_SIZE(arr) static_cast<::Enigma::std::size_t>(sizeof(arr) / sizeof((arr)[0])) |
Array Size. More... | |
#define | ENIGMA_IS_BETWEEN(v, mi, ma) (v >= mi && v <= ma) |
Check if value is between or equal a range. More... | |
#define | ENIGMA_CURRENT_FUNCTION "<unknown function>" |
#define | ENIGMA_NON_COPYABLE(Class) |
Prevent class copying or moving. More... | |
#define | ENIGMA_NON_MOVEABLE(Class) Class& operator=(Class&& obj) = delete; |
#define | ENIGMA_STATIC_CLASS(Class) |
Makes a class static, which will prevent creating instances from it and only use it as Class::Func().. More... | |
#define | ENIGMA_BEGIN_TIMER(var) const auto var = std::chrono::steady_clock::now() |
Begin and end timer with a unit. More... | |
#define | ENIGMA_END_TIMER(var, type, unit) std::chrono::duration_cast<std::chrono::duration<type, unit>>(std::chrono::steady_clock::now() - var).count() |
#define | ENIGMA_TRACE_CURRENT_FUNCTION() |
Logs current function for debugging. More... | |
#define | ENIGMA_ENUM_DECLARE_BEGIN_END(begin) |
Allows looping over an enum by providing a BEGIN and END enum values NOTE: should be placed at the end of the enum, providing the first element of the enum. More... | |
#define | ENIGMA_ENUM_CLASS_BITWISE_OPERATORS(_enum, _type) |
Implements bitwise operators for enum classes. More... | |
#define BIT | ( | x | ) | (1 << x) |
Bit Shift.
Definition at line 74 of file Macros.hpp.
#define enigma Enigma |
Definition at line 20 of file Macros.hpp.
#define ENIGMA_ARRAY_SIZE | ( | arr | ) | static_cast<::Enigma::std::size_t>(sizeof(arr) / sizeof((arr)[0])) |
Array Size.
Definition at line 78 of file Macros.hpp.
#define ENIGMA_ASSERT | ( | x, | |
... | |||
) |
Asserts.
Definition at line 38 of file Macros.hpp.
#define ENIGMA_ASSERT | ( | x, | |
... | |||
) |
Asserts.
Definition at line 38 of file Macros.hpp.
#define ENIGMA_ASSERT_OR_RETURN | ( | x, | |
msg, | |||
ret | |||
) |
Definition at line 46 of file Macros.hpp.
#define ENIGMA_ASSERT_OR_THROW | ( | x, | |
msg | |||
) |
Definition at line 41 of file Macros.hpp.
#define ENIGMA_BEGIN_TIMER | ( | var | ) | const auto var = std::chrono::steady_clock::now() |
Begin and end timer with a unit.
Definition at line 132 of file Macros.hpp.
#define ENIGMA_BIND_FUN | ( | fun | ) | [this](auto&&...args) -> decltype(auto) { return this->fun(std::forward<decltype(args)>(args)...); } |
Bind Event function call back macro (alternative to std::bind for modern & better c++)
Definition at line 25 of file Macros.hpp.
#define ENIGMA_CURRENT_FUNCTION "<unknown function>" |
Resolve which function signature macro will be used. Note that this only is resolved when the (pre)compiler starts, so the syntax highlighting could mark the wrong one in your editor!
Definition at line 105 of file Macros.hpp.
#define ENIGMA_END_TIMER | ( | var, | |
type, | |||
unit | |||
) | std::chrono::duration_cast<std::chrono::duration<type, unit>>(std::chrono::steady_clock::now() - var).count() |
Definition at line 133 of file Macros.hpp.
#define ENIGMA_ENUM_CLASS_BITWISE_OPERATORS | ( | _enum, | |
_type | |||
) |
Implements bitwise operators for enum classes.
Definition at line 155 of file Macros.hpp.
#define ENIGMA_ENUM_DECLARE_BEGIN_END | ( | begin | ) |
Allows looping over an enum by providing a BEGIN and END enum values NOTE: should be placed at the end of the enum, providing the first element of the enum.
Definition at line 148 of file Macros.hpp.
#define ENIGMA_IS_BETWEEN | ( | v, | |
mi, | |||
ma | |||
) | (v >= mi && v <= ma) |
Check if value is between or equal a range.
Definition at line 82 of file Macros.hpp.
#define ENIGMA_MACROS_H |
Definition at line 3 of file Macros.hpp.
#define ENIGMA_NON_COPYABLE | ( | Class | ) |
Prevent class copying or moving.
Definition at line 111 of file Macros.hpp.
#define ENIGMA_NON_MOVEABLE | ( | Class | ) | Class& operator=(Class&& obj) = delete; |
Definition at line 114 of file Macros.hpp.
#define ENIGMA_SAFE_DELETE_ARRAY_PTR | ( | ptr | ) |
Definition at line 60 of file Macros.hpp.
#define ENIGMA_SAFE_DELETE_LIST_PTR | ( | list | ) |
Definition at line 66 of file Macros.hpp.
#define ENIGMA_SAFE_DELETE_PTR | ( | ptr | ) |
Enigma Memory Safe Operations.
Definition at line 54 of file Macros.hpp.
#define ENIGMA_STATIC_CLASS | ( | Class | ) |
Makes a class static, which will prevent creating instances from it and only use it as Class::Func()..
Definition at line 120 of file Macros.hpp.
#define ENIGMA_TRACE_CURRENT_FUNCTION | ( | ) |
Logs current function for debugging.
Definition at line 143 of file Macros.hpp.
#define NS_ENIGMA_BEGIN namespace Enigma { |
#define NS_ENIGMA_END } |
Definition at line 14 of file Macros.hpp.
#define USING_NS_ENIGMA using namespace Enigma; |
Enigma NAME SPACE DECLARATION.
Definition at line 19 of file Macros.hpp.