SignalsAndSlots.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /* GG is a GUI for SDL and OpenGL.
00003    Copyright (C) 2003 T. Zachary Laine
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public License
00007    as published by the Free Software Foundation; either version 2.1
00008    of the License, or (at your option) any later version.
00009    
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014     
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with this library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA
00019 
00020    If you do not wish to comply with the terms of the LGPL please
00021    contact the author as other terms are available for a fee.
00022     
00023    Zach Laine
00024    whatwasthataddress@hotmail.com */
00025 
00026 #ifndef _GG_SignalsAndSlots_h_
00027 #define _GG_SignalsAndSlots_h_
00028 
00029 #include <boost/bind.hpp>
00030 #include <boost/preprocessor/cat.hpp>
00031 
00032 #include <GG/Signal0.h>
00033 #include <GG/Signal1.h>
00034 #include <GG/Signal2.h>
00035 #include <GG/Signal3.h>
00036 #include <GG/Signal4.h>
00037 #include <GG/Signal5.h>
00038 #include <GG/Signal6.h>
00039 #include <GG/Signal7.h>
00040 #include <GG/Signal8.h>
00041 
00045 namespace GG {
00046 
00049 template <class SigT> inline 
00050 boost::signals::connection 
00051 Connect(SigT& sig, const typename SigT::slot_type& _slot, boost::signals::connect_position at = boost::signals::at_back)
00052 {
00053     return sig.connect(_slot, at);
00054 }
00055 
00058 template <class SigT> inline 
00059 boost::signals::connection 
00060 Connect(SigT& sig, const typename SigT::slot_type& _slot, int grp, boost::signals::connect_position at = boost::signals::at_back)
00061 {
00062     return sig.connect(grp, _slot, at);
00063 }
00064 
00065 } // namespace GG
00066 
00067 
00068 #endif // _GG_SignalsAndSlots_h_
00069 
00070 

Generated on Wed Mar 26 14:35:42 2008 for GG by  doxygen 1.5.2