- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# FUtils/FUAssert.h File Reference

This file contains a simple debugging assertion mechanism. More...

`#include "FUtils/FUFunctor.h"`

Go to the source code of this file.

## Namespaces
namespace | FUAssertion
## Defines
#define | FUBreak { FUAssertion::OnAssertionFailed(__FILE__, __LINE__); }
| Breaks into the debugger.
#define | FUFail(command) { FUBreak; command; }
| Forces the debugger to break, or take the fall-back.
#define | FUAssert(condition, fall_back) { if (!(condition)) { FUBreak; fall_back; } }
| Asserts that a condition is met.
## Typedefs
typedef FUStaticFunctor1< const char *, bool > | FUAssertion::FUAssertCallback
| A functor that deals with assertions that fail.
## Functions
FCOLLADA_EXPORT void | FUAssertion::SetAssertionFailedCallback (FUAssertCallback *assertionCallback)
| Set a functor to be called back on assertion fail.
FCOLLADA_EXPORT bool | FUAssertion::OnAssertionFailed (const char *filename, uint32 line)
| [INTERNAL] Event-handler for failed assertions.

## Detailed Description

This file contains a simple debugging assertion mechanism.

## Define Documentation

#define FUAssert | ( | condition,
|  | fall_back |  | ) | { if (!(condition)) { FUBreak; fall_back; } }

  | Asserts that a condition is met. Use this macro, instead of 'if' statements when you are asserting for a programmer's error. Parameters:
  | condition | The condition to assert.
  | fall_back | The command to execute if the condition is not met.

#define FUBreak { FUAssertion::OnAssertionFailed(__FILE__, __LINE__); }

| Breaks into the debugger. In release builds, this is an empty function.

#define FUFail | ( | command |  | ) | { FUBreak; command; }

  | Forces the debugger to break, or take the fall-back. Parameters:
  | command | The fall_back command to execute.