All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_Assert.h File Reference
#include "UT_API.h"
#include <SYS/SYS_StaticAssert.h>
#include <SYS/SYS_Inline.h>
+ Include dependency graph for UT_Assert.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  UT_AssertExceptionScope
class  UT_AssertException


#define UT_ASSERT_FUNC   ((char *)0)
#define UT_ASSERT_SLOW(ZZ)   ((void)0)
#define UT_ASSERT_P(ZZ)   ((void)0)
#define UT_ASSERT(ZZ)   ((void)0)
#define UT_ASSERT_MSG_SLOW(ZZ,...)   ((void)0)
#define UT_ASSERT_MSG_P(ZZ,...)   ((void)0)
#define UT_ASSERT_MSG(ZZ,...)   ((void)0)
#define UT_IF_ASSERT(ZZ)
#define UT_IF_ASSERT_P(ZZ)
#define UT_VERIFY(expr)   ((void)(expr))
#define UT_VERIFY_MSG(expr,...)   ((void)(expr))
#define UT_VERIFY_RETURN(ZZ, RV)   if (!(ZZ)) { return RV; }
#define UT_VERIFY_RETURN_VOID(ZZ)   if (!(ZZ)) { return; }
#define UT_VERIFY_P(expr)   ((void)(expr))


enum  UT_AssertResponse {


UT_API void UT_Assert (const char *file, int linenum, const char *function, const char *condition, const char *reason, int &ignoreflag)
UT_API void UT_AssertFormat (const char *file, int linenum, const char *function, const char *condition, int &ignoreflag, const char *reason_fmt...)
UT_API void UTdisableInteractiveAssertsOn ()
UT_API void UTdisableInteractiveAssertsOff ()
template<typename TO_T , typename FROM_T >
SYS_FORCE_INLINE TO_T UTverify_cast (FROM_T from)
UT_API void UTsubclassResponsibility (const char *classname, const char *member)

Macro Definition Documentation


Definition at line 163 of file UT_Assert.h.

#define UT_ASSERT_FUNC   ((char *)0)

Definition at line 77 of file UT_Assert.h.


Definition at line 17 of file UT_Assert.h.


Definition at line 11 of file UT_Assert.h.


Definition at line 12 of file UT_Assert.h.


Definition at line 13 of file UT_Assert.h.


Definition at line 14 of file UT_Assert.h.

#define UT_ASSERT_MSG (   ZZ,
)    ((void)0)

Definition at line 159 of file UT_Assert.h.

#define UT_ASSERT_MSG_P (   ZZ,
)    ((void)0)

Definition at line 158 of file UT_Assert.h.

#define UT_ASSERT_MSG_SLOW (   ZZ,
)    ((void)0)

Definition at line 157 of file UT_Assert.h.

#define UT_ASSERT_P (   ZZ)    ((void)0)

Definition at line 155 of file UT_Assert.h.

#define UT_ASSERT_SLOW (   ZZ)    ((void)0)

Definition at line 154 of file UT_Assert.h.

#define UT_IF_ASSERT (   ZZ)

Definition at line 174 of file UT_Assert.h.

#define UT_IF_ASSERT_P (   ZZ)

Definition at line 182 of file UT_Assert.h.

#define UT_IF_ASSERT_SLOW (   ZZ)

Definition at line 190 of file UT_Assert.h.

#define UT_IFNOT_ASSERT (   ZZ)    ZZ

Definition at line 175 of file UT_Assert.h.

#define UT_IFNOT_ASSERT_P (   ZZ)    ZZ

Definition at line 183 of file UT_Assert.h.

#define UT_IFNOT_ASSERT_SLOW (   ZZ)    ZZ

Definition at line 191 of file UT_Assert.h.

#define UT_VERIFY (   expr)    ((void)(expr))

Definition at line 202 of file UT_Assert.h.

#define UT_VERIFY_MSG (   expr,
)    ((void)(expr))

Definition at line 203 of file UT_Assert.h.

#define UT_VERIFY_P (   expr)    ((void)(expr))

Definition at line 210 of file UT_Assert.h.

#define UT_VERIFY_RETURN (   ZZ,
)    if (!(ZZ)) { return RV; }

Definition at line 204 of file UT_Assert.h.

#define UT_VERIFY_RETURN_VOID (   ZZ)    if (!(ZZ)) { return; }

Definition at line 205 of file UT_Assert.h.

Enumeration Type Documentation


Definition at line 213 of file UT_Assert.h.

Function Documentation

UT_API void UT_Assert ( const char *  file,
int  linenum,
const char *  function,
const char *  condition,
const char *  reason,
int ignoreflag 
UT_API void UT_AssertFormat ( const char *  file,
int  linenum,
const char *  function,
const char *  condition,
int ignoreflag,
const char *  reason_fmt... 
UT_API void UTdisableInteractiveAssertsOff ( )
UT_API void UTdisableInteractiveAssertsOn ( )
UT_API void UTsubclassResponsibility ( const char *  classname,
const char *  member 

UTsubclassResponsibility raises an assertion indicating that a subclass has not implemented an inherited method. This should only be called from a base class method that is not expected to run.

template<typename TO_T , typename FROM_T >
SYS_FORCE_INLINE TO_T UTverify_cast ( FROM_T  from)

UTverify_cast performs a static_cast, but when paranoid assertions are enabled it will also perform a dynamic cast to verify the cast is valid. UT_ASSERT_P() is used instead of UT_ASSERT() to avoid overhead in normal development builds.

GUI/GUI_PolygonNormalShade.C, packedsphere/GT_GEOPackedSphere.C, SHOP/SHOP_Multi.C, SHOP/SHOP_POVMaterial.C, and SOP/SOP_BouncyAgent.C.

Definition at line 229 of file UT_Assert.h.