\hypertarget{_assert_8h}{\section{Core/\-Utils/\-Legacy/\-Assert.h File Reference}
\label{_assert_8h}\index{Core/\-Utils/\-Legacy/\-Assert.\-h@{Core/\-Utils/\-Legacy/\-Assert.\-h}}
}


Utility for specifying data invariants (Assertions)  


{\ttfamily \#include $<$sci\-\_\-defs/error\-\_\-defs.\-h$>$}\\*
{\ttfamily \#include $<$Core/\-Exceptions/\-Assertion\-Failed.\-h$>$}\\*
{\ttfamily \#include $<$Core/\-Exceptions/\-Array\-Index\-Out\-Of\-Bounds.\-h$>$}\\*
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{_assert_8h_aed891ada1ba0e4685fa6c5a52ce99f22}{A\-S\-S\-E\-R\-T\-F\-A\-I\-L}(string)~\hyperlink{_exceptions_2_exception_8h_af9eff8827416f44ff25c15a56fc50fb6}{S\-C\-I\-\_\-\-T\-H\-R\-O\-W}(\hyperlink{class_s_c_i_run_1_1_assertion_failed}{S\-C\-I\-Run\-::\-Assertion\-Failed}(string, \-\_\-\-\_\-\-F\-I\-L\-E\-\_\-\-\_\-, \-\_\-\-\_\-\-L\-I\-N\-E\-\_\-\-\_\-));
\item 
\#define \hyperlink{_assert_8h_ab27fc04c13050f5b0219b8538985166b}{A\-S\-S\-E\-R\-T\-M\-S\-G\-\_\-\-L\-E\-G\-A\-C\-Y}(condition, message)
\item 
\#define \hyperlink{_assert_8h_a65e94ea09d4bcabddd936d2139e8a9b2}{A\-S\-S\-E\-R\-T\-L1}(condition)
\item 
\#define \hyperlink{_assert_8h_af26e772ab78a66242463ce4bdad10512}{A\-S\-S\-E\-R\-T\-L2}(condition)
\item 
\#define \hyperlink{_assert_8h_a6c63e01f9228043e813c72100345f61d}{A\-S\-S\-E\-R\-T\-L3}(condition)
\item 
\#define \hyperlink{_assert_8h_ac0b61736c638657c476ccbe152364ae4}{C\-H\-E\-C\-K\-A\-R\-R\-A\-Y\-B\-O\-U\-N\-D\-S}(value, lower, upper)
\item 
\#define \hyperlink{_assert_8h_ac3846dc351ede4af070777160afda61e}{U\-S\-E\-\_\-\-I\-F\-\_\-\-A\-S\-S\-E\-R\-T\-S\-\_\-\-O\-N}(line)
\item 
\#define \hyperlink{_assert_8h_a65e94ea09d4bcabddd936d2139e8a9b2}{A\-S\-S\-E\-R\-T\-L1}(condition)
\item 
\#define \hyperlink{_assert_8h_af26e772ab78a66242463ce4bdad10512}{A\-S\-S\-E\-R\-T\-L2}(condition)
\item 
\#define \hyperlink{_assert_8h_a6c63e01f9228043e813c72100345f61d}{A\-S\-S\-E\-R\-T\-L3}(condition)
\item 
\#define \hyperlink{_assert_8h_ae0aab806bb8a009109d59f7e9bb252bd}{A\-S\-S\-E\-R\-T\-E\-Q}(c1, c2)
\item 
\#define \hyperlink{_assert_8h_a70ae0f2628178ec53f5216d48b1c1f43}{A\-S\-S\-E\-R\-T\-R\-A\-N\-G\-E}(c, l, h)
\item 
\#define \hyperlink{_assert_8h_a8a7cbbf4aea43e97ac9be940cc66ed42}{I\-F\-A\-S\-S\-E\-R\-T}(x)
\item 
\#define \hyperlink{_assert_8h_ac22830a985e1daed0c9eadba8c6f606e}{A\-S\-S\-E\-R\-T}(condition)~\hyperlink{_assert_8h_af26e772ab78a66242463ce4bdad10512}{A\-S\-S\-E\-R\-T\-L2}(condition)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Utility for specifying data invariants (Assertions) \begin{DoxyAuthor}{Author}
Steven G. Parker Department of Computer Science University of Utah 
\end{DoxyAuthor}
\begin{DoxyDate}{Date}
Feb. 1994 
\end{DoxyDate}


\subsection{Macro Definition Documentation}
\hypertarget{_assert_8h_ac22830a985e1daed0c9eadba8c6f606e}{\index{Assert.\-h@{Assert.\-h}!A\-S\-S\-E\-R\-T@{A\-S\-S\-E\-R\-T}}
\index{A\-S\-S\-E\-R\-T@{A\-S\-S\-E\-R\-T}!Assert.h@{Assert.\-h}}
\subsubsection[{A\-S\-S\-E\-R\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-S\-S\-E\-R\-T(
\begin{DoxyParamCaption}
\item[{}]{condition}
\end{DoxyParamCaption}
)~{\bf A\-S\-S\-E\-R\-T\-L2}(condition)}}\label{_assert_8h_ac22830a985e1daed0c9eadba8c6f606e}
\hypertarget{_assert_8h_ae0aab806bb8a009109d59f7e9bb252bd}{\index{Assert.\-h@{Assert.\-h}!A\-S\-S\-E\-R\-T\-E\-Q@{A\-S\-S\-E\-R\-T\-E\-Q}}
\index{A\-S\-S\-E\-R\-T\-E\-Q@{A\-S\-S\-E\-R\-T\-E\-Q}!Assert.h@{Assert.\-h}}
\subsubsection[{A\-S\-S\-E\-R\-T\-E\-Q}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-S\-S\-E\-R\-T\-E\-Q(
\begin{DoxyParamCaption}
\item[{}]{c1, }
\item[{}]{c2}
\end{DoxyParamCaption}
)}}\label{_assert_8h_ae0aab806bb8a009109d59f7e9bb252bd}
\hypertarget{_assert_8h_aed891ada1ba0e4685fa6c5a52ce99f22}{\index{Assert.\-h@{Assert.\-h}!A\-S\-S\-E\-R\-T\-F\-A\-I\-L@{A\-S\-S\-E\-R\-T\-F\-A\-I\-L}}
\index{A\-S\-S\-E\-R\-T\-F\-A\-I\-L@{A\-S\-S\-E\-R\-T\-F\-A\-I\-L}!Assert.h@{Assert.\-h}}
\subsubsection[{A\-S\-S\-E\-R\-T\-F\-A\-I\-L}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-S\-S\-E\-R\-T\-F\-A\-I\-L(
\begin{DoxyParamCaption}
\item[{}]{string}
\end{DoxyParamCaption}
)~{\bf S\-C\-I\-\_\-\-T\-H\-R\-O\-W}({\bf S\-C\-I\-Run\-::\-Assertion\-Failed}(string, \-\_\-\-\_\-\-F\-I\-L\-E\-\_\-\-\_\-, \-\_\-\-\_\-\-L\-I\-N\-E\-\_\-\-\_\-));}}\label{_assert_8h_aed891ada1ba0e4685fa6c5a52ce99f22}
\begin{DoxyRefDesc}{Todo}
\item[\hyperlink{todo__todo000327}{Todo}]\-: make sure default S\-C\-I\-\_\-\-A\-S\-S\-E\-R\-T\-I\-O\-N\-\_\-\-L\-E\-V\-E\-L is consistent across platforms \end{DoxyRefDesc}
\hypertarget{_assert_8h_a65e94ea09d4bcabddd936d2139e8a9b2}{\index{Assert.\-h@{Assert.\-h}!A\-S\-S\-E\-R\-T\-L1@{A\-S\-S\-E\-R\-T\-L1}}
\index{A\-S\-S\-E\-R\-T\-L1@{A\-S\-S\-E\-R\-T\-L1}!Assert.h@{Assert.\-h}}
\subsubsection[{A\-S\-S\-E\-R\-T\-L1}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-S\-S\-E\-R\-T\-L1(
\begin{DoxyParamCaption}
\item[{}]{condition}
\end{DoxyParamCaption}
)}}\label{_assert_8h_a65e94ea09d4bcabddd936d2139e8a9b2}
\hypertarget{_assert_8h_a65e94ea09d4bcabddd936d2139e8a9b2}{\index{Assert.\-h@{Assert.\-h}!A\-S\-S\-E\-R\-T\-L1@{A\-S\-S\-E\-R\-T\-L1}}
\index{A\-S\-S\-E\-R\-T\-L1@{A\-S\-S\-E\-R\-T\-L1}!Assert.h@{Assert.\-h}}
\subsubsection[{A\-S\-S\-E\-R\-T\-L1}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-S\-S\-E\-R\-T\-L1(
\begin{DoxyParamCaption}
\item[{}]{condition}
\end{DoxyParamCaption}
)}}\label{_assert_8h_a65e94ea09d4bcabddd936d2139e8a9b2}
\hypertarget{_assert_8h_af26e772ab78a66242463ce4bdad10512}{\index{Assert.\-h@{Assert.\-h}!A\-S\-S\-E\-R\-T\-L2@{A\-S\-S\-E\-R\-T\-L2}}
\index{A\-S\-S\-E\-R\-T\-L2@{A\-S\-S\-E\-R\-T\-L2}!Assert.h@{Assert.\-h}}
\subsubsection[{A\-S\-S\-E\-R\-T\-L2}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-S\-S\-E\-R\-T\-L2(
\begin{DoxyParamCaption}
\item[{}]{condition}
\end{DoxyParamCaption}
)}}\label{_assert_8h_af26e772ab78a66242463ce4bdad10512}
\hypertarget{_assert_8h_af26e772ab78a66242463ce4bdad10512}{\index{Assert.\-h@{Assert.\-h}!A\-S\-S\-E\-R\-T\-L2@{A\-S\-S\-E\-R\-T\-L2}}
\index{A\-S\-S\-E\-R\-T\-L2@{A\-S\-S\-E\-R\-T\-L2}!Assert.h@{Assert.\-h}}
\subsubsection[{A\-S\-S\-E\-R\-T\-L2}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-S\-S\-E\-R\-T\-L2(
\begin{DoxyParamCaption}
\item[{}]{condition}
\end{DoxyParamCaption}
)}}\label{_assert_8h_af26e772ab78a66242463ce4bdad10512}
\hypertarget{_assert_8h_a6c63e01f9228043e813c72100345f61d}{\index{Assert.\-h@{Assert.\-h}!A\-S\-S\-E\-R\-T\-L3@{A\-S\-S\-E\-R\-T\-L3}}
\index{A\-S\-S\-E\-R\-T\-L3@{A\-S\-S\-E\-R\-T\-L3}!Assert.h@{Assert.\-h}}
\subsubsection[{A\-S\-S\-E\-R\-T\-L3}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-S\-S\-E\-R\-T\-L3(
\begin{DoxyParamCaption}
\item[{}]{condition}
\end{DoxyParamCaption}
)}}\label{_assert_8h_a6c63e01f9228043e813c72100345f61d}
\hypertarget{_assert_8h_a6c63e01f9228043e813c72100345f61d}{\index{Assert.\-h@{Assert.\-h}!A\-S\-S\-E\-R\-T\-L3@{A\-S\-S\-E\-R\-T\-L3}}
\index{A\-S\-S\-E\-R\-T\-L3@{A\-S\-S\-E\-R\-T\-L3}!Assert.h@{Assert.\-h}}
\subsubsection[{A\-S\-S\-E\-R\-T\-L3}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-S\-S\-E\-R\-T\-L3(
\begin{DoxyParamCaption}
\item[{}]{condition}
\end{DoxyParamCaption}
)}}\label{_assert_8h_a6c63e01f9228043e813c72100345f61d}
\hypertarget{_assert_8h_ab27fc04c13050f5b0219b8538985166b}{\index{Assert.\-h@{Assert.\-h}!A\-S\-S\-E\-R\-T\-M\-S\-G\-\_\-\-L\-E\-G\-A\-C\-Y@{A\-S\-S\-E\-R\-T\-M\-S\-G\-\_\-\-L\-E\-G\-A\-C\-Y}}
\index{A\-S\-S\-E\-R\-T\-M\-S\-G\-\_\-\-L\-E\-G\-A\-C\-Y@{A\-S\-S\-E\-R\-T\-M\-S\-G\-\_\-\-L\-E\-G\-A\-C\-Y}!Assert.h@{Assert.\-h}}
\subsubsection[{A\-S\-S\-E\-R\-T\-M\-S\-G\-\_\-\-L\-E\-G\-A\-C\-Y}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-S\-S\-E\-R\-T\-M\-S\-G\-\_\-\-L\-E\-G\-A\-C\-Y(
\begin{DoxyParamCaption}
\item[{}]{condition, }
\item[{}]{message}
\end{DoxyParamCaption}
)}}\label{_assert_8h_ab27fc04c13050f5b0219b8538985166b}
{\bfseries Value\-:}
\begin{DoxyCode}
\textcolor{keywordflow}{if}(!(condition))\{ \hyperlink{_exceptions_2_exception_8h_af9eff8827416f44ff25c15a56fc50fb6}{\(\backslash\)}
\hyperlink{_exceptions_2_exception_8h_af9eff8827416f44ff25c15a56fc50fb6}{      SCI\_THROW}(\hyperlink{class_s_c_i_run_1_1_assertion_failed}{SCIRun::AssertionFailed}(message, \_\_FILE\_\_, \_\_LINE\_\_))
      ; \(\backslash\)
   \}
\end{DoxyCode}
\hypertarget{_assert_8h_a70ae0f2628178ec53f5216d48b1c1f43}{\index{Assert.\-h@{Assert.\-h}!A\-S\-S\-E\-R\-T\-R\-A\-N\-G\-E@{A\-S\-S\-E\-R\-T\-R\-A\-N\-G\-E}}
\index{A\-S\-S\-E\-R\-T\-R\-A\-N\-G\-E@{A\-S\-S\-E\-R\-T\-R\-A\-N\-G\-E}!Assert.h@{Assert.\-h}}
\subsubsection[{A\-S\-S\-E\-R\-T\-R\-A\-N\-G\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-S\-S\-E\-R\-T\-R\-A\-N\-G\-E(
\begin{DoxyParamCaption}
\item[{}]{c, }
\item[{}]{l, }
\item[{}]{h}
\end{DoxyParamCaption}
)}}\label{_assert_8h_a70ae0f2628178ec53f5216d48b1c1f43}
\hypertarget{_assert_8h_ac0b61736c638657c476ccbe152364ae4}{\index{Assert.\-h@{Assert.\-h}!C\-H\-E\-C\-K\-A\-R\-R\-A\-Y\-B\-O\-U\-N\-D\-S@{C\-H\-E\-C\-K\-A\-R\-R\-A\-Y\-B\-O\-U\-N\-D\-S}}
\index{C\-H\-E\-C\-K\-A\-R\-R\-A\-Y\-B\-O\-U\-N\-D\-S@{C\-H\-E\-C\-K\-A\-R\-R\-A\-Y\-B\-O\-U\-N\-D\-S}!Assert.h@{Assert.\-h}}
\subsubsection[{C\-H\-E\-C\-K\-A\-R\-R\-A\-Y\-B\-O\-U\-N\-D\-S}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\-H\-E\-C\-K\-A\-R\-R\-A\-Y\-B\-O\-U\-N\-D\-S(
\begin{DoxyParamCaption}
\item[{}]{value, }
\item[{}]{lower, }
\item[{}]{upper}
\end{DoxyParamCaption}
)}}\label{_assert_8h_ac0b61736c638657c476ccbe152364ae4}
\hypertarget{_assert_8h_a8a7cbbf4aea43e97ac9be940cc66ed42}{\index{Assert.\-h@{Assert.\-h}!I\-F\-A\-S\-S\-E\-R\-T@{I\-F\-A\-S\-S\-E\-R\-T}}
\index{I\-F\-A\-S\-S\-E\-R\-T@{I\-F\-A\-S\-S\-E\-R\-T}!Assert.h@{Assert.\-h}}
\subsubsection[{I\-F\-A\-S\-S\-E\-R\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define I\-F\-A\-S\-S\-E\-R\-T(
\begin{DoxyParamCaption}
\item[{}]{x}
\end{DoxyParamCaption}
)}}\label{_assert_8h_a8a7cbbf4aea43e97ac9be940cc66ed42}
\hypertarget{_assert_8h_ac3846dc351ede4af070777160afda61e}{\index{Assert.\-h@{Assert.\-h}!U\-S\-E\-\_\-\-I\-F\-\_\-\-A\-S\-S\-E\-R\-T\-S\-\_\-\-O\-N@{U\-S\-E\-\_\-\-I\-F\-\_\-\-A\-S\-S\-E\-R\-T\-S\-\_\-\-O\-N}}
\index{U\-S\-E\-\_\-\-I\-F\-\_\-\-A\-S\-S\-E\-R\-T\-S\-\_\-\-O\-N@{U\-S\-E\-\_\-\-I\-F\-\_\-\-A\-S\-S\-E\-R\-T\-S\-\_\-\-O\-N}!Assert.h@{Assert.\-h}}
\subsubsection[{U\-S\-E\-\_\-\-I\-F\-\_\-\-A\-S\-S\-E\-R\-T\-S\-\_\-\-O\-N}]{\setlength{\rightskip}{0pt plus 5cm}\#define U\-S\-E\-\_\-\-I\-F\-\_\-\-A\-S\-S\-E\-R\-T\-S\-\_\-\-O\-N(
\begin{DoxyParamCaption}
\item[{}]{line}
\end{DoxyParamCaption}
)}}\label{_assert_8h_ac3846dc351ede4af070777160afda61e}
