<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Callbacks in C++?]]></title><description><![CDATA[<p>Hallo!</p>
<p>Wie implementiert man Callbacks in C++? Sind da Funktionszeiger ok oder nimmt man da besser was anderes?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/288250/callbacks-in-c</link><generator>RSS for Node</generator><lastBuildDate>Thu, 20 Aug 2026 02:19:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/288250.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Jun 2011 10:14:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Callbacks in C++? on Mon, 13 Jun 2011 10:14:43 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Wie implementiert man Callbacks in C++? Sind da Funktionszeiger ok oder nimmt man da besser was anderes?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2077399</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2077399</guid><dc:creator><![CDATA[CallOfDuty]]></dc:creator><pubDate>Mon, 13 Jun 2011 10:14:43 GMT</pubDate></item><item><title><![CDATA[Reply to Callbacks in C++? on Mon, 13 Jun 2011 10:18:09 GMT]]></title><description><![CDATA[<p>Boost Function ist für sowas total knorke:</p>
<p><a href="http://www.boost.org/doc/libs/1_46_1/doc/html/function/tutorial.html#id1274613" rel="nofollow">http://www.boost.org/doc/libs/1_46_1/doc/html/function/tutorial.html#id1274613</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2077400</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2077400</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Mon, 13 Jun 2011 10:18:09 GMT</pubDate></item><item><title><![CDATA[Reply to Callbacks in C++? on Mon, 13 Jun 2011 10:25:42 GMT]]></title><description><![CDATA[<p>Ich will auf keinen Fall boost (oder irgend eine andere Lib benutzen).</p>
<p>Ist nicht die einfachste Lösung einfach eine abstrakte Basisklasse?</p>
<pre><code class="language-cpp">class Event {
public:
    virtual void processEvent() = 0;
};

class MyEvent : public Event { ... }

MyEvent e;
foo-&gt;registerEvent(e);
...
foo-&gt;fireEvent(); // macht e-&gt;processEvent()
</code></pre>
<p>Ist das ok?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2077406</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2077406</guid><dc:creator><![CDATA[CallOfDuty]]></dc:creator><pubDate>Mon, 13 Jun 2011 10:25:42 GMT</pubDate></item><item><title><![CDATA[Reply to Callbacks in C++? on Mon, 13 Jun 2011 10:31:19 GMT]]></title><description><![CDATA[<p>Nimm halt std::tr1::function (Boost.Function wurde praktisch 1:1 in TR1 übernommen).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2077407</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2077407</guid><dc:creator><![CDATA[seldon]]></dc:creator><pubDate>Mon, 13 Jun 2011 10:31:19 GMT</pubDate></item><item><title><![CDATA[Reply to Callbacks in C++? on Mon, 13 Jun 2011 10:48:40 GMT]]></title><description><![CDATA[<p>CallOfDuty schrieb:</p>
<blockquote>
<p>Ich will auf keinen Fall boost (oder irgend eine andere Lib benutzen).</p>
</blockquote>
<p>Warum?</p>
<blockquote>
<p>Ist nicht die einfachste Lösung einfach eine abstrakte Basisklasse?</p>
</blockquote>
<p>Das würde ich jetzt nicht als callback bezeichnen. Aber wenn es dir reicht: klar warum nicht!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2077412</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2077412</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Mon, 13 Jun 2011 10:48:40 GMT</pubDate></item></channel></rss>