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)   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

◆ __nassert_static

#define __nassert_static ( condition,
suffix )   typedef char nassert_static_ ## suffix [(condition) ? 1 : -1];

Definition at line 195 of file pnotify.h.

◆ _nassert_check

#define _nassert_check ( condition)    (!(condition))

Definition at line 133 of file pnotify.h.

◆ _nassert_static

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

Definition at line 196 of file pnotify.h.

◆ nassert_raise

#define nassert_raise ( message)    Notify::ptr()->assert_failure(message, __LINE__, __FILE__)

Definition at line 186 of file pnotify.h.

◆ nassert_static

#define nassert_static ( condition)    _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__))
static Notify * ptr()
Returns the pointer to the global Notify object.
Definition notify.cxx:293

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 )   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)    nassertv(condition)

Definition at line 184 of file pnotify.h.

◆ nout

#define nout   (Notify::out())

Definition at line 104 of file pnotify.h.