Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > c200d180bc1063a7706e0da42a546b51 > files > 85

atlascpp-devel-0.6.1-7.fc12.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Atlas-C++: QueuedDecoder.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    </ul>
  </div>
<h1>QueuedDecoder.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// This file may be redistributed and modified only under the terms of</span>
<a name="l00002"></a>00002 <span class="comment">// the GNU Lesser General Public License (See COPYING for details).</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright (C) 2000 Stefanus Du Toit</span>
<a name="l00004"></a>00004 
<a name="l00005"></a>00005 <span class="preprocessor">#ifndef ATLAS_MESSAGE_QUEUEDDECODER_H</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define ATLAS_MESSAGE_QUEUEDDECODER_H</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;Atlas/Message/DecoderBase.h&gt;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;Atlas/Message/Element.h&gt;</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;queue&gt;</span>
<a name="l00012"></a>00012 
<a name="l00013"></a>00013 <span class="keyword">namespace </span>Atlas { <span class="keyword">namespace </span>Message {
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 <span class="keyword">class </span>Element;
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="keyword">typedef</span> std::map&lt;std::string, Element&gt; MapType;
<a name="l00018"></a>00018 
<a name="l00032"></a><a class="code" href="class_atlas_1_1_message_1_1_queued_decoder.html">00032</a> <span class="keyword">class </span><a class="code" href="class_atlas_1_1_message_1_1_queued_decoder.html" title="Decoder that presents a queue of Atlas::Message::Element.">QueuedDecoder</a> : <span class="keyword">public</span> <a class="code" href="class_atlas_1_1_message_1_1_decoder_base.html" title="Base class for decoders that take Atlas::Message::Object.">DecoderBase</a>
<a name="l00033"></a>00033 {
<a name="l00034"></a>00034 <span class="keyword">public</span>:
<a name="l00035"></a>00035 
<a name="l00036"></a>00036     <a class="code" href="class_atlas_1_1_message_1_1_queued_decoder.html" title="Decoder that presents a queue of Atlas::Message::Element.">QueuedDecoder</a>();
<a name="l00037"></a>00037 
<a name="l00039"></a><a class="code" href="class_atlas_1_1_message_1_1_queued_decoder.html#a186b748c8354f352f0a4f2e5e183730">00039</a>     <span class="keywordtype">size_t</span> <a class="code" href="class_atlas_1_1_message_1_1_queued_decoder.html#a186b748c8354f352f0a4f2e5e183730" title="Retrieve the current size of the message queue.">queueSize</a>() {
<a name="l00040"></a>00040         <span class="keywordflow">return</span> m_objectQueue.size();
<a name="l00041"></a>00041     }
<a name="l00043"></a><a class="code" href="class_atlas_1_1_message_1_1_queued_decoder.html#69a25e892d37ac2b1d54df5897fc73c5">00043</a>     <span class="keyword">const</span> MapType <a class="code" href="class_atlas_1_1_message_1_1_queued_decoder.html#69a25e892d37ac2b1d54df5897fc73c5" title="Pop an object from the front of the message queue.">popMessage</a>() {
<a name="l00044"></a>00044         MapType r = m_objectQueue.front();
<a name="l00045"></a>00045         m_objectQueue.pop();
<a name="l00046"></a>00046         <span class="keywordflow">return</span> r;
<a name="l00047"></a>00047     }
<a name="l00049"></a><a class="code" href="class_atlas_1_1_message_1_1_queued_decoder.html#4ea51b410b4c70cccbcc3485a4050889">00049</a>     <span class="keyword">const</span> MapType <a class="code" href="class_atlas_1_1_message_1_1_queued_decoder.html#4ea51b410b4c70cccbcc3485a4050889" title="Peek at the object at the front of the queue.">frontMessage</a>() {
<a name="l00050"></a>00050         <span class="keywordflow">return</span> m_objectQueue.front();
<a name="l00051"></a>00051     }
<a name="l00053"></a>00053     <span class="keywordtype">void</span> <a class="code" href="class_atlas_1_1_message_1_1_queued_decoder.html#b6f0f82ddb6aaa8cd3e18e709f8a8e48" title="Clear the message queue.">clearQueue</a>();
<a name="l00054"></a>00054     
<a name="l00055"></a>00055 <span class="keyword">protected</span>:
<a name="l00056"></a>00056 
<a name="l00058"></a>00058     <span class="keywordtype">void</span> <a class="code" href="class_atlas_1_1_message_1_1_queued_decoder.html#bac6b4693dfd60303a870fdf4aab2430" title="This adds a message to the queue.">messageArrived</a>(<span class="keyword">const</span> MapType&amp; obj);
<a name="l00059"></a>00059     
<a name="l00060"></a>00060 <span class="keyword">private</span>:
<a name="l00061"></a>00061     
<a name="l00062"></a>00062     std::queue&lt;MapType&gt; m_objectQueue;
<a name="l00063"></a>00063 };
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 } } <span class="comment">// namespace Atlas::Message</span>
<a name="l00066"></a>00066 
<a name="l00067"></a>00067 <span class="preprocessor">#endif</span>
</pre></div></div>
<HR>
<P>Copyright 2000-2004 the respective authors.</P>
<P>This document can be licensed under the terms of the GNU Free Documentation
License or the GNU General Public License and may be freely distributed under
the terms given by one of these licenses.</P>