CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CYBEntry.cpp
Go to the documentation of this file.
1 
3 #include "../Engine/CYB.hpp"
4 
5 #ifdef TARGET_OS_WINDOWS
6 #define main wmain
7 #endif
8 
19 int main(const int ANumArguments, const oschar_t* const* const AArguments) {
20  CYB::API::Assert::LessThanOrEqual(0, ANumArguments);
21  CYB::Engine::Core::Run(static_cast<unsigned int>(ANumArguments), AArguments);
23 }
24 
25 //placed here for code coverage reasons
26 void CYB::API::Assert::HCF[[noreturn]](void) noexcept {
27  BREAK;
28 #ifdef TARGET_OS_WINDOWS
29  __assume(false);
30 #else
31  __builtin_unreachable();
32 #endif
33 }
34 
35 bool CYB::Platform::System::Sys::CallRedirected(const CallNumber ACallNumber) noexcept {
36  static_cast<void>(ACallNumber);
37  return false;
38 }
39 
40 unsigned long long CYB::Platform::System::Sys::RedirectedCall(const CallNumber, const Union64, const Union64, const Union64, const Union64, const Union64, const Union64) {
42 }
43 
44 void CYB::API::Assert::Unimplemented(const char* const AFunction, const char* const AFile, const unsigned int ALine) noexcept {
45  static_cast<void>(AFunction);
46  static_cast<void>(AFile);
47  static_cast<void>(ALine);
49 }
50 
57 void TestLog(const char* AMsg) noexcept {
58  static_cast<void>(AMsg);
59 }
66 void TestLogNum(const long long ANumber) noexcept {
67  static_cast<void>(ANumber);
68 }
69 
static unsigned long long RedirectedCall(const CallNumber ACallNumber, const Union64 AArg1=Union64(nullptr), const Union64 AArg2=Union64(nullptr), const Union64 AArg3=Union64(nullptr), const Union64 AArg4=Union64(nullptr), const Union64 AArg5=Union64(nullptr), const Union64 AArg6=Union64(nullptr))
Calls a redirected call using the parameters.
Definition: CYBEntry.cpp:40
Used for passing arguments to calls to this class. If the call in question requires const...
Definition: CYBSyscalls.hpp:15
static void Unimplemented(const char *const AFunction, const char *const AFile, const unsigned int ALine) noexcept
Indicates an unimplemented function, calls HCF if ASSERTION_OVERRIDE is not defined.
Definition: CYBEntry.cpp:44
void TestLogNum(const long long ANumber) noexcept
Forces a log write in testing, no-op in the runtime.
Definition: CYBEntry.cpp:66
void TestLog(const char *AMsg) noexcept
Forces a log write in testing, no-op in the runtime.
Definition: CYBEntry.cpp:57
static void HCF(void) noexcept
Indicates unreachable code. Implementation can be overriden by defining ASSERTION_OVERRIDE.
Definition: CYBEntry.cpp:26
static void AllocCheck(void)
Used by the testing suite to fail allocations at will.
Definition: CYBEntry.cpp:70
static bool CallRedirected(const CallNumber ACallNumber) noexcept
Check if a certain call has been redirected. Used for testing, always evaluates to false in the runti...
Definition: CYBEntry.cpp:35
static void LessThanOrEqual(const AType &ALHS, const AType &ARHS) noexcept
Less than or equal assertion function. May not be evaluated.
static void Run(const unsigned int ANumArguments, const oschar_t *const *const AArguments) noexcept
Runs the engine and self terminates.
Definition: CYBCore.cpp:49
#define BREAK
Breaks code execution at line used if DEBUG is defined. Must be defined by user otherwise.
Definition: Assert.hpp:7
int main(const int ANumArguments, const oschar_t *const *const AArguments)
Program entry point. Call CYB::Engine::Init::Run.
Definition: CYBEntry.cpp:19