Panda3D
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)   typedef char nassert_static_ ## suffix [(condition) ? 1 : -1];
 
#define _nassert_check(condition)   (!(condition))
 
#define _nassert_static(condition, suffix)   __nassert_static(condition, suffix)
 
#define nassert_raise(message)   Notify::ptr()->assert_failure(message, __LINE__, __FILE__)
 
#define nassert_static(condition)   _nassert_static(condition, __COUNTER__)
 
#define nassertd(condition)
 
#define nassertr(condition, return_value)
 
#define nassertr_always(condition, return_value)   nassertr(condition, return_value)
 
#define nassertv(condition)
 
#define nassertv_always(condition)   nassertv(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

◆ nassertd

#define nassertd (   condition)
Value:
if (_nassert_check(condition) && \
Notify::ptr()->assert_failure(#condition, __LINE__, __FILE__))
static Notify * ptr()
Returns the pointer to the global Notify object.
Definition: notify.cxx:289

Definition at line 175 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; \
} \
} \
}
static Notify * ptr()
Returns the pointer to the global Notify object.
Definition: notify.cxx:289

Definition at line 157 of file pnotify.h.

◆ nassertv

#define nassertv (   condition)
Value:
{ \
if (_nassert_check(condition)) { \
if (Notify::ptr()->assert_failure(#condition, __LINE__, __FILE__)) { \
return; \
} \
} \
}
static Notify * ptr()
Returns the pointer to the global Notify object.
Definition: notify.cxx:289

Definition at line 166 of file pnotify.h.