29#ifndef PX_PROFILE_ZONE_MANAGER_IMPL_H
30#define PX_PROFILE_ZONE_MANAGER_IMPL_H
32#include "PxProfileZoneManager.h"
33#include "PxProfileScopedMutexLock.h"
34#include "PxPvdProfileZone.h"
35#include "PxProfileAllocatorWrapper.h"
37#include "foundation/PxArray.h"
38#include "foundation/PxMutex.h"
40namespace physx {
namespace profile {
61 : mWrapper( inFoundation )
63 , mHandlers( mWrapper )
70 PX_ASSERT( mZones.
size() == 0 );
71 while( mZones.
size() )
91 for ( uint32_t idx =0; idx < mHandlers.
size(); ++idx )
92 mHandlers[idx]->onZoneAdded( inSDK );
109 for ( uint32_t idx = 0; idx < mZones.
size(); ++idx )
111 if ( mZones[idx] == &inSDK )
113 for ( uint32_t handler =0; handler < mHandlers.
size(); ++handler )
114 mHandlers[handler]->onZoneRemoved( inSDK );
122 uint32_t sdkCount = mZones.
size();
123 for ( uint32_t idx = 0; idx < sdkCount; ++idx )
131 for ( uint32_t idx = 0; idx < mZones.
size(); ++idx )
138 for( uint32_t idx = 0; idx < mZones.
size(); ++idx )
140 for( uint32_t idx = 0; idx < mHandlers.
size(); ++idx )
142 if ( mHandlers[idx] == &inHandler )
150 if ( inProvider == NULL )
151 inProvider = &nullProvider;
152 return createProfileZone( inSDKName, inProvider->
getProfileNames(), inEventBufferByteSize );
165 PX_PROFILE_DELETE( mWrapper.getAllocator(),
this );
Abstract base class for an application defined memory allocator that can be used by the Nv library.
Definition PxAllocatorCallback.h:53
PX_FORCE_INLINE uint32_t size() const
Definition PxArray.h:242
PX_FORCE_INLINE T & pushBack(const T &a)
Definition PxArray.h:296
PX_INLINE void replaceWithLast(uint32_t i)
Definition PxArray.h:345
PX_FORCE_INLINE const T & back() const
Definition PxArray.h:224
Provides a mapping from event ID -> name.
Definition PxProfileEventNames.h:74
virtual PxProfileNames getProfileNames() const =0
Returns profile event names.
Profile zone handler for zone add/remove notification.
Definition PxProfileZoneManager.h:46
virtual void onZoneAdded(PxProfileZone &inSDK)=0
On zone added notification
virtual void onZoneRemoved(PxProfileZone &inSDK)=0
On zone removed notification
The profiling system was setup in the expectation that there would be several systems that each had i...
Definition PxProfileZoneManager.h:86
virtual void removeProfileZone(PxProfileZone &inSDK)=0
Removes profile zone from the manager.
The profiling system was setup in the expectation that there would be several systems that each had i...
Definition PxPvdProfileZone.h:67
virtual void setProfileZoneManager(PxProfileZoneManager *inMgr)=0
Set profile zone manager for the zone.
static PxProfileZone & createProfileZone(PxAllocatorCallback *inAllocator, const char *inSDKName, PxProfileNames inNames=PxProfileNames(), uint32_t inEventBufferByteSize=0x10000)
Create a new profile zone.
Definition PxProfileEventImpl.cpp:45
virtual PxProfileZoneManager * getProfileZoneManager()=0
Get profile zone manager for the zone.
Definition PxProfileZoneManagerImpl.h:48
virtual PxProfileZone & createProfileZone(const char *inSDKName, PxProfileNames inNames, uint32_t inEventBufferByteSize)
Create a new profile zone. This means you don't need access to a PxFoundation to create your profile ...
Definition PxProfileZoneManagerImpl.h:156
virtual void addProfileZone(PxProfileZone &inSDK)
Add new profile zone for the manager.
Definition PxProfileZoneManagerImpl.h:75
virtual void addProfileZoneHandler(PxProfileZoneHandler &inHandler)
Add profile zone handler callback for the profile zone notifications.
Definition PxProfileZoneManagerImpl.h:127
virtual void removeProfileZoneHandler(PxProfileZoneHandler &inHandler)
Removes profile zone handler callback for the profile zone notifications.
Definition PxProfileZoneManagerImpl.h:135
virtual void release()
Releases the profile manager instance.
Definition PxProfileZoneManagerImpl.h:163
virtual void flushProfileEvents()
Flush profile events. Sends the profile event buffer to hooked clients.
Definition PxProfileZoneManagerImpl.h:120
virtual void removeProfileZone(PxProfileZone &inSDK)
Removes profile zone from the manager.
Definition PxProfileZoneManagerImpl.h:95
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Definition PxProfileZoneManagerImpl.h:43
virtual PxProfileNames getProfileNames() const
Returns profile event names.
Definition PxProfileZoneManagerImpl.h:44
Helper struct to encapsulate the user allocator callback Useful for array and hash templates.
Definition PxProfileAllocatorWrapper.h:46
Helper struct to encapsulate the array.
Definition PxProfileAllocatorWrapper.h:152
Aggregator of event id -> name mappings.
Definition PxProfileEventNames.h:54
Definition PxProfileScopedMutexLock.h:41