PVDBinding.h
00001 // This code contains NVIDIA Confidential Information and is disclosed to you
00002 // under a form of NVIDIA software license agreement provided separately to you.
00003 //
00004 // Notice
00005 // NVIDIA Corporation and its licensors retain all intellectual property and
00006 // proprietary rights in and to this software and related documentation and
00007 // any modifications thereto. Any use, reproduction, disclosure, or
00008 // distribution of this software and related documentation without an express
00009 // license agreement from NVIDIA Corporation is strictly prohibited.
00010 //
00011 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
00012 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
00013 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
00014 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
00015 //
00016 // Information and code furnished is believed to be accurate and reliable.
00017 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
00018 // information or for any infringement of patents or other rights of third parties that may
00019 // result from its use. No license is granted by implication or otherwise under any patent
00020 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
00021 // This code supersedes and replaces all information previously supplied.
00022 // NVIDIA Corporation products are not authorized for use as critical
00023 // components in life support devices or systems without express written approval of
00024 // NVIDIA Corporation.
00025 //
00026 // Copyright (c) 2008-2014 NVIDIA Corporation. All rights reserved.
00027 
00028 #ifndef PVDBINDING_H
00029 #define PVDBINDING_H
00030 
00031 #include "foundation/Px.h"
00032 #include "physxvisualdebuggersdk/PvdConnectionFlags.h"
00033 #include "NxApexDefs.h"
00034 
00035 
00036 #define DEFAULT_PVD_BINDING_PORT 5425
00037 #define DEFAULT_PVD_BINDING_TIMEOUT_MS 100
00038 
00039 #define APEX_PVD_NAMESPACE "Apex"
00040 
00041 
00042 namespace NxParameterized
00043 {
00044     class Interface;
00045     class Definition;
00046     class Handle;
00047 }
00048 
00049 namespace physx 
00050 {
00051     class PxProfileZoneManager;
00052 
00053     namespace debugger 
00054     {
00055         namespace comm 
00056         {
00057             class PvdConnectionManager;
00058             class PvdConnection;
00059             class PvdDataStream;
00060         }
00061         namespace renderer
00062         {
00063             class PvdImmediateRenderer;
00064         }
00065     }
00066 }
00067 
00068 namespace PVD
00069 {
00073     struct PvdAction
00074     {
00078         enum Enum
00079         {
00083             UPDATE,
00084 
00088             DESTROY
00089         };
00090     };
00091 
00092 
00093 
00097     class PvdBinding
00098     {
00099     protected:
00100         virtual ~PvdBinding(){}
00101     public:
00105         virtual physx::debugger::comm::PvdConnectionManager& getConnectionManager() = 0;
00106 
00110         virtual physx::PxProfileZoneManager& getProfileManager() = 0;
00111 
00115         virtual bool isConnected() = 0;
00116 
00120         virtual physx::debugger::TConnectionFlagsType getConnectionType() = 0;
00121 
00125         virtual void disconnect() = 0;
00126 
00131         virtual void beginFrame( void* inInstanceId ) = 0;
00132 
00136         virtual void endFrame( void* inInstanceId ) = 0;
00137         
00141         virtual void release() = 0;
00147         virtual void connect( const char* inHost
00148                             , int inPort = DEFAULT_PVD_BINDING_PORT
00149                             , unsigned int inTimeoutInMilliseconds = DEFAULT_PVD_BINDING_TIMEOUT_MS
00150                             //If we are using the debug connection type, we tunnel through the
00151                             //older debugger.  Else we don't and connect directly to pvd without
00152                             //using the older debugger.
00153                             , physx::debugger::TConnectionFlagsType inConnectionType = physx::debugger::defaultConnectionFlags() ) = 0;
00154 
00158         virtual physx::debugger::comm::PvdDataStream* getDataStream() = 0;
00159 
00163         virtual physx::debugger::renderer::PvdImmediateRenderer* getRenderer() = 0;
00164 
00168         virtual void initPvdClasses() = 0;
00169 
00173         virtual void initPvdInstances() = 0;
00174 
00180         virtual void initPvdClasses(const NxParameterized::Definition& paramsHandle, const char* pvdClassName) = 0;
00181 
00185         virtual void updatePvd(const void* pvdInstance, NxParameterized::Interface& params, PvdAction::Enum pvdAction = PvdAction::UPDATE) = 0;
00186         
00191         virtual void lock() = 0;
00192 
00196         virtual void unlock() = 0;
00197 
00201         static PvdBinding* create( physx::debugger::comm::PvdConnectionManager& inConnectionManager, physx::PxProfileZoneManager& inProfileManager );
00202 
00211         static PvdBinding* create( bool inRecordMemoryEvents );
00212     };
00213 
00214 }
00215 
00216 
00217 
00218 #endif // PVDBINDING_H

Generated on Mon Apr 28 2014 08:01:35

Copyright © 2012-2014 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.