managed_object.h

Go to the documentation of this file.
00001 #ifndef MANAGED_OBJECT_CLASS
00002 #define MANAGED_OBJECT_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : managed_object                                                    *
00007 *  Author : Aaron Buchanan                                                    *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 2001-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include <basis/definitions.h>
00019 
00020 // forward.
00021 template <class c> class object_storer;
00022 
00024 
00030 template <class contents>
00031 class managed_object
00032 {
00033 public:
00034     managed_object();
00039     managed_object(contents *&_object);
00041 
00046     managed_object(const managed_object &_rhs);
00048     managed_object &operator =(const managed_object &rhs);
00050 
00054     virtual ~managed_object();
00056 
00060     bool operator ==(const managed_object &_compare) const;
00064     managed_object<contents> *new_reference();
00066 
00071     contents *access();
00073 
00074     const contents *observe() const;
00076 
00077 private:
00078     object_storer<contents> *storer;
00079 };
00080 
00081 #endif
00082 

Generated on Fri Nov 28 04:29:12 2008 for HOOPLE Libraries by  doxygen 1.5.1