#ifndef NAssert_h
#define NAssert_h
/*******************************************************************************
NAssert - Nohau Assert - <assert.h> type functionality. 

Creator: Sten Larsson
$Header: /NCARM_Misc/Monitor/NMon/NAssert.h 9     5/29/03 10:49a Stenl $
--------------------------------------------------------------------------------
DO NOT MODIFY THIS FILE - IT IS A PART OF NMON (Nohau Monitor) AND MAY BE 
UPDATED IN FUTURE RELEASES OF SEEHAU.

This computer software is owned by Nohau Corp, and is protected by U.S. 
copyright laws and other laws and by international treaties. Customers of Nohau
emulators/debuggers are allowed include it in their products for the purpose of 
enhancing the debug capabilities of Nohau products. It is not allowed to use it 
for any other purpose. The source code may not be provided or otherwise made 
available to third parties, except with the purpose of using it with Nohau 
tools. Nohau may elect to grant exceptions to the above statement in a written 
agreement.

Copyright  ©  2002, Nohau Corporation. All Rights Reserved.
Copyright (c) 2002, Nohau Corporation. All Rights Reserved.
*******************************************************************************/
/*
These are #define MACROS with functionality similar to the classic <assert.h> 
functionality, and with some inspiration from the Eiffel Language (precondition 
and postcondition), plus some ideas of our own (never_be_here and 
not_implemented).
*/
#include "NDefs.h"
#include "NMon_Cmd.h"
#include "NMon_Cfg.h"

#if !defined(NDEBUG) && defined(NPUT_ERROR_ENABLE)
   #define N_ASSERT(x)           NPut_Assert(x, NERR_ASSERT         , __FILE__, __LINE__);
   #define N_PRECONDITION(x)     NPut_Assert(x, NERR_PRECONDITION   , __FILE__, __LINE__);
   #define N_POSTCONDITION(x)    NPut_Assert(x, NERR_POSTCONDITION  , __FILE__, __LINE__);
   #define N_NEVER_BE_HERE()     NPut_Assert(0, NERR_NEVER_BE_HERE  , __FILE__, __LINE__);
   #define N_NOT_IMPLEMENTED()   NPut_Assert(0, NERR_NOT_IMPLEMENTED, __FILE__, __LINE__);
#else
   #define N_ASSERT(x)           ((void)0)
   #define N_PRECONDITION(x)     ((void)0)
   #define N_POSTCONDITION(x)    ((void)0)
   #define N_NEVER_BE_HERE()
   #define N_NOT_IMPLEMENTED()
#endif

#endif /* NAssert_h */
