//**************************************************************************************************
//
// GENERAL CHECKING OPERATIONS:
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// RuntimeForStatic base library | C+- (SysRoutine) | Author: Sergei Y.Kitáev
#pragma once
#include "include_restrictions.h"
namespace RuntimeForStatic {

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// "$Checking" STATIC CLASS:
//
//==================================================================================================
class $Checking
{
$STATIC_CLASS( $Checking )
public:
   static inline bool UseVerifications();
public:
   static int VerifyNotZero( $CI_REF, int value );
   static unsigned int VerifyNotZero( $CI_REF, unsigned int value );
   static DWORD VerifyNotZero( $CI_REF, DWORD value );
   static SIZE_T VerifyNotZero_Size( $CI_REF, SIZE_T value );
   static int VerifyNotNegative( $CI_REF, int value );
   static int VerifyPositiveValue( $CI_REF, int value );

   static $PCVoid VerifyPointer( $CI_REF, $PCVoid pointer );

   static HANDLE VerifyHandle( $CI_REF, HANDLE handle );
   static HANDLE VerifyHandle( $CI_REF, HANDLE handle, BOOL isOfInvalidHandleValueCategory );
public:
   static void VerifyNotZeroValues( $CI_REF, const std::initializer_list<int>& list );
   static void VerifyNotZeroValues( $CI_REF, const std::initializer_list<unsigned int>& list );
   static void VerifyNotZeroValues( $CI_REF, const std::initializer_list<DWORD>& list );
   static void VerifyNotZeroValues_Size( $CI_REF, const std::initializer_list<SIZE_T>& list );
   static void VerifyNotNegativeValues( $CI_REF, const std::initializer_list<int>& list );
   static void VerifyPositiveValues( $CI_REF, const std::initializer_list<int>& list );

   static void VerifyPointers( $CI_REF, const std::initializer_list<$PCVoid>& pointers );

   static void VerifyHandles( $CI_REF, const std::initializer_list<HANDLE>& handles );
   static void VerifyHandles( $CI_REF, const std::initializer_list<HANDLE>& handles,
                                       BOOL isOfInvalidHandleValueCategory );
public:
   static bool Assert( $CI_REF, bool condition ) $ret_true;
   static bool Assert( $CI_REF, bool condition, PCWSTR conditionExp $optional ) $ret_true;
}; // $Checking
//==================================================================================================

} // RuntimeForStatic
