Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 4bc66056a634db26a1f4d0845dc41ca6 > files > 1890

mrpt-doc-0.9.5-0.1.20110925svn2670.fc16.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>CRawlog.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> &gt; <b>C++ reference</b> </div>
<div align="right">
<a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a>
</div>
<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
          <div class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </div><div class="right"></div>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">CRawlog.h</div>  </div>
</div>
<div class="contents">
<a href="_c_rawlog_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* +---------------------------------------------------------------------------+</span>
<a name="l00002"></a>00002 <span class="comment">   |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |</span>
<a name="l00003"></a>00003 <span class="comment">   |                                                                           |</span>
<a name="l00004"></a>00004 <span class="comment">   |                       http://www.mrpt.org/                                |</span>
<a name="l00005"></a>00005 <span class="comment">   |                                                                           |</span>
<a name="l00006"></a>00006 <span class="comment">   |   Copyright (C) 2005-2011  University of Malaga                           |</span>
<a name="l00007"></a>00007 <span class="comment">   |                                                                           |</span>
<a name="l00008"></a>00008 <span class="comment">   |    This software was written by the Machine Perception and Intelligent    |</span>
<a name="l00009"></a>00009 <span class="comment">   |      Robotics Lab, University of Malaga (Spain).                          |</span>
<a name="l00010"></a>00010 <span class="comment">   |    Contact: Jose-Luis Blanco  &lt;jlblanco@ctima.uma.es&gt;                     |</span>
<a name="l00011"></a>00011 <span class="comment">   |                                                                           |</span>
<a name="l00012"></a>00012 <span class="comment">   |  This file is part of the MRPT project.                                   |</span>
<a name="l00013"></a>00013 <span class="comment">   |                                                                           |</span>
<a name="l00014"></a>00014 <span class="comment">   |     MRPT is free software: you can redistribute it and/or modify          |</span>
<a name="l00015"></a>00015 <span class="comment">   |     it under the terms of the GNU General Public License as published by  |</span>
<a name="l00016"></a>00016 <span class="comment">   |     the Free Software Foundation, either version 3 of the License, or     |</span>
<a name="l00017"></a>00017 <span class="comment">   |     (at your option) any later version.                                   |</span>
<a name="l00018"></a>00018 <span class="comment">   |                                                                           |</span>
<a name="l00019"></a>00019 <span class="comment">   |   MRPT is distributed in the hope that it will be useful,                 |</span>
<a name="l00020"></a>00020 <span class="comment">   |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |</span>
<a name="l00021"></a>00021 <span class="comment">   |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |</span>
<a name="l00022"></a>00022 <span class="comment">   |     GNU General Public License for more details.                          |</span>
<a name="l00023"></a>00023 <span class="comment">   |                                                                           |</span>
<a name="l00024"></a>00024 <span class="comment">   |     You should have received a copy of the GNU General Public License     |</span>
<a name="l00025"></a>00025 <span class="comment">   |     along with MRPT.  If not, see &lt;http://www.gnu.org/licenses/&gt;.         |</span>
<a name="l00026"></a>00026 <span class="comment">   |                                                                           |</span>
<a name="l00027"></a>00027 <span class="comment">   +---------------------------------------------------------------------------+ */</span>
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef CRawlog_H</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define CRawlog_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;<a class="code" href="_c_pose2_d_8h.html">mrpt/poses/CPose2D.h</a>&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="code" href="_c_sensory_frame_8h.html">mrpt/slam/CSensoryFrame.h</a>&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="code" href="_c_action_collection_8h.html">mrpt/slam/CActionCollection.h</a>&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;<a class="code" href="_c_observation_comment_8h.html">mrpt/slam/CObservationComment.h</a>&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;<a class="code" href="_c_config_file_memory_8h.html">mrpt/utils/CConfigFileMemory.h</a>&gt;</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="keyword">namespace </span>mrpt
<a name="l00039"></a>00039 {
<a name="l00040"></a>00040         <span class="keyword">namespace </span>slam
<a name="l00041"></a>00041         {
<a name="l00042"></a><a class="code" href="structmrpt_1_1slam_1_1_c_rawlog_ptr.html#ac7d4128e47284e960ca20acbbb9636d7">00042</a>                 <a class="code" href="_c_serializable_8h.html#a9ef523d787f6cb837a0585b790882588" title="This declaration must be inserted in all CSerializable classes definition, before the class declarati...">DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE</a>( <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html" title="This class stores a rawlog (robotic datasets) in one of two possible formats:">CRawlog</a>, <a class="code" href="classmrpt_1_1utils_1_1_c_serializable.html" title="The virtual base class which provides a unified interface for all persistent objects in MRPT...">mrpt::utils::CSerializable</a>, <a class="code" href="obs_2include_2mrpt_2obs_2link__pragmas_8h.html#ae8bb1b2647c58d6ae2eb30ca31fcf5a1">OBS_IMPEXP</a> )
<a name="l00043"></a>00043 
<a name="l00044"></a>00044                 using namespace mrpt::utils;
<a name="l00045"></a>00045 
<a name="l00046"></a><a class="code" href="namespacemrpt_1_1slam.html#a85570fb9b901d02399bf21dc48706cdd">00046</a>                 typedef std::pair&lt;mrpt::system::<a class="code" href="group__time__date.html#ga42674286d8d56afea013b6329bb7327a" title="A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...">TTimeStamp</a>, <a class="code" href="structmrpt_1_1slam_1_1_c_observation_ptr.html">CObservationPtr</a>&gt;            <a class="code" href="namespacemrpt_1_1slam.html#a85570fb9b901d02399bf21dc48706cdd" title="For usage with CRawlog classes.">TTimeObservationPair</a>;           <span class="comment">//!&lt; For usage with CRawlog classes.</span>
<a name="l00047"></a><a class="code" href="namespacemrpt_1_1slam.html#a361f9c7627d8e3c9f4efebb36db4472d">00047</a> <span class="comment"></span>                typedef std::<a class="code" href="classstd_1_1multimap.html" title="STL class.">multimap</a>&lt;mrpt::system::TTimeStamp, <a class="code" href="structmrpt_1_1slam_1_1_c_observation_ptr.html">CObservationPtr</a>&gt;        <a class="code" href="classstd_1_1multimap.html" title="STL class.">TListTimeAndObservations</a>;       <span class="comment">//!&lt; For usage with CRawlog classes.</span>
<a name="l00048"></a>00048 <span class="comment"></span>
<a name="l00049"></a>00049 <span class="comment"></span>
<a name="l00050"></a>00050 <span class="comment">                /** This class stores a rawlog (robotic datasets) in one of two possible formats:</span>
<a name="l00051"></a>00051 <span class="comment">                 *              - Format #1: A sequence of actions and observations. There is a sequence of objects, where each one can be of one type:</span>
<a name="l00052"></a>00052 <span class="comment">                 *                      - An action:    Implemented as a CActionCollection object, the actuation of the robot (i.e. odometry increment).</span>
<a name="l00053"></a>00053 <span class="comment">                 *                      - Observations: Implemented as a CSensoryFrame, refering to a set of robot observations from the same pose.</span>
<a name="l00054"></a>00054 <span class="comment">                 *              - Format #2: A sequence of actions and observations. There is a sequence of objects, where each one can be of one type:</span>
<a name="l00055"></a>00055 <span class="comment">                 *</span>
<a name="l00056"></a>00056 <span class="comment">                 *      Refer to the wiki page about &lt;a href=&quot;http://www.mrpt.org/Rawlog_Format&quot; &gt;rawlog files&lt;/a&gt;.</span>
<a name="l00057"></a>00057 <span class="comment">                 *</span>
<a name="l00058"></a>00058 <span class="comment">                 *  See also the application &lt;a href=&quot;http://www.mrpt.org/Application:RawLogViewer&quot; &gt;RawLogViewer&lt;/a &gt; for the GUI program that visualizes and manages rawlogs.</span>
<a name="l00059"></a>00059 <span class="comment">                 *</span>
<a name="l00060"></a>00060 <span class="comment">                 *  This class also publishes a static helper method for loading rawlog files in format #1: see CRawlog::readActionObservationPair</span>
<a name="l00061"></a>00061 <span class="comment">                 *</span>
<a name="l00062"></a>00062 <span class="comment">                 *  There is a field for comments and blocks of parameters (in ini-like format) accessible through getCommentText and setCommentText</span>
<a name="l00063"></a>00063 <span class="comment">                 *   (introduced in MRPT 0.6.4). When serialized to a rawlog file, the commens are saved as an additional observation of the</span>
<a name="l00064"></a>00064 <span class="comment">                 *   type CObservationComments at the beginning of the file, but this observation does not appear after loading for clarity.</span>
<a name="l00065"></a>00065 <span class="comment">                 *</span>
<a name="l00066"></a>00066 <span class="comment">                 * \note Since MRPT version 0.5.5, this class also provides a STL container-like interface (see CRawlog::begin, CRawlog::iterator, ...).</span>
<a name="l00067"></a>00067 <span class="comment">                 * \note The format #2 is supported since MRPT version 0.6.0.</span>
<a name="l00068"></a>00068 <span class="comment">                 * \note There is a static helper method &quot;detectImagesDirectory&quot; for localizing the external images directory of a rawlog.</span>
<a name="l00069"></a>00069 <span class="comment">                 *</span>
<a name="l00070"></a>00070 <span class="comment">                 * \sa CSensoryFrame, CPose2D, &lt;a href=&quot;http://www.mrpt.org/Rawlog_Format&quot;&gt; RawLog file format&lt;/a&gt;.</span>
<a name="l00071"></a>00071 <span class="comment">                 * \ingroup mrpt_obs_grp</span>
<a name="l00072"></a>00072 <span class="comment">                 */</span>
<a name="l00073"></a>00073                 class <a class="code" href="obs_2include_2mrpt_2obs_2link__pragmas_8h.html#ae8bb1b2647c58d6ae2eb30ca31fcf5a1">OBS_IMPEXP</a> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html" title="This class stores a rawlog (robotic datasets) in one of two possible formats:">CRawlog</a> : public mrpt::utils::<a class="code" href="classmrpt_1_1utils_1_1_c_serializable.html" title="The virtual base class which provides a unified interface for all persistent objects in MRPT...">CSerializable</a>
<a name="l00074"></a>00074                 {
<a name="l00075"></a>00075                         <span class="comment">// This must be added to any CSerializable derived class:</span>
<a name="l00076"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#a1377136c345d5dc4aedc621ffb764d48">00076</a>                         <a class="code" href="_c_serializable_8h.html#a72ab55bf7ae009c89b75715cfa21e84d" title="This declaration must be inserted in all CSerializable classes definition, within the class declarati...">DEFINE_SERIALIZABLE</a>( <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html" title="This class stores a rawlog (robotic datasets) in one of two possible formats:">CRawlog</a> )
<a name="l00077"></a>00077 
<a name="l00078"></a>00078                 private:
<a name="l00079"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#af4c587aa789523c3dbe5bdee8809669f">00079</a>                         typedef std::<a class="code" href="classstd_1_1vector.html" title="STL class.">vector</a>&lt;<a class="code" href="structmrpt_1_1utils_1_1_c_serializable_ptr.html">CSerializablePtr</a>&gt; <a class="code" href="classstd_1_1vector.html">TListObjects</a>;
<a name="l00080"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#a49ecb2e973fc2cfd3fadc9b97656b5cb">00080</a>                         TListObjects    m_seqOfActObs;  <span class="comment">//!&lt; The list where the objects really are in.</span>
<a name="l00081"></a>00081 <span class="comment"></span>
<a name="l00082"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#a6a72693a9d151b6a9d0df33ea0cebdb9">00082</a>                         <a class="code" href="classmrpt_1_1slam_1_1_c_observation_comment.html" title="This &quot;observation&quot; is actually a placeholder for a text block with comments or additional parameters ...">CObservationComment</a>             m_commentTexts; <span class="comment">//!&lt; Comments of the rawlog.</span>
<a name="l00083"></a>00083 <span class="comment"></span>
<a name="l00084"></a>00084                 public:
<a name="l00085"></a>00085                         <span class="keywordtype">void</span> getCommentText( std::<span class="keywordtype">string</span> &amp;<a class="code" href="eigen__plugins_8h.html#a7b88b312dc3827120dbfc60da344625d" title="Transpose.">t</a>) const;     <span class="comment">//!&lt; Returns the block of comment text for the rawlog</span>
<a name="l00086"></a>00086 <span class="comment"></span>                        std::<span class="keywordtype">string</span> getCommentText() const;                     <span class="comment">//!&lt; Returns the block of comment text for the rawlog</span>
<a name="l00087"></a>00087 <span class="comment"></span>                        <span class="keywordtype">void</span> setCommentText( const std::<span class="keywordtype">string</span> &amp;<a class="code" href="eigen__plugins_8h.html#a7b88b312dc3827120dbfc60da344625d" title="Transpose.">t</a>);     <span class="comment">//!&lt; Changes the block of comment text for the rawlog</span>
<a name="l00088"></a>00088 <span class="comment"></span>                        <span class="keywordtype">void</span> getCommentTextAsConfigFile( mrpt::utils::<a class="code" href="classmrpt_1_1utils_1_1_c_config_file_memory.html" title="This class implements a config file-like interface over a memory-stored string list.">CConfigFileMemory</a> &amp;memCfg ) const; <span class="comment">//!&lt; Saves the block of comment text for the rawlog into the passed config file object.</span>
<a name="l00089"></a>00089 <span class="comment"></span><span class="comment"></span>
<a name="l00090"></a>00090 <span class="comment">                        /** The type of each entry in a rawlog.</span>
<a name="l00091"></a>00091 <span class="comment">                          * \sa CRawlog::getType</span>
<a name="l00092"></a>00092 <span class="comment">                          */</span>
<a name="l00093"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ac961b0980350df207abe8b9703969349">00093</a>                         enum <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ac961b0980350df207abe8b9703969349" title="The type of each entry in a rawlog.">TEntryType</a>
<a name="l00094"></a>00094                         {
<a name="l00095"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ac961b0980350df207abe8b9703969349a103dfb3deefcac98da0d758c43107337">00095</a>                                 etSensoryFrame = 0,
<a name="l00096"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ac961b0980350df207abe8b9703969349a15d3d4291db51c16953f0aea4358d773">00096</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ac961b0980350df207abe8b9703969349a15d3d4291db51c16953f0aea4358d773">etActionCollection</a>,
<a name="l00097"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ac961b0980350df207abe8b9703969349abb6917c3d10cbe19676d848926b269e4">00097</a>                                 etObservation
<a name="l00098"></a>00098                         };
<a name="l00099"></a>00099 <span class="comment"></span>
<a name="l00100"></a>00100 <span class="comment">                        /** Default constructor */</span>
<a name="l00101"></a>00101                         <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html" title="This class stores a rawlog (robotic datasets) in one of two possible formats:">CRawlog</a>();
<a name="l00102"></a>00102 
<a name="l00103"></a>00103 <span class="comment"></span>
<a name="l00104"></a>00104 <span class="comment">                        /** Destructor: */</span>
<a name="l00105"></a>00105                         <span class="keyword">virtual</span> ~<a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html" title="This class stores a rawlog (robotic datasets) in one of two possible formats:">CRawlog</a>();
<a name="l00106"></a>00106 <span class="comment"></span>
<a name="l00107"></a>00107 <span class="comment">                        /** Clear the sequence of actions/observations, freeing the memory of all the objects in the list. */</span>
<a name="l00108"></a>00108                         <span class="keywordtype">void</span>  clear();
<a name="l00109"></a>00109 <span class="comment"></span>
<a name="l00110"></a>00110 <span class="comment">                        /** Clear the sequence of actions/observations, without deleting the objects themselves (USE ONLY IF YOU KNOW WHAT YOU DO, NORMALLY YOU&#39;LL CALL &quot;clear&quot; INSTEAD). */</span>
<a name="l00111"></a>00111                         <span class="keywordtype">void</span>  clearWithoutDelete();
<a name="l00112"></a>00112 <span class="comment"></span>
<a name="l00113"></a>00113 <span class="comment">                        /** Add an action to the sequence: a collection of just one element is created.</span>
<a name="l00114"></a>00114 <span class="comment">                          *   The object is duplicated, so the original one can be free if desired.</span>
<a name="l00115"></a>00115 <span class="comment">                          */</span>
<a name="l00116"></a>00116                         <span class="keywordtype">void</span>  addAction( <a class="code" href="classmrpt_1_1slam_1_1_c_action.html" title="Declares a class for storing a robot action.">CAction</a> &amp;action );
<a name="l00117"></a>00117 <span class="comment"></span>
<a name="l00118"></a>00118 <span class="comment">                        /** Add a set of actions to the sequence; the object is duplicated, so the original one can be free if desired.</span>
<a name="l00119"></a>00119 <span class="comment">                          * \sa addObservations, addActionsMemoryReference</span>
<a name="l00120"></a>00120 <span class="comment">                          */</span>
<a name="l00121"></a>00121                         <span class="keywordtype">void</span>  addActions( <a class="code" href="classmrpt_1_1slam_1_1_c_action_collection.html" title="Declares a class for storing a collection of robot actions.">CActionCollection</a> &amp;action );
<a name="l00122"></a>00122 <span class="comment"></span>
<a name="l00123"></a>00123 <span class="comment">                        /** Add a set of observations to the sequence; the object is duplicated, so the original one can be free if desired.</span>
<a name="l00124"></a>00124 <span class="comment">                          * \sa addActions, addObservationsMemoryReference</span>
<a name="l00125"></a>00125 <span class="comment">                          */</span>
<a name="l00126"></a>00126                         <span class="keywordtype">void</span>  addObservations( <a class="code" href="classmrpt_1_1slam_1_1_c_sensory_frame.html" title="Declares a class for storing a &quot;sensory frame&quot;, a set of &quot;observations&quot; taken by the robot approximat...">CSensoryFrame</a> &amp;observations );
<a name="l00127"></a>00127 <span class="comment"></span>
<a name="l00128"></a>00128 <span class="comment">                        /** Add a set of actions to the sequence, using a smart pointer to the object to add.</span>
<a name="l00129"></a>00129 <span class="comment">                          * \sa addActions, addObservationsMemoryReference, addObservationMemoryReference</span>
<a name="l00130"></a>00130 <span class="comment">                          */</span>
<a name="l00131"></a>00131                         <span class="keywordtype">void</span>  addActionsMemoryReference( <span class="keyword">const</span> <a class="code" href="structmrpt_1_1slam_1_1_c_action_collection_ptr.html">CActionCollectionPtr</a> &amp;action );
<a name="l00132"></a>00132 <span class="comment"></span>
<a name="l00133"></a>00133 <span class="comment">                        /** Add a set of observations to the sequence, using a smart pointer to the object to add.</span>
<a name="l00134"></a>00134 <span class="comment">                          * \sa addObservations, addActionsMemoryReference, addObservationMemoryReference</span>
<a name="l00135"></a>00135 <span class="comment">                          */</span>
<a name="l00136"></a>00136                         <span class="keywordtype">void</span>  addObservationsMemoryReference( <span class="keyword">const</span> <a class="code" href="structmrpt_1_1slam_1_1_c_sensory_frame_ptr.html">CSensoryFramePtr</a> &amp;observations );
<a name="l00137"></a>00137 <span class="comment"></span>
<a name="l00138"></a>00138 <span class="comment">                        /** Add a single observation to the sequence, using a smart pointer to the object to add.</span>
<a name="l00139"></a>00139 <span class="comment">                          * \sa addObservations, addActionsMemoryReference</span>
<a name="l00140"></a>00140 <span class="comment">                          */</span>
<a name="l00141"></a>00141                         <span class="keywordtype">void</span>  addObservationMemoryReference( <span class="keyword">const</span> <a class="code" href="structmrpt_1_1slam_1_1_c_observation_ptr.html">CObservationPtr</a> &amp;observation );
<a name="l00142"></a>00142 <span class="comment"></span>
<a name="l00143"></a>00143 <span class="comment">                        /** Load the contents from a file containing one of these possibilities:</span>
<a name="l00144"></a>00144 <span class="comment">                          *             - A &quot;CRawlog&quot; object.</span>
<a name="l00145"></a>00145 <span class="comment">                          *             - Directly the sequence of objects (pairs CSensoryFrame/CActionCollection or CObservation* objects). In this case the method stops reading on EOF of an unrecogniced class name.</span>
<a name="l00146"></a>00146 <span class="comment">                          * \returns It returns false if the file does not exists.</span>
<a name="l00147"></a>00147 <span class="comment">                          */</span>
<a name="l00148"></a>00148                         <span class="keywordtype">bool</span>  loadFromRawLogFile( <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;fileName );
<a name="l00149"></a>00149 <span class="comment"></span>
<a name="l00150"></a>00150 <span class="comment">                        /** Saves the contents to a rawlog-file, compatible with RawlogViewer (As the sequence of internal objects).</span>
<a name="l00151"></a>00151 <span class="comment">                          *  The file is saved with gz-commpressed if MRPT has gz-streams.</span>
<a name="l00152"></a>00152 <span class="comment">                          * \returns It returns false if any error is found while writing/creating the target file.</span>
<a name="l00153"></a>00153 <span class="comment">                          */</span>
<a name="l00154"></a>00154                         <span class="keywordtype">bool</span> saveToRawLogFile( <span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;fileName ) <span class="keyword">const</span>;
<a name="l00155"></a>00155 <span class="comment"></span>
<a name="l00156"></a>00156 <span class="comment">                        /** Returns the number of actions / observations object in the sequence. */</span>
<a name="l00157"></a>00157                         <span class="keywordtype">size_t</span>  <a class="code" href="namespacemrpt_1_1math.html#a632ae0aecf78103f87f18f9ac33f7170">size</a>() <span class="keyword">const</span>;
<a name="l00158"></a>00158 <span class="comment"></span>
<a name="l00159"></a>00159 <span class="comment">                        /** Returns the type of a given element.</span>
<a name="l00160"></a>00160 <span class="comment">                          * \sa isAction, isObservation</span>
<a name="l00161"></a>00161 <span class="comment">                          */</span>
<a name="l00162"></a>00162                         TEntryType getType( <span class="keywordtype">size_t</span> index ) <span class="keyword">const</span>;
<a name="l00163"></a>00163 <span class="comment"></span>
<a name="l00164"></a>00164 <span class="comment">                        /** Delete the action or observation stored in the given index.</span>
<a name="l00165"></a>00165 <span class="comment">                          * \exception std::exception If index is out of bounds</span>
<a name="l00166"></a>00166 <span class="comment">                          */</span>
<a name="l00167"></a>00167                         <span class="keywordtype">void</span>  <span class="keyword">remove</span>( <span class="keywordtype">size_t</span> index );
<a name="l00168"></a>00168 <span class="comment"></span>
<a name="l00169"></a>00169 <span class="comment">                        /** Delete the elements stored in the given range of indices (including both the first and last one).</span>
<a name="l00170"></a>00170 <span class="comment">                          * \exception std::exception If any index is out of bounds</span>
<a name="l00171"></a>00171 <span class="comment">                          */</span>
<a name="l00172"></a>00172                         <span class="keywordtype">void</span>  <span class="keyword">remove</span>( <span class="keywordtype">size_t</span> first_index, <span class="keywordtype">size_t</span> last_index );
<a name="l00173"></a>00173 <span class="comment"></span>
<a name="l00174"></a>00174 <span class="comment">                        /** Returns the i&#39;th element in the sequence, as being actions, where index=0 is the first object.</span>
<a name="l00175"></a>00175 <span class="comment">                          *  If it is not a CActionCollection, it throws an exception. Do neighter modify nor delete the returned pointer.</span>
<a name="l00176"></a>00176 <span class="comment">                          * \sa size, isAction, getAsObservations, getAsObservation</span>
<a name="l00177"></a>00177 <span class="comment">                          * \exception std::exception If index is out of bounds</span>
<a name="l00178"></a>00178 <span class="comment">                          */</span>
<a name="l00179"></a>00179                         <a class="code" href="structmrpt_1_1slam_1_1_c_action_collection_ptr.html">CActionCollectionPtr</a>  getAsAction( <span class="keywordtype">size_t</span> index ) <span class="keyword">const</span>;
<a name="l00180"></a>00180 <span class="comment"></span>
<a name="l00181"></a>00181 <span class="comment">                        /** Returns the i&#39;th element in the sequence, as being an action, where index=0 is the first object.</span>
<a name="l00182"></a>00182 <span class="comment">                          *  If it is not an CSensoryFrame, it throws an exception. Do neighter modify nor delete the returned pointer.</span>
<a name="l00183"></a>00183 <span class="comment">                          * \sa size, isAction, getAsAction, getAsObservation</span>
<a name="l00184"></a>00184 <span class="comment">                          * \exception std::exception If index is out of bounds</span>
<a name="l00185"></a>00185 <span class="comment">                          */</span>
<a name="l00186"></a>00186                         <a class="code" href="structmrpt_1_1slam_1_1_c_sensory_frame_ptr.html">CSensoryFramePtr</a>  getAsObservations( <span class="keywordtype">size_t</span> index ) <span class="keyword">const</span>;
<a name="l00187"></a>00187 <span class="comment"></span>
<a name="l00188"></a>00188 <span class="comment">                        /** Returns the i&#39;th element in the sequence, being its class whatever.</span>
<a name="l00189"></a>00189 <span class="comment">                          * \sa size, isAction, getAsAction, getAsObservations</span>
<a name="l00190"></a>00190 <span class="comment">                          * \exception std::exception If index is out of bounds</span>
<a name="l00191"></a>00191 <span class="comment">                          */</span>
<a name="l00192"></a>00192                         <a class="code" href="structmrpt_1_1utils_1_1_c_serializable_ptr.html">CSerializablePtr</a>    getAsGeneric( <span class="keywordtype">size_t</span> index ) <span class="keyword">const</span>;
<a name="l00193"></a>00193 <span class="comment"></span>
<a name="l00194"></a>00194 <span class="comment">                        /** Returns the i&#39;th element in the sequence, as being an observation, where index=0 is the first object.</span>
<a name="l00195"></a>00195 <span class="comment">                          *  If it is not an CObservation, it throws an exception. Do neighter modify nor delete the returned pointer.</span>
<a name="l00196"></a>00196 <span class="comment">                          *  This is the proper method to obtain the objects stored in a &quot;only observations&quot;-rawlog file (named &quot;format #2&quot; above.</span>
<a name="l00197"></a>00197 <span class="comment">                          * \sa size, isAction, getAsAction</span>
<a name="l00198"></a>00198 <span class="comment">                          * \exception std::exception If index is out of bounds</span>
<a name="l00199"></a>00199 <span class="comment">                          */</span>
<a name="l00200"></a>00200                         <a class="code" href="structmrpt_1_1slam_1_1_c_observation_ptr.html">CObservationPtr</a>  getAsObservation( <span class="keywordtype">size_t</span> index ) <span class="keyword">const</span>;
<a name="l00201"></a>00201 
<a name="l00202"></a>00202 <span class="comment"></span>
<a name="l00203"></a>00203 <span class="comment">                        /** A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequence. */</span>
<a name="l00204"></a>00204                         <span class="keyword">class </span><a class="code" href="eigen__plugins_8h.html#a39c5d6430ea9395ae7ae729dd0c3f18c">iterator</a>
<a name="l00205"></a>00205                         {
<a name="l00206"></a>00206                         <span class="keyword">protected</span>:
<a name="l00207"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a10e896bc31ac826f3c015510bb0aea2f">00207</a>                                 <a class="code" href="classstd_1_1vector.html">TListObjects</a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">::iterator</a>  <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a10e896bc31ac826f3c015510bb0aea2f">m_it</a>;
<a name="l00208"></a>00208 
<a name="l00209"></a>00209                         <span class="keyword">public</span>:
<a name="l00210"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#ade4db84459634da0829de59c3e3b27dd">00210</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#ade4db84459634da0829de59c3e3b27dd">iterator</a>() : m_it() {  }
<a name="l00211"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#aa6e035dcda2099eeb98a3ee3d4200cd2">00211</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#aa6e035dcda2099eeb98a3ee3d4200cd2">iterator</a>(<span class="keyword">const</span> <a class="code" href="eigen__plugins_8h.html#a39c5d6430ea9395ae7ae729dd0c3f18c">TListObjects::iterator</a>&amp; it) : m_it(it)  {  }
<a name="l00212"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a4f06ffa156e151104dfa8e75915c23bc">00212</a>                                 <span class="keyword">virtual</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a4f06ffa156e151104dfa8e75915c23bc">~iterator</a>() { }
<a name="l00213"></a>00213 
<a name="l00214"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a40d2cab6b47c679c8aac418660bf6d4a">00214</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a> &amp; operator = (<span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a>&amp; o) {  m_it = o.m_it; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
<a name="l00215"></a>00215 
<a name="l00216"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a7518cde8129a9b81558b3011a7a315f4">00216</a>                                 <span class="keywordtype">bool</span> <a class="code" href="namespacemrpt_1_1math.html#ad4a5f953c6f98c279c7d3ff13bbb223a">operator == </a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a>&amp; o) {  <span class="keywordflow">return</span> m_it == o.m_it; }
<a name="l00217"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a306f6b1394a84fede1fac8dc88edf2a2">00217</a>                                 <span class="keywordtype">bool</span> <a class="code" href="namespacemrpt_1_1math.html#a9530d437eede574017f58f04ad36bcf9">operator != </a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a>&amp; o) {  <span class="keywordflow">return</span> m_it != o.m_it; }
<a name="l00218"></a>00218 
<a name="l00219"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a4142eab9bee856cbb63509806d5d2016">00219</a>                                 <a class="code" href="structmrpt_1_1utils_1_1_c_serializable_ptr.html">CSerializablePtr</a> <a class="code" href="group__container__ops__grp.html#ga6f2d8625a637a5a65585065331b5b0c5" title="a*b (element-wise multiplication)">operator *</a>() { <span class="keywordflow">return</span> *m_it; }
<a name="l00220"></a>00220 
<a name="l00221"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a2a70cb8820a9fe0e7c5a9fcc1b3b3309">00221</a>                                 <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a>  operator ++(<span class="keywordtype">int</span>) { <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a> aux =*<span class="keyword">this</span>; m_it++; <span class="keywordflow">return</span> aux; }  <span class="comment">// Post</span>
<a name="l00222"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#aef5b9b9b1ed3cc34d4279932e991a608">00222</a>                                 <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a>&amp; operator ++()    { m_it++; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }  <span class="comment">// Pre</span>
<a name="l00223"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#ab9eff1a57258713596db9a6f30a0645f">00223</a>                                 <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a>  operator --(<span class="keywordtype">int</span>) { <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a> aux = *<span class="keyword">this</span>; m_it--; <span class="keywordflow">return</span> aux; }  <span class="comment">// Post</span>
<a name="l00224"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a2395425a9eb11c0c42384fa49c6942eb">00224</a>                                 <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a>&amp; operator --()    { m_it--; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }  <span class="comment">// Pre</span>
<a name="l00225"></a>00225 
<a name="l00226"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a0dd3c14bbe4437afc56893963c6812a5">00226</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ac961b0980350df207abe8b9703969349" title="The type of each entry in a rawlog.">TEntryType</a> getType()<span class="keyword"> const</span>
<a name="l00227"></a>00227 <span class="keyword">                                </span>{
<a name="l00228"></a>00228                                         <span class="keywordflow">if</span> ( (*m_it)-&gt;GetRuntimeClass()-&gt;derivedFrom( <a class="code" href="_c_object_8h.html#ae1e916f2fdc79ed0da6508acdb1848a0" title="Access to runtime class ID for a defined class name.">CLASS_ID</a>(<a class="code" href="classmrpt_1_1slam_1_1_c_observation.html" title="Declares a class that represents any robot&#39;s observation.">CObservation</a>) ) )
<a name="l00229"></a>00229                                                 <span class="keywordflow">return</span> etObservation;
<a name="l00230"></a>00230                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( (*m_it)-&gt;GetRuntimeClass()-&gt;derivedFrom( <a class="code" href="_c_object_8h.html#ae1e916f2fdc79ed0da6508acdb1848a0" title="Access to runtime class ID for a defined class name.">CLASS_ID</a>(<a class="code" href="classmrpt_1_1slam_1_1_c_sensory_frame.html" title="Declares a class for storing a &quot;sensory frame&quot;, a set of &quot;observations&quot; taken by the robot approximat...">CSensoryFrame</a>) ) )
<a name="l00231"></a>00231                                                 <span class="keywordflow">return</span> etSensoryFrame;
<a name="l00232"></a>00232                                         <span class="keywordflow">else</span>
<a name="l00233"></a>00233                                                 <span class="keywordflow">return</span> etActionCollection;
<a name="l00234"></a>00234                                 }
<a name="l00235"></a>00235 
<a name="l00236"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a1d3d3e1d08bcf9ca067215fecd5efb99">00236</a>                                 <span class="keyword">static</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html#a1d3d3e1d08bcf9ca067215fecd5efb99">erase</a>( <a class="code" href="classstd_1_1vector.html">TListObjects</a>&amp; lst, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a> &amp;it) { <span class="keywordflow">return</span> lst.erase(it.m_it); }
<a name="l00237"></a>00237                         };
<a name="l00238"></a>00238 <span class="comment"></span>
<a name="l00239"></a>00239 <span class="comment">                        /** A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequence. */</span>
<a name="l00240"></a>00240                         <span class="keyword">class </span><a class="code" href="eigen__plugins_8h.html#a8dbda719917732693c56cee228465ed9">const_iterator</a>
<a name="l00241"></a>00241                         {
<a name="l00242"></a>00242                         <span class="keyword">protected</span>:
<a name="l00243"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#acb2dedd48a665ca12194215586e839ac">00243</a>                                 <a class="code" href="classstd_1_1vector.html">TListObjects</a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">::const_iterator</a>    <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#acb2dedd48a665ca12194215586e839ac">m_it</a>;
<a name="l00244"></a>00244 
<a name="l00245"></a>00245                         <span class="keyword">public</span>:
<a name="l00246"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#a8e58559141f31dc28f1719a0b152e083">00246</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#a8e58559141f31dc28f1719a0b152e083">const_iterator</a>() : m_it() {  }
<a name="l00247"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#a38dd2248a6623ac0b868d919d588ba2d">00247</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#a38dd2248a6623ac0b868d919d588ba2d">const_iterator</a>(<span class="keyword">const</span> <a class="code" href="eigen__plugins_8h.html#a8dbda719917732693c56cee228465ed9">TListObjects::const_iterator</a>&amp; it) : m_it(it)  {  }
<a name="l00248"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#aecbff177cf7ca3ea31aa72ad572a84af">00248</a>                                 <span class="keyword">virtual</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#aecbff177cf7ca3ea31aa72ad572a84af">~const_iterator</a>() { }
<a name="l00249"></a>00249 
<a name="l00250"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#a101ea4c6a4b12a5152ee486fec69a8a4">00250</a>                                 <span class="keywordtype">bool</span> <a class="code" href="namespacemrpt_1_1math.html#ad4a5f953c6f98c279c7d3ff13bbb223a">operator == </a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">const_iterator</a>&amp; o) {  <span class="keywordflow">return</span> m_it == o.m_it; }
<a name="l00251"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#a5db06ceef753a7f238f8d13ebfcb10f9">00251</a>                                 <span class="keywordtype">bool</span> <a class="code" href="namespacemrpt_1_1math.html#a9530d437eede574017f58f04ad36bcf9">operator != </a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">const_iterator</a>&amp; o) {  <span class="keywordflow">return</span> m_it != o.m_it; }
<a name="l00252"></a>00252 
<a name="l00253"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#afeaadee69ff03de51766ff38f3ef6ab4">00253</a>                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1utils_1_1_c_serializable_ptr.html">CSerializablePtr</a> <a class="code" href="group__container__ops__grp.html#ga6f2d8625a637a5a65585065331b5b0c5" title="a*b (element-wise multiplication)">operator *</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *m_it; }
<a name="l00254"></a>00254 
<a name="l00255"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#a0442fb6f1aa870aa474bfccb480ee7c0">00255</a>                                 <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">const_iterator</a>  operator ++(<span class="keywordtype">int</span>) { <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">const_iterator</a> aux =*<span class="keyword">this</span>; m_it++; <span class="keywordflow">return</span> aux; }  <span class="comment">// Post</span>
<a name="l00256"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#a5185abc9e448b259e2abe555ecba9886">00256</a>                                 <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">const_iterator</a>&amp; operator ++()    { m_it++; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }  <span class="comment">// Pre</span>
<a name="l00257"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#adf154071518a36f40dd28db318ea9ca8">00257</a>                                 <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">const_iterator</a>  operator --(<span class="keywordtype">int</span>) { <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">const_iterator</a> aux = *<span class="keyword">this</span>; m_it--; <span class="keywordflow">return</span> aux; }  <span class="comment">// Post</span>
<a name="l00258"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#a63c0d55d1daa655ee8b9be3dfaf87088">00258</a>                                 <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">const_iterator</a>&amp; operator --()    { m_it--; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }  <span class="comment">// Pre</span>
<a name="l00259"></a>00259 
<a name="l00260"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html#a0c8c59c09867cdc52df2ccd16d959507">00260</a>                                 <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ac961b0980350df207abe8b9703969349" title="The type of each entry in a rawlog.">TEntryType</a> getType()<span class="keyword"> const</span>
<a name="l00261"></a>00261 <span class="keyword">                                </span>{
<a name="l00262"></a>00262                                         <span class="keywordflow">if</span> ( (*m_it)-&gt;GetRuntimeClass()-&gt;derivedFrom( <a class="code" href="_c_object_8h.html#ae1e916f2fdc79ed0da6508acdb1848a0" title="Access to runtime class ID for a defined class name.">CLASS_ID</a>(<a class="code" href="classmrpt_1_1slam_1_1_c_observation.html" title="Declares a class that represents any robot&#39;s observation.">CObservation</a>) ) )
<a name="l00263"></a>00263                                                 <span class="keywordflow">return</span> etObservation;
<a name="l00264"></a>00264                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( (*m_it)-&gt;GetRuntimeClass()-&gt;derivedFrom( <a class="code" href="_c_object_8h.html#ae1e916f2fdc79ed0da6508acdb1848a0" title="Access to runtime class ID for a defined class name.">CLASS_ID</a>(<a class="code" href="classmrpt_1_1slam_1_1_c_sensory_frame.html" title="Declares a class for storing a &quot;sensory frame&quot;, a set of &quot;observations&quot; taken by the robot approximat...">CSensoryFrame</a>) ) )
<a name="l00265"></a>00265                                                 <span class="keywordflow">return</span> etSensoryFrame;
<a name="l00266"></a>00266                                         <span class="keywordflow">else</span>
<a name="l00267"></a>00267                                                 <span class="keywordflow">return</span> etActionCollection;
<a name="l00268"></a>00268                                 }
<a name="l00269"></a>00269 
<a name="l00270"></a>00270                         };
<a name="l00271"></a>00271 
<a name="l00272"></a>00272 
<a name="l00273"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#a32ab6db53fc9dd9f76e86b79f8da44dc">00273</a>                         <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">const_iterator</a> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#a32ab6db53fc9dd9f76e86b79f8da44dc">begin</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_seqOfActObs.begin(); }
<a name="l00274"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ad625bb8aa3236d58d8bcbc5dc0e27fa5">00274</a>                         <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ad625bb8aa3236d58d8bcbc5dc0e27fa5">begin</a>() { <span class="keywordflow">return</span> m_seqOfActObs.begin(); }
<a name="l00275"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ac6434584f1464b3d621f7cfedd8a9153">00275</a>                         <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1const__iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">const_iterator</a> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#ac6434584f1464b3d621f7cfedd8a9153">end</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_seqOfActObs.end(); }
<a name="l00276"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#a1167509f254f1c215af4109d5f43ec31">00276</a>                         <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#a1167509f254f1c215af4109d5f43ec31">end</a>() { <span class="keywordflow">return</span> m_seqOfActObs.end(); }
<a name="l00277"></a>00277 
<a name="l00278"></a><a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#a199ca0884997e3f2a419c60f2fdcd6c3">00278</a>                         <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html#a199ca0884997e3f2a419c60f2fdcd6c3">erase</a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog_1_1iterator.html" title="A normal iterator, plus the extra method &quot;getType&quot; to determine the type of each entry in the sequenc...">iterator</a> &amp;it) { <span class="keywordflow">return</span> iterator::erase(m_seqOfActObs, it); }
<a name="l00279"></a>00279 <span class="comment"></span>
<a name="l00280"></a>00280 <span class="comment">                        /** Returns the sub-set of observations of a given class whose time-stamp t fulfills  time_start &lt;= t &lt; time_end.</span>
<a name="l00281"></a>00281 <span class="comment">                          *  This method requires the timestamps of the sensors to be in strict ascending order (which should be the normal situation).</span>
<a name="l00282"></a>00282 <span class="comment">                          *   Otherwise, the output is undeterminate.</span>
<a name="l00283"></a>00283 <span class="comment">                          * \sa findClosestObservationsByClass</span>
<a name="l00284"></a>00284 <span class="comment">                          */</span>
<a name="l00285"></a>00285                         <span class="keywordtype">void</span> findObservationsByClassInRange(
<a name="l00286"></a>00286                                 <a class="code" href="group__time__date.html#ga42674286d8d56afea013b6329bb7327a" title="A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...">mrpt::system::TTimeStamp</a>                time_start,
<a name="l00287"></a>00287                                 <a class="code" href="group__time__date.html#ga42674286d8d56afea013b6329bb7327a" title="A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...">mrpt::system::TTimeStamp</a>                time_end,
<a name="l00288"></a>00288                                 <span class="keyword">const</span> <a class="code" href="structmrpt_1_1utils_1_1_t_runtime_class_id.html" title="A structure that holds runtime class type information.">mrpt::utils::TRuntimeClassId</a>      *class_type,
<a name="l00289"></a>00289                                 TListTimeAndObservations                &amp;out_found,
<a name="l00290"></a>00290                                 <span class="keywordtype">size_t</span>                                                  guess_start_position = 0
<a name="l00291"></a>00291                                 ) <span class="keyword">const</span>;
<a name="l00292"></a>00292 <span class="comment"></span>
<a name="l00293"></a>00293 <span class="comment">                        /** Efficiently copy the contents from other existing object, and remove the data from the origin (after calling this, the original object will have no actions/observations).</span>
<a name="l00294"></a>00294 <span class="comment">                          */</span>
<a name="l00295"></a>00295                         <span class="keywordtype">void</span> moveFrom( <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html" title="This class stores a rawlog (robotic datasets) in one of two possible formats:">CRawlog</a> &amp;obj);
<a name="l00296"></a>00296 <span class="comment"></span>
<a name="l00297"></a>00297 <span class="comment">                        /** Efficiently swap the contents of two existing objects.</span>
<a name="l00298"></a>00298 <span class="comment">                          */</span>
<a name="l00299"></a>00299                         <span class="keywordtype">void</span> swap( <a class="code" href="classmrpt_1_1slam_1_1_c_rawlog.html" title="This class stores a rawlog (robotic datasets) in one of two possible formats:">CRawlog</a> &amp;obj);
<a name="l00300"></a>00300 <span class="comment"></span>
<a name="l00301"></a>00301 <span class="comment">                        /** Reads a consecutive pair action / observation from the rawlog opened at some input stream.</span>
<a name="l00302"></a>00302 <span class="comment">                          *   Previous contents of action and observations are discarded (using stlplus::smart_ptr::clear_unique), and</span>
<a name="l00303"></a>00303 <span class="comment">                          *    at exit they contain the new objects read from the rawlog file.</span>
<a name="l00304"></a>00304 <span class="comment">                          *  The input/output variable &quot;rawlogEntry&quot; is just a counter of the last rawlog entry read, for logging or monitoring purposes.</span>
<a name="l00305"></a>00305 <span class="comment">                          * \return false if there was some error, true otherwise.</span>
<a name="l00306"></a>00306 <span class="comment">                          * \sa getActionObservationPair, getActionObservationPairOrObservation</span>
<a name="l00307"></a>00307 <span class="comment">                          */</span>
<a name="l00308"></a>00308                         <span class="keyword">static</span> <span class="keywordtype">bool</span> readActionObservationPair(
<a name="l00309"></a>00309                                 <a class="code" href="classmrpt_1_1utils_1_1_c_stream.html" title="This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...">CStream</a>                                 &amp;inStream,
<a name="l00310"></a>00310                                 <a class="code" href="structmrpt_1_1slam_1_1_c_action_collection_ptr.html">CActionCollectionPtr</a>    &amp;action,
<a name="l00311"></a>00311                                 <a class="code" href="structmrpt_1_1slam_1_1_c_sensory_frame_ptr.html">CSensoryFramePtr</a>                &amp;observations,
<a name="l00312"></a>00312                                 <span class="keywordtype">size_t</span>                  &amp; rawlogEntry );
<a name="l00313"></a>00313 <span class="comment"></span>
<a name="l00314"></a>00314 <span class="comment">                        /** Reads a consecutive pair action/sensory_frame OR an observation, depending of the rawlog format, from the rawlog opened at some input stream.</span>
<a name="l00315"></a>00315 <span class="comment">                          *   Previous contents of action and observations are discarded (using stlplus::smart_ptr::clear_unique), and</span>
<a name="l00316"></a>00316 <span class="comment">                          *    at exit they contain the new objects read from the rawlog file.</span>
<a name="l00317"></a>00317 <span class="comment">                          *</span>
<a name="l00318"></a>00318 <span class="comment">                          *  At return, one of this will happen:</span>
<a name="l00319"></a>00319 <span class="comment">                          *             - action/observations contain objects (i.e. action.present() evaluates as true).</span>
<a name="l00320"></a>00320 <span class="comment">                          *             - observation contains an object (i.e. observation.present() evaluates as true).</span>
<a name="l00321"></a>00321 <span class="comment">                          *</span>
<a name="l00322"></a>00322 <span class="comment">                          *  The input/output variable &quot;rawlogEntry&quot; is just a counter of the last rawlog entry read, for logging or monitoring purposes.</span>
<a name="l00323"></a>00323 <span class="comment">                          * \return false if there was some error, true otherwise.</span>
<a name="l00324"></a>00324 <span class="comment">                          * \sa getActionObservationPair</span>
<a name="l00325"></a>00325 <span class="comment">                          */</span>
<a name="l00326"></a>00326                         <span class="keyword">static</span> <span class="keywordtype">bool</span> getActionObservationPairOrObservation(
<a name="l00327"></a>00327                                 <a class="code" href="classmrpt_1_1utils_1_1_c_stream.html" title="This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...">CStream</a>                                 &amp;inStream,
<a name="l00328"></a>00328                                 <a class="code" href="structmrpt_1_1slam_1_1_c_action_collection_ptr.html">CActionCollectionPtr</a>    &amp;action,
<a name="l00329"></a>00329                                 <a class="code" href="structmrpt_1_1slam_1_1_c_sensory_frame_ptr.html">CSensoryFramePtr</a>                &amp;observations,
<a name="l00330"></a>00330                                 <a class="code" href="structmrpt_1_1slam_1_1_c_observation_ptr.html">CObservationPtr</a>                 &amp;observation,
<a name="l00331"></a>00331                                 <span class="keywordtype">size_t</span>                  &amp; rawlogEntry );
<a name="l00332"></a>00332 <span class="comment"></span>
<a name="l00333"></a>00333 <span class="comment">                        /** Gets the next consecutive pair action / observation from the rawlog loaded into this object.</span>
<a name="l00334"></a>00334 <span class="comment">                          *   Previous contents of action and observations are discarded (using stlplus::smart_ptr::clear_unique), and</span>
<a name="l00335"></a>00335 <span class="comment">                          *    at exit they contain the new objects read from the rawlog file.</span>
<a name="l00336"></a>00336 <span class="comment">                          *  The input/output variable &quot;rawlogEntry&quot; is just a counter of the last rawlog entry read, for logging or monitoring purposes.</span>
<a name="l00337"></a>00337 <span class="comment">                          * \return false if there was some error, true otherwise.</span>
<a name="l00338"></a>00338 <span class="comment">                          * \sa readActionObservationPair</span>
<a name="l00339"></a>00339 <span class="comment">                          */</span>
<a name="l00340"></a>00340                         <span class="keywordtype">bool</span> getActionObservationPair(
<a name="l00341"></a>00341                                 <a class="code" href="structmrpt_1_1slam_1_1_c_action_collection_ptr.html">CActionCollectionPtr</a>  &amp;action,
<a name="l00342"></a>00342                                 <a class="code" href="structmrpt_1_1slam_1_1_c_sensory_frame_ptr.html">CSensoryFramePtr</a>      &amp;observations,
<a name="l00343"></a>00343                                 <span class="keywordtype">size_t</span>                &amp;rawlogEntry ) <span class="keyword">const</span>;
<a name="l00344"></a>00344 <span class="comment"></span>
<a name="l00345"></a>00345 <span class="comment">                        /** Tries to auto-detect the external-images directory of the given rawlog file.</span>
<a name="l00346"></a>00346 <span class="comment">                          *  This searches for the existence of the directories:</span>
<a name="l00347"></a>00347 <span class="comment">                          *             - &quot;&lt;rawlog_file_path&gt;/&lt;rawlog_filename&gt;_Images&quot;</span>
<a name="l00348"></a>00348 <span class="comment">                          *             - &quot;&lt;rawlog_file_path&gt;/&lt;rawlog_filename&gt;_images&quot;</span>
<a name="l00349"></a>00349 <span class="comment">                          *             - &quot;&lt;rawlog_file_path&gt;/&lt;rawlog_filename&gt;_IMAGES&quot;</span>
<a name="l00350"></a>00350 <span class="comment">                          *             - &quot;&lt;rawlog_file_path&gt;/Images&quot;  (This one is returned if none of the choices actually exists).</span>
<a name="l00351"></a>00351 <span class="comment">                          *</span>
<a name="l00352"></a>00352 <span class="comment">                          *  The results from this function should be written into mrpt::utils::CImage::IMAGES_PATH_BASE to enable automatic</span>
<a name="l00353"></a>00353 <span class="comment">                          *  loading of extenrnally-stored images in rawlogs.</span>
<a name="l00354"></a>00354 <span class="comment">                          */</span>
<a name="l00355"></a>00355                         <span class="keyword">static</span> std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a> detectImagesDirectory(<span class="keyword">const</span> <a class="code" href="classstd_1_1string.html" title="STL class.">std::string</a> &amp;rawlogFilename);
<a name="l00356"></a>00356 
<a name="l00357"></a>00357                 }; <span class="comment">// End of class def.</span>
<a name="l00358"></a>00358 
<a name="l00359"></a>00359         } <span class="comment">// End of namespace</span>
<a name="l00360"></a>00360 } <span class="comment">// End of namespace</span>
<a name="l00361"></a>00361 
<a name="l00362"></a>00362 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.5</a> for MRPT 0.9.5 SVN: at Sun Sep 25 17:20:18 UTC 2011</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table>  </body></html>