<?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[Suche FIFO Klasse]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich suche eine FIFO-Klasse im Stile der UNIX Pipes. Also mit ungefär so einem Interface:</p>
<pre><code class="language-cpp">class fifo
{
  int write(char *ptr, int size);
  int read(char *ptr, int size);
};
</code></pre>
<p>deque kenne ich, aber da kann man leider nur Daten konstanter Größe durchjagen.<br />
Danke im Voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/195956/suche-fifo-klasse</link><generator>RSS for Node</generator><lastBuildDate>Wed, 30 Sep 2026 05:47:14 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/195956.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 23 Oct 2007 21:26:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Suche FIFO Klasse on Tue, 23 Oct 2007 21:26:58 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich suche eine FIFO-Klasse im Stile der UNIX Pipes. Also mit ungefär so einem Interface:</p>
<pre><code class="language-cpp">class fifo
{
  int write(char *ptr, int size);
  int read(char *ptr, int size);
};
</code></pre>
<p>deque kenne ich, aber da kann man leider nur Daten konstanter Größe durchjagen.<br />
Danke im Voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1390892</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1390892</guid><dc:creator><![CDATA[The Fan]]></dc:creator><pubDate>Tue, 23 Oct 2007 21:26:58 GMT</pubDate></item><item><title><![CDATA[Reply to Suche FIFO Klasse on Wed, 24 Oct 2007 06:27:52 GMT]]></title><description><![CDATA[<p>Auch wenn's neunmalklug erscheint:</p>
<pre><code>www.google.de &lt;&lt; +&quot;c++&quot; +&quot;fifo&quot; +&quot;STL&quot;
</code></pre>
<p>Erster Treffer. Dein Interface kannst du drum herum basteln.</p>
<p>Grüße...</p>
<p>Heiko</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1390947</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1390947</guid><dc:creator><![CDATA[bwbg]]></dc:creator><pubDate>Wed, 24 Oct 2007 06:27:52 GMT</pubDate></item><item><title><![CDATA[Reply to Suche FIFO Klasse on Wed, 24 Oct 2007 09:01:58 GMT]]></title><description><![CDATA[<p>Damit du es statt Copy/Paste wenigstens abschreiben musst, habe ich es mal als <a href="http://img145.imageshack.us/img145/7997/fiford7.png" rel="nofollow">Screenshot</a> hochgeladen.</p>
<p>Ein derart praktisches Syntax-Highlighting, das neben Keywords, verschiedene Typsorten (Klassen, typedefs, ...) und sogar Aufrufe von fremdem und eigenem Code unterscheiden kann, gibt es übrigens nur bei eclipse.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391033</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391033</guid><dc:creator><![CDATA[vorsager]]></dc:creator><pubDate>Wed, 24 Oct 2007 09:01:58 GMT</pubDate></item><item><title><![CDATA[Reply to Suche FIFO Klasse on Wed, 24 Oct 2007 09:10:08 GMT]]></title><description><![CDATA[<p>The Fan schrieb:</p>
<blockquote>
<p>Ich suche eine FIFO-Klasse im Stile der UNIX Pipes. Also mit ungefär so einem Interface:</p>
<pre><code class="language-cpp">class fifo
{
  int write(char *ptr, int size);
  int read(char *ptr, int size);
};
</code></pre>
</blockquote>
<p>Was ist die Bedeutung des Parameters size bei der Methode read? Ist es die Größe des Speichers, die Du beim Lesen zur Verfügung stellst oder ist es genau die Anzahl der Zeichen, die Du lesen möchtest?</p>
<p>Gruß<br />
Werner</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391040</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391040</guid><dc:creator><![CDATA[Werner Salomon]]></dc:creator><pubDate>Wed, 24 Oct 2007 09:10:08 GMT</pubDate></item><item><title><![CDATA[Reply to Suche FIFO Klasse on Wed, 24 Oct 2007 09:12:49 GMT]]></title><description><![CDATA[<p><a href="http://img149.imageshack.us/img149/3500/fifo2jf8.png" rel="nofollow">Hier</a> nochmal mit richtigem Zählen, wie viel gelesen/geschrieben wurde.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391043</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391043</guid><dc:creator><![CDATA[vorsager]]></dc:creator><pubDate>Wed, 24 Oct 2007 09:12:49 GMT</pubDate></item><item><title><![CDATA[Reply to Suche FIFO Klasse on Wed, 24 Oct 2007 19:09:06 GMT]]></title><description><![CDATA[<p>Tip: int -&gt; size_t.<br />
Und du solltest dir überlegen ob die &quot;read&quot; Funktion bei size &gt; 1 &quot;spiegeln&quot; soll oder nicht.<br />
also...<br />
write &quot;abc&quot;, 3<br />
read buffer, 3 -&gt; &quot;cba&quot; oder &quot;abc&quot;</p>
<p>EDIT: ich == doof <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> Eine FIFO spiegelt ja garnix, ist ja keine LIFO <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391156</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391156</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Wed, 24 Oct 2007 19:09:06 GMT</pubDate></item><item><title><![CDATA[Reply to Suche FIFO Klasse on Wed, 24 Oct 2007 14:28:07 GMT]]></title><description><![CDATA[<p>Werner Salomon schrieb:</p>
<blockquote>
<p>Was ist die Bedeutung des Parameters size bei der Methode read? Ist es die Größe des Speichers, die Du beim Lesen zur Verfügung stellst oder ist es genau die Anzahl der Zeichen, die Du lesen möchtest?</p>
</blockquote>
<p>Analog zur UNIX Pipe. Also ist es die Anzahl der Bytes, die ich lesen möchte. Wenn nicht genug Bytes in der FIFO sind, wird dann halt gewartet, bis wieder Daten vorhanden sind.</p>
<p>Die Idee, Bytes einzeln durch eine queue zu schicken hatte ich natürlich auch schon, aber das ist recht ineffizient bei ca. 200KB/s und außerdem ist die STL leider nicht thread safe.<br />
Ich hatte gehofft, jemand hat ein FIFO thread safe auf Basis eines einfachen Ringbuffers oder ähnlichem implementiert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391286</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391286</guid><dc:creator><![CDATA[The Fan]]></dc:creator><pubDate>Wed, 24 Oct 2007 14:28:07 GMT</pubDate></item><item><title><![CDATA[Reply to Suche FIFO Klasse on Wed, 24 Oct 2007 15:40:12 GMT]]></title><description><![CDATA[<p><a href="http://www.google.com/codesearch?hl=de&amp;lr=&amp;q=threadsafe+fifo+read+write+lang%3Ac%2B%2B" rel="nofollow">Hier</a> ist ein Beispiel, wie man mit codesearch danach suchen kann. Schau dir z. Bsp. mal den zweiten Eintrag an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1391338</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1391338</guid><dc:creator><![CDATA[vorsager]]></dc:creator><pubDate>Wed, 24 Oct 2007 15:40:12 GMT</pubDate></item></channel></rss>