object.h

Go to the documentation of this file.
00001 /* -*- Mode:c++ -*- */
00002 /*
00003  *  this is part of Spm
00004  *
00005  *  Copyright (c) 2007 Guillaume Chevallereau
00006  *
00007  *  This program is free software. You can redistribute it and/or modify it 
00008  *  under the terms of the GNU General Public License as published by the 
00009  *  Free Software Foundation. Either version 2 of the license or (at your 
00010  *  option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be usefull but WITHOUT
00013  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
00014  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
00015  *  more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License along 
00018  *  with this program; if not, write to the Free Software Foundation, Inc., 
00019  *  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
00020  */
00021 
00022 #ifndef __OBJECT_H__
00023 #define __OBJECT_H__
00024 
00025 #include <miniXml/ustring.h>
00026 #include <boost/utility.hpp>
00027 #include <boost/signal.hpp>
00028 #include <boost/thread/recursive_mutex.hpp>
00029 
00030 namespace Spm
00031 {
00032   namespace Util
00033   {
00039     class Object : boost::noncopyable
00040     {
00041     protected :
00042       mutable miniXml::ustring name_;
00043       miniXml::ustring owner_;
00044       boost::signal<void (Object *)> modified_;
00045       mutable boost::recursive_mutex mutex_;
00046 
00047     public :
00048       virtual ~Object ()
00049       {
00050       }
00051 
00055       virtual const miniXml::ustring & getName ()
00056       {
00057         return name_;
00058       }
00059 
00063       virtual const miniXml::ustring & getName () const
00064       {
00065         return name_;
00066       }
00067 
00071       const miniXml::ustring & getOwner ()
00072       {
00073         return owner_;
00074       }
00075 
00079       const miniXml::ustring & getOwner () const
00080       {
00081         return owner_;
00082       }
00083 
00087       boost::signal<void (Object *)> & modified ()
00088       {
00089         return modified_;
00090       }
00091     };
00092   }
00093 }
00094 #endif

Generated on Sat Mar 21 17:00:14 2009 for libSpm by  doxygen 1.5.2