VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
memoryManageable.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 memoryManageable_H_
10 #define memoryManageable_H_
11 
12 #include "gdb/gdbDefines.h"
13 //
14 // Provides and indexed/markable interface.
15 //
16 
18 {
19 
20  friend class DtMemoryManager;
21 
22 public:
23 
24  // default constructor
26 
27  // destructor
28  virtual ~DtMemoryManageable();
29 
30  // copy constructor
32 
33  // assignment operator
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 
53 };
54 
56 {
57  return myIsMemoryManaged;
58 }
59 
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
Definition: memoryManager.h:33
virtual void setIsMemoryManaged()
Definition: memoryManageable.h:60
virtual void setIsRemoved(bool onOff)
Definition: memoryManageable.h:70
Definition: memoryManageable.h:17
#define DT_DLL_gdb
Definition: gdbDefines.h:25
bool isRemoved() const
Definition: memoryManageable.h:65
virtual bool isMemoryManaged() const
Definition: memoryManageable.h:55
bool myIsMemoryManaged
Definition: memoryManageable.h:51
DtMemoryManager & operator=(const DtMemoryManager &orig)
bool myIsRemoved
Definition: memoryManageable.h:52

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)