VR-Forces 4.0.4 Class Documentation
include/gdb/memManageable.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1999 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: memManageable.h,v $ $Revision: 1.6 $ $State: Exp $
00007 *********************************************************************/
00008 
00009 #ifndef memManageable_H_
00010 #define memManageable_H_
00011 
00012 #include "gdb/gdbDefines.h"
00013 //
00014 // Provides and indexed/markable interface.
00015 //
00016 
00017 class DT_DLL_gdb DtMemoryManageable
00018 {
00019 
00020    friend class DtMemoryManager;
00021 
00022 public:
00023 
00024    // default constructor
00025    DtMemoryManageable();
00026 
00027    // destructor
00028    virtual ~DtMemoryManageable();
00029 
00030    // copy constructor
00031    DtMemoryManageable(const DtMemoryManageable& orig);
00032 
00033    // assignment operator
00034    DtMemoryManageable& operator=(const DtMemoryManageable& orig);
00035 
00036    // change the status of isRemoved. Used to remove memory managed objects
00037    virtual void setIsRemoved(bool onOff);
00038 
00039    //get myIsMemoryManaged (set is protected)
00040    virtual bool isMemoryManaged() const;
00041 
00042    // Not virtual to allow inlining - very frequently called function.
00043    bool isRemoved() const;
00044 
00045 
00046 protected:
00047 
00048    //set myIsMemoryManaged (should never need to unset)
00049    virtual void setIsMemoryManaged();
00050 
00051    bool myIsMemoryManaged;
00052    bool myIsRemoved;
00053 };
00054 
00055 inline bool DtMemoryManageable::isMemoryManaged() const
00056 {
00057    return myIsMemoryManaged;
00058 }
00059 
00060 inline void DtMemoryManageable::setIsMemoryManaged()
00061 {
00062    myIsMemoryManaged = true;
00063 }
00064 
00065 inline bool DtMemoryManageable::isRemoved() const
00066 {
00067    return myIsRemoved;
00068 }
00069 
00070 inline void DtMemoryManageable::setIsRemoved(bool onOff)
00071 {
00072    myIsRemoved = onOff;
00073 }
00074 #endif

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)