VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtCommonUtils.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
11 #include <string>
12 
13 #pragma warning( push )
14 #pragma warning( disable : 4005 )
15 
16 
17 #define TYPE_TO_STRING(T) std::string(#T)
18 
19 #define VAR_NAME_TO_STRING(T) std::string(#T)
20 
21 #define SAFE_DELETE(p) if (p) \
22  { \
23  delete p; \
24  p = 0; \
25  } \
26 
27 #define SAFE_DELETE_ARRAY(p) { if (p) { delete[] (p); (p)=NULL; } }
28 
29 #define SAFE_RELEASE(p) { if (p) { (p)->Release(); (p)=NULL; } }
30 
31 #define V_RETURN(x) { hr = (x); if( FAILED(hr) ) { return hr; } }
32 
33 #define UNREFERENCED_VARIABLE(x) static_cast<void>(x)
34 
35 #pragma warning ( pop )

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)