PxBroadcastingErrorCallback
Defined in include/foundation/PxBroadcast.h
-
class PxBroadcastingErrorCallback : public PxBroadcast<PxErrorCallback, PxErrorCallback>
Abstract base class for an application defined error callback that allows an external listener to report errors.
Public Functions
-
inline PxBroadcastingErrorCallback(PxErrorCallback &errorCallback)
The default constructor.
-
inline virtual ~PxBroadcastingErrorCallback()
The default destructor.
-
inline virtual void reportError(PxErrorCode::Enum code, const char *message, const char *file, int line)
Reports an error code.
- Parameters
code – Error code, see PxErrorCode
message – Message to display.
file – File error occured in.
line – Line number error occured on.
-
inline void registerListener(PxErrorCallback &listener)
Register new listener.
Note
It is NOT SAFE to register and deregister listeners while allocations may be taking place. moreover, there is no thread safety to registration/deregistration.
- Parameters
listener – Listener to register.
-
inline void deregisterListener(PxErrorCallback &listener)
Deregister an existing listener.
Note
It is NOT SAFE to register and deregister listeners while allocations may be taking place. moreover, there is no thread safety to registration/deregistration.
- Parameters
listener – Listener to deregister.
-
inline uint32_t getNbListeners() const
Get number of registered listeners.
- Returns
Number of listeners.
-
inline PxErrorCallback &getListener(uint32_t index)
Get an existing listener from given index.
- Parameters
index – Index of the listener.
- Returns
Listener on given index.
Public Static Attributes
-
static const uint32_t MAX_NB_LISTENERS
Protected Attributes
-
physx::PxInlineArray<PxErrorCallback*, MAX_NB_LISTENERS, physx::PxAllocator> mListeners
-
inline PxBroadcastingErrorCallback(PxErrorCallback &errorCallback)