Panda3D

Loading...
Searching...
No Matches
Classes | Macros
pnotify.h File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

`#include "dtoolbase.h"`
`#include "notifySeverity.h"`
`#include <map>`
`#include "pnotify.I"`

Go to the source code of this file.

## Classes
class | Notify
| An object that handles general error reporting to the user. More...

## Macros
#define | __nassert_static(condition, suffix)
#define | _nassert_check(condition)
#define | _nassert_static(condition, suffix)
#define | nassert_raise(message)
#define | nassert_static(condition)
#define | nassertd(condition)
#define | nassertr(condition, return_value)
#define | nassertr_always(condition, return_value)
#define | nassertv(condition)
#define | nassertv_always(condition)
#define | nout (Notify::out())

## Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
  drose

Date
  2000-02-28

Definition in file pnotify.h.

## Macro Definition Documentation

## ◆ __nassert_static

#define __nassert_static | ( |  | condition,
|  |  | suffix )

Value:
typedef char nassert_static_ ## suffix [(condition) ? 1 : -1];

Definition at line 195 of file pnotify.h.

## ◆ _nassert_check

#define _nassert_check | ( |  | condition | ) |

Value:
(!(condition))

Definition at line 133 of file pnotify.h.

## ◆ _nassert_static

#define _nassert_static | ( |  | condition,
|  |  | suffix )

Value:
__nassert_static(condition, suffix)

Definition at line 196 of file pnotify.h.

## ◆ nassert_raise

#define nassert_raise | ( |  | message | ) |

Value:
Notify::ptr()->assert_failure(message, __LINE__, __FILE__)
Notify::assert_failure
bool assert_failure(const std::string &expression, int line, const char *source_file)
This function is not intended to be called directly by user code.
Definition notify.cxx:312
Notify::ptr
static Notify * ptr()
Returns the pointer to the global Notify object.
Definition notify.cxx:293

Definition at line 186 of file pnotify.h.

## ◆ nassert_static

#define nassert_static | ( |  | condition | ) |

Value:
_nassert_static(condition, __COUNTER__)

Definition at line 197 of file pnotify.h.

## ◆ nassertd

#define nassertd | ( |  | condition | ) |

Value:
if (_nassert_check(condition) && \
Notify::ptr()->assert_failure(#condition, __LINE__, __FILE__))

Definition at line 179 of file pnotify.h.

## ◆ nassertr

#define nassertr | ( |  | condition,
|  |  | return_value )

Value:
{ \
if (_nassert_check(condition)) { \
if (Notify::ptr()->assert_failure(#condition, __LINE__, __FILE__)) { \
return return_value; \
} \
} \
}

Definition at line 161 of file pnotify.h.

## ◆ nassertr_always

#define nassertr_always | ( |  | condition,
|  |  | return_value )

Value:
nassertr(condition, return_value)

Definition at line 183 of file pnotify.h.

## ◆ nassertv

#define nassertv | ( |  | condition | ) |

Value:
{ \
if (_nassert_check(condition)) { \
if (Notify::ptr()->assert_failure(#condition, __LINE__, __FILE__)) { \
return; \
} \
} \
}

Definition at line 170 of file pnotify.h.

## ◆ nassertv_always

#define nassertv_always | ( |  | condition | ) |

Value:
nassertv(condition)

Definition at line 184 of file pnotify.h.

## ◆ nout

#define nout (Notify::out())

Definition at line 104 of file pnotify.h.