VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
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
#endif
44
#include <memory>
45
46
//This following code is for MAK development only, it can be ignored.
47
//
48
#ifdef MEMTRACK
49
//Comment this code out
50
#error Code not uncommented.
51
#endif
52
// !*** Uncomment all code below this line and recompile***!
53
//
54
// #ifdef MEMTRACK
55
// namespace makVrv
56
// {
57
// DT_DLL_VRVUTIL void mem_track( void * p, size_t size );
58
// DT_DLL_VRVUTIL void mem_release( void * p );
59
// DT_DLL_VRVUTIL void mem_start( );
60
// DT_DLL_VRVUTIL void mem_stop( );
61
// DT_DLL_VRVUTIL void mem_frame( double time );
62
// DT_DLL_VRVUTIL void mem_long( );
63
// DT_DLL_VRVUTIL void mem_clear( );
64
// DT_DLL_VRVUTIL void mem_print( bool pointers );
65
// }
66
// #endif
67
//#undef USE_MEMTRACK
68
//#define USE_MEMTRACK 1
69
//
70
// inline void* operator new (size_t size)
71
// {
72
// void *p=malloc(size);
73
// #if USE_MEMTRACK
74
// makVrv::mem_track(p, size);
75
// #endif
76
// if (p==0) // did malloc succeed?
77
// throw std::bad_alloc(); // ANSI/ISO compliant behavior
78
// return p;
79
// }
80
//
81
// inline void * operator new[] (size_t size)
82
// {
83
// void *p=malloc(size);
84
// #if USE_MEMTRACK
85
// makVrv::mem_track(p, size);
86
// #endif
87
// if (p==0) // did malloc succeed?
88
// throw std::bad_alloc(); // ANSI/ISO compliant behavior
89
// return p;
90
// }
91
//
92
//
93
// inline void operator delete (void *p)
94
// {
95
// if(p)
96
// {
97
// makVrv::mem_release(p);
98
// free(p);
99
// }
100
// }
101
//
102
// inline void operator delete[] (void* p)
103
// {
104
// if(p)
105
// {
106
// makVrv::mem_release(p);
107
// free(p);
108
// }
109
// }
110
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)