VR-Vantage API Documentation
Home
Modules
Namespaces
Classes
Files
Libraries
Examples
Tutorials
File List
File Members
include
vrvUtil
vrvUtil.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2007 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: vrvUtil.h,v $ $Revision: 1.7 $ $State: Exp $
7
******************************************************************************/
8
12
13
#pragma once
14
#ifdef _WIN32
15
# pragma warning( error : 4700 )
16
# pragma warning( error : 4701 )
17
# pragma warning( error : 4101 )
18
# pragma warning( error : 4189 )
19
# pragma warning( error : 4715 )
20
# pragma warning( error : 4239 )
21
# pragma warning( error : 4150 )
22
# pragma warning( error : 4553 )
23
# pragma warning( disable : 4512 )
24
# pragma warning( disable : 4511 )
25
# pragma warning( disable : 4396 )
26
# pragma warning( disable : 4832 )
27
# pragma warning( disable : 4996 )
28
# ifdef _M_X64 //64bit application, set DT_MEMORY_64
29
# define DT_MEMORY_64
30
# endif
31
# ifdef vrvUtil_EXPORTS
32
# define DT_DLL_VRVUTIL __declspec ( dllexport )
33
# else
34
# define DT_DLL_VRVUTIL __declspec ( dllimport )
35
# ifdef _DEBUG
36
# pragma comment(lib,"vrvUtild.lib")
37
# else
38
# pragma comment(lib,"vrvUtil.lib")
39
# endif
40
# endif
41
#else
42
# define DT_DLL_VRVUTIL
43
# ifdef _M_X64 //64bit application, set DT_MEMORY_64
44
# define DT_MEMORY_64
45
# endif
46
#endif
47
#include <memory>
48
49
//This following code is for MAK development only, it can be ignored.
50
//
51
#ifdef MEMTRACK
52
//Comment this code out
53
#error Code not uncommented.
54
#endif
55
// !*** Uncomment all code below this line and recompile***!
56
//
57
// #ifdef MEMTRACK
58
// namespace makVrv
59
// {
60
// DT_DLL_VRVUTIL void mem_track( void * p, size_t size );
61
// DT_DLL_VRVUTIL void mem_release( void * p );
62
// DT_DLL_VRVUTIL void mem_start( );
63
// DT_DLL_VRVUTIL void mem_stop( );
64
// DT_DLL_VRVUTIL void mem_frame( double time );
65
// DT_DLL_VRVUTIL void mem_long( );
66
// DT_DLL_VRVUTIL void mem_clear( );
67
// DT_DLL_VRVUTIL void mem_print( bool pointers );
68
// }
69
// #endif
70
//#undef USE_MEMTRACK
71
//#define USE_MEMTRACK 1
72
//
73
// inline void* operator new (size_t size)
74
// {
75
// void *p=malloc(size);
76
// #if USE_MEMTRACK
77
// makVrv::mem_track(p, size);
78
// #endif
79
// if (p==0) // did malloc succeed?
80
// throw std::bad_alloc(); // ANSI/ISO compliant behavior
81
// return p;
82
// }
83
//
84
// inline void * operator new[] (size_t size)
85
// {
86
// void *p=malloc(size);
87
// #if USE_MEMTRACK
88
// makVrv::mem_track(p, size);
89
// #endif
90
// if (p==0) // did malloc succeed?
91
// throw std::bad_alloc(); // ANSI/ISO compliant behavior
92
// return p;
93
// }
94
//
95
//
96
// inline void operator delete (void *p)
97
// {
98
// if(p)
99
// {
100
// makVrv::mem_release(p);
101
// free(p);
102
// }
103
// }
104
//
105
// inline void operator delete[] (void* p)
106
// {
107
// if(p)
108
// {
109
// makVrv::mem_release(p);
110
// free(p);
111
// }
112
// }
113
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)