29#ifndef PX_FOUNDATION_PSFOUNDATION_H
30#define PX_FOUNDATION_PSFOUNDATION_H
32#include "foundation/PxErrors.h"
33#include "foundation/PxProfiler.h"
34#include "foundation/PxFoundation.h"
35#include "foundation/PxAllocator.h"
36#include "foundation/PxHashMap.h"
37#include "foundation/PxUserAllocated.h"
38#include "foundation/PxBroadcast.h"
39#include "foundation/PxTempAllocator.h"
40#include "foundation/PxMutex.h"
49#pragma warning(disable : 4251)
65 static void setInstance(
Foundation& foundation);
67 static void incRefCount();
68 static void decRefCount();
69 static PxU32 getRefCount();
74 return mErrorCallback;
78 return mBroadcastingError;
81 virtual void registerErrorCallback(PxErrorCallback& listener);
82 virtual void deregisterErrorCallback(PxErrorCallback& listener);
93 virtual bool error(
PxErrorCode::Enum,
const char* file,
int line,
const char* messageFmt, ...);
95 virtual bool error(
PxErrorCode::Enum,
const char* file,
int line,
const char* messageFmt, va_list);
97 static PxU32 getWarnOnceTimestamp();
104 return mAllocatorCallback;
108 return mBroadcastingAllocator;
116 return mReportAllocationNames;
120 mReportAllocationNames = value;
123 PX_INLINE AllocFreeTable& getTempAllocFreeTable()
125 return mTempAllocFreeTable;
129 return mTempAllocMutex;
134 static void destroyInstance();
136 Foundation(PxErrorCallback& errc, PxAllocatorCallback& alloc);
140 PxAllocatorCallback& mAllocatorCallback;
141 PxErrorCallback& mErrorCallback;
143 PxBroadcastingAllocator mBroadcastingAllocator;
144 PxBroadcastingErrorCallback mBroadcastingError;
146 bool mReportAllocationNames;
148 PxErrorCode::Enum mErrorMask;
151 AllocFreeTable mTempAllocFreeTable;
152 Mutex mTempAllocMutex;
154 Mutex mListenerMutex;
156 static Foundation* mInstance;
158 static PxU32 mWarnOnceTimestap;
166 return Foundation::getInstance();
Definition FdFoundation.h:53
virtual void setReportAllocationNames(bool value)
Definition FdFoundation.h:118
virtual bool getReportAllocationNames() const
Definition FdFoundation.h:114
virtual PxAllocatorCallback & getAllocatorCallback()
Definition FdFoundation.h:102
virtual void setErrorLevel(PxErrorCode::Enum mask)
Definition FdFoundation.h:84
virtual PxErrorCode::Enum getErrorLevel() const
Definition FdFoundation.h:88
virtual PxErrorCallback & getErrorCallback()
Definition FdFoundation.h:72
Abstract listener class that listens to allocation and deallocation events from the foundation memory...
Definition PxBroadcast.h:49
Abstract base class for an application defined memory allocator that can be used by the Nv library.
Definition PxAllocatorCallback.h:53
User defined interface class. Used by the library to emit debug information.
Definition PxErrorCallback.h:51
Foundation SDK singleton class.
Definition PxFoundation.h:57
Definition PxUserAllocated.h:43
#define PX_INLINE
Definition PxPreprocessor.h:320
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Enum
Definition PxErrors.h:52