VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
gdb
memManageable.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1999 MaK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************/
5
/*********************************************************************
6
** $RCSfile: memManageable.h,v $ $Revision: 1.6 $ $State: Exp $
7
*********************************************************************/
8
9
#ifndef memManageable_H_
10
#define memManageable_H_
11
12
#include "
gdb/gdbDefines.h
"
13
//
14
// Provides and indexed/markable interface.
15
//
16
17
class
DT_DLL_gdb
DtMemoryManageable
18
{
19
20
friend
class
DtMemoryManager
;
21
22
public
:
23
24
// default constructor
25
DtMemoryManageable
();
26
27
// destructor
28
virtual
~
DtMemoryManageable
();
29
30
// copy constructor
31
DtMemoryManageable
(
const
DtMemoryManageable
& orig);
32
33
// assignment operator
34
DtMemoryManageable
&
operator=
(
const
DtMemoryManageable
& orig);
35
36
// change the status of isRemoved. Used to remove memory managed objects
37
virtual
void
setIsRemoved(
bool
onOff);
38
39
//get myIsMemoryManaged (set is protected)
40
virtual
bool
isMemoryManaged()
const
;
41
42
// Not virtual to allow inlining - very frequently called function.
43
bool
isRemoved()
const
;
44
45
46
protected
:
47
48
//set myIsMemoryManaged (should never need to unset)
49
virtual
void
setIsMemoryManaged();
50
51
bool
myIsMemoryManaged
;
52
bool
myIsRemoved
;
53
};
54
55
inline
bool
DtMemoryManageable::isMemoryManaged
()
const
56
{
57
return
myIsMemoryManaged
;
58
}
59
60
inline
void
DtMemoryManageable::setIsMemoryManaged
()
61
{
62
myIsMemoryManaged
=
true
;
63
}
64
65
inline
bool
DtMemoryManageable::isRemoved
()
const
66
{
67
return
myIsRemoved
;
68
}
69
70
inline
void
DtMemoryManageable::setIsRemoved
(
bool
onOff)
71
{
72
myIsRemoved
= onOff;
73
}
74
#endif
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)