CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Static Public Member Functions | List of all members
CYB::API::Assert Class Reference

Contains assertion functions. More...

#include <Assert.hpp>

Static Public Member Functions

static void HCF (void) noexcept
 Indicates unreachable code. Implementation can be overriden by defining ASSERTION_OVERRIDE. More...
 
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. More...
 
static void True (const bool AExpression) noexcept
 Assertion function. AExpression should always be evaluated. More...
 
static void False (const bool AExpression) noexcept
 False assertion function. AExpression should always be evaluated. More...
 
template<typename AType >
static void Equal (const AType &ALHS, const AType &ARHS) noexcept
 Equivalence assertion function. May not be evaluated. More...
 
template<typename AType , typename... AOtherTypes>
static void Equal (const AType &ALHS, const AType &ARHS, AOtherTypes &&...ARHSs) noexcept
 Equal against one or more things assertion function. May not be evaluated. More...
 
template<typename AType >
static void NotEqual (const AType &ALHS, const AType &ARHS) noexcept
 Unequivalence assertion function. May not be evaluated. More...
 
template<typename AType >
static void LessThan (const AType &ALHS, const AType &ARHS) noexcept
 Less than assertion function. May not be evaluated. More...
 
template<typename AType >
static void LessThanOrEqual (const AType &ALHS, const AType &ARHS) noexcept
 Less than or equal assertion function. May not be evaluated. More...
 

Detailed Description

Contains assertion functions.

Definition at line 36 of file Assert.hpp.

Member Function Documentation

template<typename AType >
static void CYB::API::Assert::Equal ( const AType &  ALHS,
const AType &  ARHS 
)
staticnoexcept

Equivalence assertion function. May not be evaluated.

Parameters
ALHSthe left hand side of the equation
ARHSthe right hand side of the equation
Template Parameters
ATypeThe type of ALHS and ARHS
Thread Safety
This function requires no thread safety

Here is the caller graph for this function:

template<typename AType , typename... AOtherTypes>
static void CYB::API::Assert::Equal ( const AType &  ALHS,
const AType &  ARHS,
AOtherTypes &&...  ARHSs 
)
staticnoexcept

Equal against one or more things assertion function. May not be evaluated.

Parameters
ALHSthe left hand side of the equations
ARHSthe right hand side of the current equations
ARHSsthe right hand sides of the remaining equations
Template Parameters
ATypeThe type of ALHS
AOtherTypesThe types of ARHSs must be comparable with AType
Thread Safety
This function requires no thread safety
static void CYB::API::Assert::False ( const bool  AExpression)
staticnoexcept

False assertion function. AExpression should always be evaluated.

Parameters
AExpressionThe expression to check. Will call HCF if true
Thread Safety
This function requires no thread safety

Here is the caller graph for this function:

void CYB::API::Assert::HCF ( void  )
staticnoexcept

Indicates unreachable code. Implementation can be overriden by defining ASSERTION_OVERRIDE.

Thread Safety
This function requires no thread safety

Definition at line 26 of file CYBEntry.cpp.

26  {
27  BREAK;
28 #ifdef TARGET_OS_WINDOWS
29  __assume(false);
30 #else
31  __builtin_unreachable();
32 #endif
33 }
#define BREAK
Breaks code execution at line used if DEBUG is defined. Must be defined by user otherwise.
Definition: Assert.hpp:7

Here is the caller graph for this function:

template<typename AType >
static void CYB::API::Assert::LessThan ( const AType &  ALHS,
const AType &  ARHS 
)
staticnoexcept

Less than assertion function. May not be evaluated.

Parameters
ALHSthe left hand side of the equation
ARHSthe right hand side of the equation
Template Parameters
ATypeThe type of ALHS and ARHS
Thread Safety
This function requires no thread safety

Here is the caller graph for this function:

template<typename AType >
static void CYB::API::Assert::LessThanOrEqual ( const AType &  ALHS,
const AType &  ARHS 
)
staticnoexcept

Less than or equal assertion function. May not be evaluated.

Parameters
ALHSthe left hand side of the equation
ARHSthe right hand side of the equation
Template Parameters
ATypeThe type of ALHS and ARHS
Thread Safety
This function requires no thread safety

Here is the caller graph for this function:

template<typename AType >
static void CYB::API::Assert::NotEqual ( const AType &  ALHS,
const AType &  ARHS 
)
staticnoexcept

Unequivalence assertion function. May not be evaluated.

Parameters
ALHSthe left hand side of the equation
ARHSthe right hand side of the equation
Template Parameters
ATypeThe type of ALHS and ARHS
Thread Safety
This function requires no thread safety

Here is the caller graph for this function:

static void CYB::API::Assert::True ( const bool  AExpression)
staticnoexcept

Assertion function. AExpression should always be evaluated.

Parameters
AExpressionThe expression to check. Will call HCF if false
Thread Safety
This function requires no thread safety

Here is the caller graph for this function:

void CYB::API::Assert::Unimplemented ( const char *const  AFunction,
const char *const  AFile,
const unsigned int  ALine 
)
staticnoexcept

Indicates an unimplemented function, calls HCF if ASSERTION_OVERRIDE is not defined.

Parameters
AFunctionShould be FUNCTION
AFileShould be FILE
ALineShould be LINE
Thread Safety
This function requires no thread safety

Definition at line 44 of file CYBEntry.cpp.

44  {
45  static_cast<void>(AFunction);
46  static_cast<void>(AFile);
47  static_cast<void>(ALine);
49 }
static void HCF(void) noexcept
Indicates unreachable code. Implementation can be overriden by defining ASSERTION_OVERRIDE.
Definition: CYBEntry.cpp:26

Here is the call graph for this function:


The documentation for this class was generated from the following files: