<!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>stl_extensions.h File Reference</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> > <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 Page</span></a></li> <li><a href="pages.html"><span>Related 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 List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> | <a href="#namespaces">Namespaces</a> | <a href="#define-members">Defines</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">stl_extensions.h File Reference</div> </div> </div> <div class="contents"> <div class="textblock"><code>#include <<a class="el" href="_c_serializable_8h_source.html">mrpt/utils/CSerializable.h</a>></code><br/> <code>#include <<a class="el" href="_c_stream_8h_source.html">mrpt/utils/CStream.h</a>></code><br/> <code>#include <<a class="el" href="metaprogramming_8h_source.html">mrpt/utils/metaprogramming.h</a>></code><br/> <code>#include <set></code><br/> <code>#include <map></code><br/> <code>#include <list></code><br/> <code>#include <cctype></code><br/> <code>#include <<a class="el" href="circular__buffer_8h_source.html">mrpt/utils/circular_buffer.h</a>></code><br/> <code>#include <<a class="el" href="list__searchable_8h_source.html">mrpt/utils/list_searchable.h</a>></code><br/> <code>#include <<a class="el" href="bimap_8h_source.html">mrpt/utils/bimap.h</a>></code><br/> <code>#include <<a class="el" href="map__as__vector_8h_source.html">mrpt/utils/map_as_vector.h</a>></code><br/> <code>#include <<a class="el" href="traits__map_8h_source.html">mrpt/utils/traits_map.h</a>></code><br/> </div><div class="textblock"><div class="dynheader"> Include dependency graph for stl_extensions.h:</div> <div class="dyncontent"> <div class="center"><img src="stl__extensions_8h__incl.png" border="0" usemap="#stl__extensions_8h" alt=""/></div> <map name="stl__extensions_8h" id="stl__extensions_8h"> <area shape="rect" id="node3" href="_c_serializable_8h.html" title="mrpt/utils/CSerializable.h" alt="" coords="2012,155,2180,181"/><area shape="rect" id="node104" href="_c_stream_8h.html" title="mrpt/utils/CStream.h" alt="" coords="1687,229,1829,256"/><area shape="rect" id="node119" href="metaprogramming_8h.html" title="mrpt/utils/metaprogramming.h" alt="" coords="1912,80,2106,107"/><area shape="rect" id="node127" href="circular__buffer_8h.html" title="mrpt/utils/circular_buffer.h" alt="" coords="1096,379,1269,405"/><area shape="rect" id="node131" href="list__searchable_8h.html" title="mrpt/utils/list_searchable.h" alt="" coords="2368,155,2546,181"/><area shape="rect" id="node134" href="bimap_8h.html" title="mrpt/utils/bimap.h" alt="" coords="1808,379,1934,405"/><area shape="rect" id="node138" href="map__as__vector_8h.html" title="mrpt/utils/map_as_vector.h" alt="" coords="1295,379,1474,405"/><area shape="rect" id="node143" href="traits__map_8h.html" title="mrpt/utils/traits_map.h" alt="" coords="1220,155,1372,181"/><area shape="rect" id="node5" href="_c_object_8h.html" title="mrpt/utils/CObject.h" alt="" coords="1917,304,2056,331"/><area shape="rect" id="node100" href="safe__pointers_8h.html" title="mrpt/utils/safe_pointers.h" alt="" coords="2011,379,2180,405"/><area shape="rect" id="node7" href="utils__defs_8h.html" title="mrpt/utils/utils_defs.h" alt="" coords="1312,453,1458,480"/><area shape="rect" id="node11" href="os_8h.html" title="mrpt/system/os.h" alt="" coords="652,528,776,555"/><area shape="rect" id="node24" href="base_2include_2mrpt_2base_2link__pragmas_8h.html" title="mrpt/base/link_pragmas.h" alt="" coords="487,677,658,704"/><area shape="rect" id="node27" href="boost__join_8h.html" title="mrpt/utils/boost_join.h" alt="" coords="290,752,440,779"/><area shape="rect" id="node29" href="base_2include_2mrpt_2utils_2types_8h.html" title="mrpt/utils/types.h" alt="" coords="794,603,917,629"/><area shape="rect" id="node45" href="mrpt__macros_8h.html" title="mrpt/utils/mrpt_macros.h" alt="" coords="942,603,1108,629"/><area shape="rect" id="node48" href="compiler__fixes_8h.html" title="mrpt/utils/compiler_fixes.h" alt="" coords="1070,528,1244,555"/><area shape="rect" id="node77" href="smart__ptr_8hpp.html" title="mrpt/otherlibs/stlplus/smart_ptr.hpp" alt="" coords="1446,528,1673,555"/><area shape="rect" id="node94" href="bits_8h.html" title="mrpt/utils/bits.h" alt="" coords="2212,528,2322,555"/><area shape="rect" id="node79" href="containers__fixes_8hpp.html" title="containers_fixes.hpp" alt="" coords="1691,677,1833,704"/><area shape="rect" id="node81" href="exceptions_8hpp.html" title="exceptions.hpp" alt="" coords="1512,603,1622,629"/><area shape="rect" id="node88" href="atomic__incr_8h.html" title="mrpt/synch/atomic_incr.h" alt="" coords="1319,603,1488,629"/><area shape="rect" id="node92" href="smart__ptr_8tpp.html" title="smart_ptr.tpp" alt="" coords="1698,603,1797,629"/><area shape="rect" id="node96" href="_s_s_e__types_8h.html" title="mrpt/utils/SSE_types.h" alt="" coords="2116,603,2273,629"/><area shape="rect" id="node107" href="_c_uncopiable_8h.html" title="mrpt/utils/CUncopiable.h" alt="" coords="1670,304,1836,331"/><area shape="rect" id="node111" href="exceptions_8h.html" title="mrpt/utils/exceptions.h" alt="" coords="1440,304,1593,331"/></map> </div> </div><div class="textblock"><div class="dynheader"> This graph shows which files directly or indirectly include this file:</div> <div class="dyncontent"> <div class="center"><img src="stl__extensions_8h__dep__incl.png" border="0" usemap="#stl__extensions_8hdep" alt=""/></div> <map name="stl__extensions_8hdep" id="stl__extensions_8hdep"> <area shape="rect" id="node3" href="lightweight__geom__data_8h.html" title="lightweight_geom_data.h" alt="" coords="2437,80,2603,107"/><area shape="rect" id="node14" href="_c_polyhedron_8h.html" title="CPolyhedron.h" alt="" coords="1057,229,1164,256"/><area shape="rect" id="node16" href="_c_open_g_l_standard_object_8h.html" title="COpenGLStandardObject.h" alt="" coords="1189,229,1371,256"/><area shape="rect" id="node18" href="_c_height_grid_map2_d_8h.html" title="CHeightGridMap2D.h" alt="" coords="835,229,981,256"/><area shape="rect" id="node22" href="_c_incremental_map_partitioner_8h.html" title="CIncrementalMapPartitioner.h" alt="" coords="67,453,261,480"/><area shape="rect" id="node24" href="_c_angular_observation_mesh_8h.html" title="CAngularObservationMesh.h" alt="" coords="1399,304,1588,331"/><area shape="rect" id="node35" href="_c_coloured_points_map_8h.html" title="CColouredPointsMap.h" alt="" coords="361,304,519,331"/><area shape="rect" id="node39" href="_c_feature_8h.html" title="CFeature.h" alt="" coords="3213,229,3299,256"/><area shape="rect" id="node49" href="base_2include_2mrpt_2utils_8h.html" title="utils.h" alt="" coords="587,229,644,256"/><area shape="rect" id="node58" href="_c_set_of_lines_8h.html" title="CSetOfLines.h" alt="" coords="1510,155,1617,181"/><area shape="rect" id="node69" href="_p_f__implementations_8h.html" title="This file contains the implementations of the template members declared in mrpt::slam::PF_implementat..." alt="" coords="4343,229,4495,256"/><area shape="rect" id="node84" href="_c_spline_interpolator1_d_8h.html" title="CSplineInterpolator1D.h" alt="" coords="3230,80,3391,107"/><area shape="rect" id="node87" href="_t_enum_type_8h.html" title="TEnumType.h" alt="" coords="529,80,633,107"/><area shape="rect" id="node91" href="_c_pose3_d_interpolator_8h.html" title="CPose3DInterpolator.h" alt="" coords="747,155,900,181"/><area shape="rect" id="node95" href="_c_kalman_filter_capable_8h.html" title="CKalmanFilterCapable.h" alt="" coords="145,155,308,181"/><area shape="rect" id="node103" href="_c_network_of_poses_8h.html" title="CNetworkOfPoses.h" alt="" coords="4122,80,4264,107"/><area shape="rect" id="node105" href="dijkstra_8h.html" title="dijkstra.h" alt="" coords="4288,80,4361,107"/><area shape="rect" id="node110" href="_h_m_t___s_l_a_m__common_8h.html" title="HMT_SLAM_common.h" alt="" coords="4387,80,4549,107"/><area shape="rect" id="node112" href="_c_h_m_h_map_node_8h.html" title="CHMHMapNode.h" alt="" coords="4521,155,4651,181"/><area shape="rect" id="node116" href="_c_reflectivity_grid_map2_d_8h.html" title="CReflectivityGridMap2D.h" alt="" coords="66,304,240,331"/><area shape="rect" id="node122" href="_c_interface_f_t_d_i_8h.html" title="CInterfaceFTDI.h" alt="" coords="4625,80,4748,107"/><area shape="rect" id="node124" href="_c_serial_port_8h.html" title="CSerialPort.h" alt="" coords="4773,80,4872,107"/><area shape="rect" id="node126" href="_c_hokuyo_u_r_g_8h.html" title="CHokuyoURG.h" alt="" coords="4897,80,5015,107"/><area shape="rect" id="node5" href="ops__containers_8h.html" title="This file implements several operations that operate element-wise on individual or pairs of container..." alt="" coords="3097,155,3217,181"/><area shape="rect" id="node7" href="math_8h.html" title="math.h" alt="" coords="3126,229,3188,256"/><area shape="rect" id="node9" href="_c_pose_or_point_8h.html" title="CPoseOrPoint.h" alt="" coords="1643,155,1759,181"/><area shape="rect" id="node11" href="geometry_8h.html" title="geometry.h" alt="" coords="1347,155,1433,181"/><area shape="rect" id="node26" href="_c_polygon_8h.html" title="CPolygon.h" alt="" coords="3243,155,3333,181"/><area shape="rect" id="node30" href="_k_d_tree_capable_8h.html" title="KDTreeCapable.h" alt="" coords="2946,155,3072,181"/><area shape="rect" id="node33" href="_c_points_map_8h.html" title="CPointsMap.h" alt="" coords="1395,229,1500,256"/><area shape="rect" id="node41" href="_c_landmark_8h.html" title="CLandmark.h" alt="" coords="2547,304,2647,331"/><area shape="rect" id="node43" href="_c_pose3_d_quat_8h.html" title="CPose3DQuat.h" alt="" coords="1783,155,1901,181"/><area shape="rect" id="node45" href="_c_robot2_d_pose_estimator_8h.html" title="CRobot2DPoseEstimator.h" alt="" coords="2100,155,2281,181"/><area shape="rect" id="node47" href="_p_l_y__import__export_8h.html" title="PLY_import_export.h" alt="" coords="1179,155,1323,181"/><area shape="rect" id="node52" href="_c_renderizable_8h.html" title="CRenderizable.h" alt="" coords="2306,155,2424,181"/><area shape="rect" id="node54" href="_c_open_g_l_viewport_8h.html" title="COpenGLViewport.h" alt="" coords="2449,155,2591,181"/><area shape="rect" id="node56" href="_c_box_8h.html" title="CBox.h" alt="" coords="2667,155,2733,181"/><area shape="rect" id="node61" href="_c_display_window_plots_8h.html" title="CDisplayWindowPlots.h" alt="" coords="2758,155,2921,181"/><area shape="rect" id="node63" href="_wx_subsystem_8h.html" title="WxSubsystem.h" alt="" coords="3358,155,3476,181"/><area shape="rect" id="node67" href="_p_f__implementations__data_8h.html" title="PF_implementations_data.h" alt="" coords="4263,155,4447,181"/><area shape="rect" id="node71" href="_c_rejection_sampling_range_only_localization_8h.html" title="CRejectionSamplingRangeOnlyLocalization.h" alt="" coords="3501,155,3787,181"/><area shape="rect" id="node73" href="conversions_8h.html" title="conversions.h" alt="" coords="2278,229,2380,256"/><area shape="rect" id="node75" href="data__types_8h.html" title="data_types.h" alt="" coords="1978,155,2075,181"/><area shape="rect" id="node78" href="path__from__rtk__gps_8h.html" title="path_from_rtk_gps.h" alt="" coords="669,229,809,256"/><area shape="rect" id="node80" href="bundle__adjustment_8h.html" title="bundle_adjustment.h" alt="" coords="3863,155,4005,181"/><area shape="rect" id="node82" href="_c_cam_model_8h.html" title="CCamModel.h" alt="" coords="4031,155,4137,181"/><area shape="rect" id="node20" href="_c_multi_metric_map_8h.html" title="CMultiMetricMap.h" alt="" coords="258,379,389,405"/><area shape="rect" id="node89" href="_c_config_file_base_8h.html" title="CConfigFileBase.h" alt="" coords="385,155,516,181"/><area shape="rect" id="node98" href="_c_kinect_8h.html" title="CKinect.h" alt="" coords="541,155,620,181"/></map> </div> </div> <p><a href="stl__extensions_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="nested-classes"></a> Classes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structmrpt_1_1utils_1_1ci__less.html">mrpt::utils::ci_less</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A case-insensitive comparator struct for usage within STL containers, eg: map<string,string,ci_less> <a href="structmrpt_1_1utils_1_1ci__less.html#details">More...</a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structmrpt_1_1utils_1_1ci__less_1_1nocase__compare.html">mrpt::utils::ci_less::nocase_compare</a></td></tr> <tr><td colspan="2"><h2><a name="namespaces"></a> Namespaces</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt.html">mrpt</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><p>This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries. </p> <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1utils.html">mrpt::utils</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><p>Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL. </p> <br/></td></tr> <tr><td colspan="2"><h2><a name="define-members"></a> Defines</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#ga6e9751bd4a03af62ab1adb1509a6182b">MRPTSTL_SERIALIZABLE_SEQ_CONTAINER</a>(CONTAINER)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#gacbe319059d7b0f530b4eb2e8e362e524">MRPTSTL_SERIALIZABLE_ASSOC_CONTAINER</a>(CONTAINER)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="stl__extensions_8h.html#a81438265757e704ac4db6f4382426a62">MRPTSTL_SERIALIZABLE_SIMPLE_ASSOC_CONTAINER</a>(CONTAINER)</td></tr> <tr><td colspan="2"><h2><a name="func-members"></a> Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#ga3fe5e4224b9e59419e84795f28977b86">mrpt::utils::MRPTSTL_SERIALIZABLE_SEQ_CONTAINER</a> (<a class="el" href="classstd_1_1vector.html">std::vector</a>) MRPTSTL_SERIALIZABLE_SEQ_CONTAINER(std</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Template method to serialize a STL pair. <a href="group__stlext__grp.html#ga3fe5e4224b9e59419e84795f28977b86"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T1 , class T2 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">CStream & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#ga13c0c64816a187c4198996ab8ce022b6">mrpt::utils::operator>></a> (CStream &in, std::pair< T1, T2 > &obj)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Template method to deserialize a STL pair. <a href="group__stlext__grp.html#ga13c0c64816a187c4198996ab8ce022b6"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T , class CONTAINER > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">size_t </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#ga0683c85522dd9009f2c2801c18e12eae">mrpt::utils::find_in_vector</a> (const T &value, const CONTAINER &vect)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the index of the value "T" in the container "vect" (<a class="el" href="classstd_1_1vector.html" title="STL class.">std::vector</a>,<a class="el" href="classstd_1_1deque.html" title="STL class.">std::deque</a>,etc), or string::npos if not found. <a href="group__stlext__grp.html#ga0683c85522dd9009f2c2801c18e12eae"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1list.html">std::list</a>< T >::<a class="el" href="eigen__plugins_8h.html#a39c5d6430ea9395ae7ae729dd0c3f18c">iterator</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#gac2cbbb352f5b7daa375a029b9a65f9b5">mrpt::utils::erase_return_next</a> (<a class="el" href="classstd_1_1list.html">std::list</a>< T > &cont, typename <a class="el" href="classstd_1_1list.html">std::list</a>< T >::<a class="el" href="eigen__plugins_8h.html#a39c5d6430ea9395ae7ae729dd0c3f18c">iterator</a> &it)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calls the standard "erase" method of a STL container, but also returns an iterator to the next element in the container (or <a class="el" href="eigen__plugins_8h.html#ade5b39864c905cbb824d0ff6eb0d888c">end</a> if none) <a href="group__stlext__grp.html#gac2cbbb352f5b7daa375a029b9a65f9b5"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class K , class V > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1map.html">std::map</a>< K, V >::<a class="el" href="eigen__plugins_8h.html#a39c5d6430ea9395ae7ae729dd0c3f18c">iterator</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#ga2fe6bf9b8c0bcea04324d0f3e6beec84">mrpt::utils::erase_return_next</a> (<a class="el" href="classstd_1_1map.html">std::map</a>< K, V > &cont, typename <a class="el" href="classstd_1_1map.html">std::map</a>< K, V >::<a class="el" href="eigen__plugins_8h.html#a39c5d6430ea9395ae7ae729dd0c3f18c">iterator</a> &it)</td></tr> <tr><td class="memTemplParams" colspan="2">template<class K , class V > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1multimap.html">std::multimap</a>< K, V >::<a class="el" href="eigen__plugins_8h.html#a39c5d6430ea9395ae7ae729dd0c3f18c">iterator</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#ga20dc9a22082b67aa35dda2087c182e89">mrpt::utils::erase_return_next</a> (<a class="el" href="classstd_1_1multimap.html">std::multimap</a>< K, V > &cont, typename <a class="el" href="classstd_1_1multimap.html">std::multimap</a>< K, V >::<a class="el" href="eigen__plugins_8h.html#a39c5d6430ea9395ae7ae729dd0c3f18c">iterator</a> &it)</td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1set.html">std::set</a>< T >::<a class="el" href="eigen__plugins_8h.html#a39c5d6430ea9395ae7ae729dd0c3f18c">iterator</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#gac73187001985ae3ef41a8040a792db12">mrpt::utils::erase_return_next</a> (<a class="el" href="classstd_1_1set.html">std::set</a>< T > &cont, typename <a class="el" href="classstd_1_1set.html">std::set</a>< T >::<a class="el" href="eigen__plugins_8h.html#a39c5d6430ea9395ae7ae729dd0c3f18c">iterator</a> &it)</td></tr> <tr><td class="memTemplParams" colspan="2">template<typename T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1string.html">std::string</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#ga39a976e64941bfbbcde6969124bdd6c5">mrpt::utils::sprintf_vector</a> (const char *fmt, const <a class="el" href="classstd_1_1vector.html">std::vector</a>< T > &V)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generates a string for a vector in the format [A,B,C,...] to std::cout, and the fmt string for <b>each</b> vector element. <a href="group__stlext__grp.html#ga39a976e64941bfbbcde6969124bdd6c5"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<typename Derived > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1string.html">std::string</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#gad16f1beaaa537e76df642cfec8e59399">mrpt::utils::sprintf_vector</a> (const char *fmt, const <a class="el" href="class_eigen_1_1_matrix_base.html">Eigen::MatrixBase</a>< Derived > &V)</td></tr> <tr><td class="memTemplParams" colspan="2">template<typename T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__stlext__grp.html#gac1fd539c110cc511a60fcc0675cad366">mrpt::utils::printf_vector</a> (const char *fmt, const <a class="el" href="classstd_1_1vector.html">std::vector</a>< T > &V)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Prints a vector in the format [A,B,C,...] to std::cout, and the fmt string for <b>each</b> vector element. <a href="group__stlext__grp.html#gac1fd539c110cc511a60fcc0675cad366"></a><br/></td></tr> </table> <hr/><h2>Define Documentation</h2> <a class="anchor" id="a81438265757e704ac4db6f4382426a62"></a><!-- doxytag: member="stl_extensions.h::MRPTSTL_SERIALIZABLE_SIMPLE_ASSOC_CONTAINER" ref="a81438265757e704ac4db6f4382426a62" args="(CONTAINER)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define MRPTSTL_SERIALIZABLE_SIMPLE_ASSOC_CONTAINER</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">CONTAINER</td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <b>Value:</b><div class="fragment"><pre class="fragment"><span class="comment">/** Template method to serialize an associative STL container */</span> \ template <class K,class _Pr,class _Alloc> \ CStream& operator << (CStream& out, const CONTAINER<K,_Pr,_Alloc> &obj) \ { \ out << string(#CONTAINER) << TTypeName<K>::get(); \ out << static_cast<uint32_t>(obj.size()); \ for (<span class="keyword">typename</span> <a class="code" href="eigen__plugins_8h.html#a8dbda719917732693c56cee228465ed9">CONTAINER<K,_Pr,_Alloc>::const_iterator</a> it=obj.begin();it!=obj.end();++it) \ out << *it; \ return out; \ } \<span class="comment"></span> <span class="comment"> /** Template method to deserialize an associative STL container */</span> \ template <class K,class _Pr,class _Alloc> \ CStream& <a class="code" href="namespacemrpt_1_1math.html#ab55e39255f4b544e7693867d22a70b91">operator >> </a>(<a class="code" href="namespacemrpt_1_1utils.html#a4aa6d0388c837d159ca801e48d601449">CStream</a>& in, CONTAINER<K,_Pr,_Alloc> &obj) \ { \ obj.clear(); \ string pref,stored_K; \ in >> pref; \ if (pref!=#CONTAINER) <a class="code" href="mrpt__macros_8h.html#aaa3f404ea85a6575a7139f8d101370ba">THROW_EXCEPTION</a>(<a class="code" href="namespacemrpt.html#a3a27af794b658df5491e2b7678f8ccb8" title="A std::string version of C sprintf.">format</a>("Error: serialized container %s<%s>'s preamble is wrong: '%s'",<span class="preprocessor">#CONTAINER, TTypeName<K>::get().c_str(),pref.c_str())) \</span> <span class="preprocessor"> in >> stored_K; \</span> <span class="preprocessor"> if (stored_K != TTypeName<K>::get()) THROW_EXCEPTION(format("Error: serialized container %s key type %s != %s",#CONTAINER,stored_K.c_str(), TTypeName<K>::get().c_str())) \</span> <span class="preprocessor"> uint32_t n; \</span> <span class="preprocessor"> in >> n; \</span> <span class="preprocessor"> for (uint32_t i=0;i<n;i++) \</span> <span class="preprocessor"> { \</span> <span class="preprocessor"> K key_obj; \</span> <span class="preprocessor"> in >> key_obj; \</span> <span class="preprocessor"> obj.insert(key_obj); \</span> <span class="preprocessor"> } \</span> <span class="preprocessor"> return in; \</span> <span class="preprocessor"> }</span> </pre></div> <p>Referenced by <a class="el" href="stl__extensions_8h_source.html#l00125">mrpt::utils::MRPTSTL_SERIALIZABLE_SEQ_CONTAINER()</a>.</p> </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>