1 | /* |
2 | * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. |
3 | * |
4 | * NVIDIA CORPORATION and its licensors retain all intellectual property |
5 | * and proprietary rights in and to this software, related documentation |
6 | * and any modifications thereto. Any use, reproduction, disclosure or |
7 | * distribution of this software and related documentation without an express |
8 | * license agreement from NVIDIA CORPORATION is strictly prohibited. |
9 | */ |
10 | |
11 | #ifndef PX_PROFILE_EVENT_ID_H |
12 | #define PX_PROFILE_EVENT_ID_H |
13 | |
14 | #include "physxprofilesdk/PxProfileBase.h" |
15 | |
16 | namespace physx |
17 | { |
18 | /** |
19 | A event id structure. Optionally includes information about |
20 | if the event was enabled at compile time. |
21 | */ |
22 | struct PxProfileEventId |
23 | { |
24 | PxU16 mEventId; |
25 | mutable bool mCompileTimeEnabled; |
26 | PxProfileEventId( PxU16 inId = 0, bool inCompileTimeEnabled = true ) |
27 | : mEventId( inId ) |
28 | , mCompileTimeEnabled( inCompileTimeEnabled ) |
29 | { |
30 | } |
31 | operator PxU16 () const { return mEventId; } |
32 | bool operator==( const PxProfileEventId& inOther ) const |
33 | { |
34 | return mEventId == inOther.mEventId; |
35 | } |
36 | }; |
37 | |
38 | template<bool TEnabled> |
39 | struct PxProfileCompileTimeFilteredEventId : public PxProfileEventId |
40 | { |
41 | PxProfileCompileTimeFilteredEventId( PxU16 inId = 0 ) |
42 | : PxProfileEventId( inId, TEnabled ) |
43 | { |
44 | } |
45 | }; |
46 | } |
47 | |
48 | #endif // PX_PROFILE_EVENT_ID_H |
49 | |