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 
00044       virtual void insert ( Drawable::pointer drawable ) = 0;
00045 
00046       virtual void remove ( Drawable::pointer drawable ) = 0;
00047 
00048       virtual void clear() = 0;
00049 
00050       virtual bool has ( Drawable::pointer drawable ) const = 0;
00051 
00052       virtual size_t size() const = 0;
00053 
00054       virtual bool empty() const = 0;
00055 
00056       sigc::signal<void, Drawable::pointer> signal_drawable_added() { return m_signal_drawable_added; }
00057 
00058       sigc::signal<void, Drawable::pointer> signal_drawable_removed() { return m_signal_drawable_removed; }
00059 
00060       sigc::signal<void> signal_cleared() { return m_signal_cleared; }
00061 
00062     protected:
00063       sigc::signal<void, Drawable::pointer> m_signal_drawable_added;
00064 
00065       sigc::signal<void, Drawable::pointer> m_signal_drawable_removed;
00066 
00067       sigc::signal<void> m_signal_cleared;
00068 
00069   };
00070 
00071 }
00072 
00073 #endif

Generated on Wed Mar 18 12:34:03 2009 for papyrus by doxygen 1.5.7.1