Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Macros | Functions
Stlext_grp

Detailed Description

Classes

struct  mrpt::containers::ContainerReadOnlyProxyAccessor< STLCONTAINER >
 A generic proxy accessor template that only allows read-only access to the original binded STL container object. More...
 
class  mrpt::containers::MT_buffer
 This class is a bulk sequence of bytes with MultiThread (MT)-safe read and write operations. More...
 
struct  mrpt::containers::map_traits_stdmap
 Traits for using a std::map<> (sparse representation) More...
 
struct  mrpt::containers::map_traits_map_as_vector
 Traits for using a mrpt::utils::map_as_vector<> (dense, fastest representation) More...
 
struct  mrpt::serialization::metaprogramming::ObjectReadFromStream
 An object for reading objects from a stream, intended for being used in STL algorithms. More...
 
struct  mrpt::serialization::metaprogramming::ObjectReadFromStreamToPtrs< ptr_t >
 
struct  mrpt::serialization::metaprogramming::ObjectWriteToStream
 An object for writing objects to a stream, intended for being used in STL algorithms. More...
 

Macros

#define MRPTSTL_SERIALIZABLE_SEQ_CONTAINER(CONTAINER)
 
#define MRPTSTL_SERIALIZABLE_ASSOC_CONTAINER(CONTAINER)
 
#define MRPTSTL_SERIALIZABLE_SIMPLE_ASSOC_CONTAINER(CONTAINER)
 

Functions

template<class T , class CONTAINER >
size_t mrpt::containers::find_in_vector (const T &value, const CONTAINER &vect)
 Returns the index of the value "T" in the container "vect" (std::vector,std::deque,etc), or string::npos if not found. More...
 
template<class T >
std::list< T >::iterator mrpt::containers::erase_return_next (std::list< T > &cont, typename std::list< T >::iterator &it)
 Calls the standard "erase" method of a STL container, but also returns an iterator to the next element in the container (or end if none) More...
 
template<class K , class V >
std::map< K, V >::iterator mrpt::containers::erase_return_next (std::map< K, V > &cont, typename std::map< K, V >::iterator &it)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
template<class K , class V >
std::multimap< K, V >::iterator mrpt::containers::erase_return_next (std::multimap< K, V > &cont, typename std::multimap< K, V >::iterator &it)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
template<class T >
std::set< T >::iterator mrpt::containers::erase_return_next (std::set< T > &cont, typename std::set< T >::iterator &it)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
template<class T >
std::string mrpt::containers::getSTLContainerAsString (const T &t)
 Return a STL container in std::string form. More...
 
template<class T >
void mrpt::containers::printSTLContainer (const T &t)
 Print the given vector t. More...
 
template<class T >
void mrpt::containers::printSTLContainerOfContainers (const T &t)
 Print the given STL container of containers t. More...
 
template<class T1 , class T2 >
std::string mrpt::containers::getMapAsString (const std::map< T1, T2 > &m, const std::string &sep=" => ")
 Return contents of map in a string representation. More...
 
template<class T1 , class T2 >
void mrpt::containers::printMap (const std::map< T1, T2 > &m)
 Print the given map m. More...
 
template<class T , size_t N>
CArchivemrpt::serialization::operator<< (CArchive &out, const std::array< T, N > &obj)
 Template method to serialize a std::array<T,N> More...
 
template<class T , size_t N>
CArchivemrpt::serialization::operator>> (CArchive &in, std::array< T, N > &obj)
 Template method to deserialize a std::array<T,N>
More...
 
template<class T1 , class T2 >
CArchivemrpt::serialization::operator<< (CArchive &out, const std::pair< T1, T2 > &obj)
 Template method to serialize a STL pair. More...
 
template<class T1 , class T2 >
CArchivemrpt::serialization::operator>> (CArchive &in, std::pair< T1, T2 > &obj)
 Template method to deserialize a STL pair. More...
 

Macro Definition Documentation

◆ MRPTSTL_SERIALIZABLE_ASSOC_CONTAINER

#define MRPTSTL_SERIALIZABLE_ASSOC_CONTAINER (   CONTAINER)

Definition at line 69 of file stl_serialization.h.

◆ MRPTSTL_SERIALIZABLE_SEQ_CONTAINER

#define MRPTSTL_SERIALIZABLE_SEQ_CONTAINER (   CONTAINER)

Definition at line 29 of file stl_serialization.h.

◆ MRPTSTL_SERIALIZABLE_SIMPLE_ASSOC_CONTAINER

#define MRPTSTL_SERIALIZABLE_SIMPLE_ASSOC_CONTAINER (   CONTAINER)

Definition at line 129 of file stl_serialization.h.

Function Documentation

◆ erase_return_next() [1/4]

template<class T >
std::list<T>::iterator mrpt::containers::erase_return_next ( std::list< T > &  cont,
typename std::list< T >::iterator it 
)
inline

Calls the standard "erase" method of a STL container, but also returns an iterator to the next element in the container (or end if none)

Definition at line 38 of file stl_containers_utils.h.

Referenced by mrpt::vision::TSequenceFeatureObservations::decimateCameraFrames(), and mrpt::hmtslam::CHMTSLAM::LSLAM_process_message_from_AA().

◆ erase_return_next() [2/4]

template<class K , class V >
std::map<K, V>::iterator mrpt::containers::erase_return_next ( std::map< K, V > &  cont,
typename std::map< K, V >::iterator it 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 45 of file stl_containers_utils.h.

◆ erase_return_next() [3/4]

template<class K , class V >
std::multimap<K, V>::iterator mrpt::containers::erase_return_next ( std::multimap< K, V > &  cont,
typename std::multimap< K, V >::iterator it 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 55 of file stl_containers_utils.h.

◆ erase_return_next() [4/4]

template<class T >
std::set<T>::iterator mrpt::containers::erase_return_next ( std::set< T > &  cont,
typename std::set< T >::iterator it 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 65 of file stl_containers_utils.h.

◆ find_in_vector()

template<class T , class CONTAINER >
size_t mrpt::containers::find_in_vector ( const T &  value,
const CONTAINER &  vect 
)

Returns the index of the value "T" in the container "vect" (std::vector,std::deque,etc), or string::npos if not found.

Definition at line 27 of file stl_containers_utils.h.

References mrpt::math::distance().

Referenced by mrpt::slam::CRangeBearingKFSLAM2D::OnGetObservationsAndDataAssociation(), mrpt::graphslam::optimize_graph_spa_levmarq(), and mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration().

◆ getMapAsString()

template<class T1 , class T2 >
std::string mrpt::containers::getMapAsString ( const std::map< T1, T2 > &  m,
const std::string sep = " => " 
)

Return contents of map in a string representation.

Parameters
[in]mTemplate map
[in]sepString that seperates visually each key and its value. Defaults to " => "
Returns
std::string representation of map

Definition at line 124 of file stl_containers_utils.h.

Referenced by mrpt::containers::printMap().

◆ getSTLContainerAsString()

template<class T >
std::string mrpt::containers::getSTLContainerAsString ( const T &  t)

◆ operator<<() [1/2]

template<class T , size_t N>
CArchive& mrpt::serialization::operator<< ( CArchive out,
const std::array< T, N > &  obj 
)

Template method to serialize a std::array<T,N>

Definition at line 187 of file stl_serialization.h.

◆ operator<<() [2/2]

template<class T1 , class T2 >
CArchive& mrpt::serialization::operator<< ( CArchive out,
const std::pair< T1, T2 > &  obj 
)

Template method to serialize a STL pair.

Definition at line 221 of file stl_serialization.h.

References mrpt::typemeta::TTypeName< T >::get().

◆ operator>>() [1/2]

template<class T , size_t N>
CArchive& mrpt::serialization::operator>> ( CArchive in,
std::array< T, N > &  obj 
)

Template method to deserialize a std::array<T,N>

Definition at line 198 of file stl_serialization.h.

References THROW_EXCEPTION_FMT.

◆ operator>>() [2/2]

template<class T1 , class T2 >
CArchive& mrpt::serialization::operator>> ( CArchive in,
std::pair< T1, T2 > &  obj 
)

Template method to deserialize a STL pair.

Definition at line 230 of file stl_serialization.h.

References mrpt::format(), and THROW_EXCEPTION.

◆ printMap()

template<class T1 , class T2 >
void mrpt::containers::printMap ( const std::map< T1, T2 > &  m)

Print the given map m.

Parameters
[in]mTemplate map

Definition at line 143 of file stl_containers_utils.h.

References mrpt::containers::getMapAsString().

◆ printSTLContainer()

template<class T >
void mrpt::containers::printSTLContainer ( const T &  t)

Print the given vector t.

Parameters
[in]tTemplate vector

Definition at line 95 of file stl_containers_utils.h.

References mrpt::containers::getSTLContainerAsString().

Referenced by mrpt::containers::printSTLContainerOfContainers().

◆ printSTLContainerOfContainers()

template<class T >
void mrpt::containers::printSTLContainerOfContainers ( const T &  t)

Print the given STL container of containers t.

Parameters
[in]tTemplate STL container (containing other containers)

Definition at line 105 of file stl_containers_utils.h.

References mrpt::containers::printSTLContainer().




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST