Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MNSelfDestrPtr.h

Go to the documentation of this file.
00001 /* 00002 * Copyright (c) 1997 00003 * Silicon Graphics Computer Systems, Inc. 00004 * 00005 * Permission to use, copy, modify, distribute and sell this software 00006 * and its documentation for any purpose is hereby granted without fee, 00007 * provided that the above copyright notice appear in all copies and 00008 * that both that copyright notice and this permission notice appear 00009 * in supporting documentation. Silicon Graphics makes no 00010 * representations about the suitability of this software for any 00011 * purpose. It is provided "as is" without express or implied warranty. 00012 * 00013 * Heavily modified by KOM/Darmstadt University of Technology, 2000 00014 */ 00015 #ifndef _R_SELF_DESTRUCT_PTR_H 00016 #define _R_SELF_DESTRUCT_PTR_H 00017 00018 #include "MNRopeRep.h" 00019 00024 // Self-destructing pointers to Rope_rep. 00025 // These are not conventional smart pointers. Their 00026 // only purpose in life is to ensure that unref is called 00027 // on the pointer either at normal exit or if an exception 00028 // is raised. It is the caller's responsibility to 00029 // adjust reference counts when these pointers are initialized 00030 // or assigned to. (This convention significantly reduces 00031 // the number of potentially expensive reference count 00032 // updates.) 00033 struct MNSelfDestrPtr 00034 { 00035 MNRopeRep* _M_ptr; 00036 00037 ~MNSelfDestrPtr(); 00038 00039 MNSelfDestrPtr(); 00040 MNSelfDestrPtr(MNRopeRep* __p); 00041 00042 MNRopeRep& operator*(); 00043 MNRopeRep* operator->(); 00044 operator MNRopeRep*(); 00045 MNSelfDestrPtr& operator= (MNRopeRep* __x); 00046 }; 00047 00049 00050 #endif /* _R_SELF_DESTRUCT_PTR_H */ 00051

Generated on Sun Mar 6 13:35:49 2005 for Komssys by doxygen 1.3.8