X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2Fmembind.hh;h=c2baf8601d2ab02570d972d2e9414cec592ee0bd;hb=3863d46dd898b7bc35ea8c6ccd8563b18762a6b6;hp=4949d5941de899666a94b058b1c1f28095825865;hpb=31d85cd6b8e03c5ecc924ca8892906be1bab702f;p=senf.git diff --git a/Utils/membind.hh b/Utils/membind.hh index 4949d59..c2baf86 100644 --- a/Utils/membind.hh +++ b/Utils/membind.hh @@ -1,9 +1,9 @@ // $Id$ // // Copyright (C) 2006 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Stefan Bund +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Stefan Bund // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -25,8 +25,8 @@ /** \defgroup membind Bound Member Functions - The membind() family of function templates simplifies the creation - of simple bound member function pointers: + The membind() family of function templates simplifies the creation of simple bound member + function pointers: \code struct Foo { @@ -38,31 +38,33 @@ int rv = f(1); // Calls foo->test(1) \endcode - \idea Make the \a ob argument type an additional P template - parameter (using call_traits for the exact arg type? Probably - we'll get deduction problems then) . The only operation this - object must support is ob->*fn. This would allow the use of - smart pointers. We should keep the T & version to still support - ob.*fn use. + senf::membind() takes either a pointer or an object as second argument. When passing an object, + that object will be copied into the bound member function returned. + + \idea Make the \a ob argument type an additional P template parameter (using call_traits for the + exact arg type? Probably we'll get deduction problems then) . The only operation this object + must support is ob->*fn. This would allow the use of smart pointers. We should keep the T & + version to still support ob.*fn use. */ -#ifndef HH_membind_ -#define HH_membind_ 1 +#ifndef HH_SENF_Utils_membind_ +#define HH_SENF_Utils_membind_ 1 // Custom includes #include #include +#include "../config.hh" ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { #define scOBTYPE T * -#include "Utils/impl/membind.hh" +#include "../Utils/impl/membind.hh" #undef scOBTYPE #define scOBTYPE T & -#include "Utils/impl/membind.hh" +#include "../Utils/impl/membind.hh" #undef scOBTYPE #ifdef DOXYGEN @@ -103,4 +105,5 @@ namespace senf { // indent-tabs-mode: nil // ispell-local-dictionary: "american" // compile-command: "scons -u test" +// comment-column: 40 // End: