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

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// "$TraceMessageType"-ENUMERATION:
//
//==================================================================================================
enum $TraceMessageType
{
   $TraceMessageType_None        = 0,
   $TraceMessageType_Neutral     = 1,
   $TraceMessageType_Information = 2,
   $TraceMessageType_Warning     = 3,
   $TraceMessageType_Error       = 4
}; // $TraceMessageType
typedef $TraceMessageType*       $PTraceMessageType;
typedef const $TraceMessageType* $PCTraceMessageType;
//==================================================================================================


//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// "$Trace" STATIC CLASS:
//
//==================================================================================================
class $TraceHelpers
{
$STATIC_CLASS( $TraceHelpers )
public:
   static WCHAR MessageSign($A,$TraceMessageType messageType) $not_null $static_pointer;
}; // $TraceHelpers
//==================================================================================================


//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// "$Tracer" STATIC CLASS:
//
//==================================================================================================
class $Tracer
{
$STATIC_CLASS( $Tracer )
public:
   static void Trace() $fatal_error_on_failure;
   static void Trace($A,PCWSTR message) $fatal_error_on_failure;
   static void TraceFmt($A,PCWSTR messageFmt, ... ) $fatal_error_on_failure;
   static void TraceVA($A,PCWSTR messageFmt,va_list argList) $fatal_error_on_failure;
public:
   static bool TraceInformation() $ret_true $fatal_error_on_failure;
   static bool TraceInformation($A,PCWSTR message) $ret_true $fatal_error_on_failure;
   static bool TraceInformationFmt($A,PCWSTR messageFmt, ... ) $ret_true $fatal_error_on_failure;
   static bool TraceInformationVA($A,PCWSTR messageFmt,va_list argList) $ret_true
                                                                        $fatal_error_on_failure;
   static bool TraceWarning() $ret_true $fatal_error_on_failure;
   static bool TraceWarning($A,PCWSTR message) $ret_true $fatal_error_on_failure;
   static bool TraceWarningFmt($A,PCWSTR messageFmt, ... ) $ret_true $fatal_error_on_failure;
   static bool TraceWarningVA($A,PCWSTR messageFmt,va_list argList) $ret_true
                                                                    $fatal_error_on_failure;
   static bool TraceError() $ret_false $fatal_error_on_failure;
   static bool TraceError($A,PCWSTR message) $ret_false $fatal_error_on_failure;
   static bool TraceErrorFmt($A,PCWSTR messageFmt, ... ) $ret_false $fatal_error_on_failure;
   static bool TraceErrorVA($A,PCWSTR messageFmt,va_list argList) $ret_false
                                                                  $fatal_error_on_failure;

   static void TraceOperation($A,PCWSTR message) $fatal_error_on_failure;
   static void TraceOperationFmt($A,PCWSTR messageFmt, ... ) $fatal_error_on_failure;
   static void TraceOperationVA($A,PCWSTR messageFmt,va_list argList) $fatal_error_on_failure;

   static void TraceInFunction($A,PCWSTR funcNameOrSignature) $fatal_error_on_failure;
   static void TraceOutOfFunction($A,PCWSTR funcNameOrSignature) $fatal_error_on_failure;
public:
   static void TraceEx($A, $TraceMessageType messageType ) $fatal_error_on_failure;
   static void TraceEx($A, $TraceMessageType messageType, PCWSTR message ) $fatal_error_on_failure;
   static void TraceExFmt($A, $TraceMessageType messageType, PCWSTR messageFmt, ... )
                              $fatal_error_on_failure;
   static void TraceExVA($A, $TraceMessageType messageType, PCWSTR messageFmt, va_list argList )
                             $fatal_error_on_failure;
private:
#include "..\private\Tracer.private.h"
}; // $Tracer
//==================================================================================================

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// "$TracerNS" STATIC CLASS (NON-STRICT FUNCTIONS):
//
//==================================================================================================
class $TracerNS
{
$STATIC_CLASS( $TracerNS )
public:
   static bool Trace() $last_error;
   static bool Trace($A,PCWSTR message) $last_error;
   static bool TraceFmt($A,PCWSTR messageFmt, ... ) $last_error;
   static bool TraceVA($A,PCWSTR messageFmt,va_list argList) $last_error;
public:
   static bool TraceInformation() $last_error;
   static bool TraceInformation($A,PCWSTR message) $last_error;
   static bool TraceInformationFmt($A,PCWSTR messageFmt, ... ) $last_error;
   static bool TraceInformationVA($A,PCWSTR messageFmt,va_list argList) $last_error;

   static bool TraceWarning() $last_error;
   static bool TraceWarning($A,PCWSTR message) $last_error;
   static bool TraceWarningFmt($A,PCWSTR messageFmt, ... ) $last_error;
   static bool TraceWarningVA($A,PCWSTR messageFmt,va_list argList) $last_error;

   static bool TraceError() $last_error;
   static bool TraceError($A,PCWSTR message) $last_error;
   static bool TraceErrorFmt($A,PCWSTR messageFmt, ... ) $last_error;
   static bool TraceErrorVA($A,PCWSTR messageFmt,va_list argList) $last_error;

   static bool TraceOperation($A,PCWSTR message) $last_error;
   static bool TraceOperationFmt($A,PCWSTR messageFmt, ... ) $last_error;
   static bool TraceOperationVA($A,PCWSTR messageFmt,va_list argList) $last_error;

   static bool TraceInFunction($A,PCWSTR funcNameOrSignature) $last_error;
   static bool TraceOutOfFunction($A,PCWSTR funcNameOrSignature) $last_error;
public:
   static bool TraceEx($A, $TraceMessageType messageType );
   static bool TraceEx($A, $TraceMessageType messageType, PCWSTR message ) $last_error;
   static bool TraceExFmt($A, $TraceMessageType messageType, PCWSTR messageFmt, ... ) $last_error;
   static bool TraceExVA($A, $TraceMessageType messageType, PCWSTR messageFmt, va_list argList )
                             $last_error;
private:
#include "..\private\TracerNS.private.h"
}; // $TracerNS
//==================================================================================================


//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// "$InFunctionScopeTracer"-CLASS (FOR AUTO-FINALIZATION):
//
//==================================================================================================
class $InFunctionScopeTracer
{
public:
   $InFunctionScopeTracer($A,PCWSTR funcNameOrSignature) $fatal_error_on_failure;
   ~$InFunctionScopeTracer();
private:
#include "..\private\InFunctionScopeTracer.private.h"
}; // $InFunctionScopeTracer
//==================================================================================================

} // RuntimeForStatic
