papyrus logo

drawablecontainer.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the papyrus library.                             *
00006  *                                                                         *
00007  *   papyrus is free software; you can redistribute it and/or modify       *
00008  *   it under the terms of the GNU Lesser General Public License           *
00009  *   version 3.0 as published by the Free Software Foundation.             *
00010  *                                                                         *
00011  *   papyrus is distributed in the hope that it will be useful,            *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Lesser General Public License version 3.0 for more details.       *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Lesser General Public      *
00017  *   License along with the papyrus library. If not, see                   *
00018  *   <http://www.gnu.org/licenses/>.                                       *
00019  ***************************************************************************/
00020 #ifndef PAPYRUSDRAWABLECONTAINER_H
00021 #define PAPYRUSDRAWABLECONTAINER_H
00022 
00023 #include <papyrus/drawable.h>
00024 
00025 namespace Papyrus
00026 {
00027 
00037   class DrawableContainer
00038   {
00039     public:
00040       DrawableContainer() { }
00041 
00042       virtual ~DrawableContainer() { }
00043 
00045       virtual void add ( Drawable::pointer drawable ) = 0;
00046 
00047       virtual void remove ( Drawable::pointer drawable ) = 0;
00048 
00049       virtual void clear() = 0;
00050 
00051       virtual bool has ( Drawable::pointer drawable ) const = 0;
00052 
00053       virtual size_t size() const = 0;
00054 
00055       virtual bool empty() const = 0;
00056 
00057       sigc::signal<void, Drawable::pointer> signal_drawable_added() { return m_signal_drawable_added; }
00058 
00059       sigc::signal<void, Drawable::pointer> signal_drawable_removed() { return m_signal_drawable_removed; }
00060 
00061       sigc::signal<void> signal_cleared() { return m_signal_cleared; }
00062 
00063     protected:
00064       sigc::signal<void, Drawable::pointer> m_signal_drawable_added;
00065 
00066       sigc::signal<void, Drawable::pointer> m_signal_drawable_removed;
00067 
00068       sigc::signal<void> m_signal_cleared;
00069 
00070   };
00071 
00072 }
00073 
00074 #endif

Generated on Fri Apr 16 12:40:10 2010 for papyrus by doxygen 1.6.1