VR-Forces 4.0.4 Class Documentation
include/vrvUtil/vrvUtil.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2007 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: vrvUtil.h,v $ $Revision: 1.7 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #pragma once
00014 #ifdef _WIN32
00015 #  pragma warning( error : 4700 ) //! local variable '<name>' used without having been initialized
00016 #  pragma warning( error : 4701 ) //! Promote "local variable may be used without being initialized" from a warning to an error.
00017 #  pragma warning( error : 4101 ) //! Unused local var.
00018 #  pragma warning( error : 4189 ) //! Unused local var.
00019 #  pragma warning( error : 4715 ) //! Incorrect return path.
00020 #  pragma warning( error : 4239 ) //! Ref to Const Ref implicit conversion.
00021 #  pragma warning( error : 4150 ) //! Deleting unknown pointer type.
00022 #  pragma warning( error : 4553 ) //! operator has not effect, likely a bug.
00023 #  pragma warning( disable : 4512 ) //! stl nonsense
00024 #  pragma warning( disable : 4511 ) //! stl nonsense
00025 #  pragma warning( disable : 4396 ) //! stl nonsense
00026 #  pragma warning( disable : 4832 ) //! Catch incorrect '.'
00027 #  pragma warning( disable : 4996 ) //! Windows deprecated POSIX, great job!
00028 #  ifdef _M_X64 //64bit application, set DT_MEMORY_64
00029 #     define DT_MEMORY_64
00030 #  endif
00031 #  ifdef vrvUtil_EXPORTS
00032 #     define DT_DLL_VRVUTIL __declspec ( dllexport )
00033 #  else
00034 #     define DT_DLL_VRVUTIL __declspec ( dllimport )
00035 #     ifdef _DEBUG
00036 #        pragma comment(lib,"vrvUtild.lib")
00037 #     else
00038 #        pragma comment(lib,"vrvUtil.lib")
00039 #     endif
00040 #  endif
00041 #else
00042 #  define DT_DLL_VRVUTIL
00043 #endif
00044 #include <memory>
00045 
00046 //This following code is for MAK development only, it can be ignored.
00047 //
00048 #ifdef MEMTRACK
00049 //Comment this code out
00050 #error Code not uncommented.
00051 #endif
00052 // !*** Uncomment all code below this line and recompile***!
00053 //
00054 // #ifdef MEMTRACK
00055 // namespace makVrv
00056 // {
00057 //    DT_DLL_VRVUTIL void mem_track( void * p, size_t size );
00058 //    DT_DLL_VRVUTIL void mem_release( void * p );
00059 //    DT_DLL_VRVUTIL void mem_start( );
00060 //    DT_DLL_VRVUTIL void mem_stop(  );
00061 //    DT_DLL_VRVUTIL void mem_frame( double time );
00062 //    DT_DLL_VRVUTIL void mem_long( );
00063 //    DT_DLL_VRVUTIL void mem_clear( );
00064 //    DT_DLL_VRVUTIL void mem_print( bool pointers );   
00065 // }
00066 // #endif
00067 //#undef USE_MEMTRACK
00068 //#define USE_MEMTRACK 1
00069 // 
00070 // inline void* operator new (size_t size)
00071 // {   
00072 //    void *p=malloc(size);
00073 // #if USE_MEMTRACK
00074 //    makVrv::mem_track(p, size);
00075 // #endif
00076 //    if (p==0) // did malloc succeed?
00077 //       throw std::bad_alloc(); // ANSI/ISO compliant behavior
00078 //    return p;
00079 // }
00080 // 
00081 // inline void * operator new[] (size_t size)
00082 // {
00083 //    void *p=malloc(size);
00084 // #if USE_MEMTRACK
00085 //    makVrv::mem_track(p, size);
00086 // #endif
00087 //    if (p==0) // did malloc succeed?
00088 //       throw std::bad_alloc(); // ANSI/ISO compliant behavior
00089 //    return p;
00090 // }
00091 // 
00092 // 
00093 // inline void operator delete (void *p)
00094 // {
00095 //    if(p)
00096 //    {
00097 //       makVrv::mem_release(p);
00098 //       free(p); 
00099 //    }
00100 // }
00101 // 
00102 // inline void operator delete[] (void* p)
00103 // {
00104 //    if(p)
00105 //    {
00106 //       makVrv::mem_release(p);
00107 //       free(p);
00108 //    }
00109 // }
00110 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)