Classes | |
class | mrpt::utils::bimap< KEY, VALUE > |
A bidirectional version of std::map, declared as bimap<KEY,VALUE> and which actually contains two std::map's, one for keys and another for values. More... | |
struct | mrpt::utils::ci_less |
A case-insensitive comparator struct for usage within STL containers, eg: map<string,string,ci_less> More... | |
class | mrpt::utils::circular_buffer< T > |
A circular buffer of fixed size (defined at construction-time), implemented with a std::vector as the underlying storage. More... | |
struct | mrpt::utils::ContainerReadOnlyProxyAccessor< STLCONTAINER > |
A generic proxy accessor template that only allows read-only access to the original binded STL container object. More... | |
class | mrpt::utils::copy_ptr< T > |
Smart pointer for non-polymorphic classes. More... | |
class | mrpt::utils::list_searchable< T > |
This class implements a STL container with features of both, a std::set and a std::list. More... | |
class | mrpt::utils::map_as_vector< KEY, VALUE, VECTOR_T > |
A STL-like container which looks and behaves (almost exactly) like a std::map<> but is implemented as a linear std::vector<> indexed by KEY. More... | |
struct | mrpt::utils::metaprogramming::ObjectDelete |
An object for deleting pointers (intended for STL algorithms) More... | |
struct | mrpt::utils::metaprogramming::ObjectClear |
An object for clearing an object (invokes its method "->clear()") given a pointer or smart-pointer, intended for being used in STL algorithms. More... | |
struct | mrpt::utils::metaprogramming::ObjectClear2 |
An object for clearing an object (invokes its method ".clear()") given a pointer or smart-pointer, intended for being used in STL algorithms. More... | |
struct | mrpt::utils::metaprogramming::ObjectClearSecond |
An object for clearing an object->second (invokes its method "clear()") given a pointer or smart-pointer, intended for being used in STL algorithms. More... | |
struct | mrpt::utils::metaprogramming::ObjectConvert< TARGET_TYPE > |
An object for transforming between types/classes, intended for being used in STL algorithms. More... | |
struct | mrpt::utils::metaprogramming::ObjectMakeUnique |
An object for making smart pointers unique (ie, making copies if necessary), intended for being used in STL algorithms. More... | |
struct | mrpt::utils::metaprogramming::ObjectPairMakeUnique |
An object for making smart pointers unique (ie, making copies if necessary), intended for being used in STL algorithms. More... | |
struct | mrpt::utils::metaprogramming::ObjectClearUnique< T > |
An object for making smart pointers unique (ie, making copies if necessary), intended for being used in STL algorithms. More... | |
class | mrpt::utils::metaprogramming::MemoryBypasserIterator< T, U > |
This class bypasses pointer access in iterators to pointers, thus allowing the use of algorithms that expect an object of class T with containers of T*. More... | |
class | mrpt::utils::metaprogramming::BinaryMemberFunctionWrapper< T, U1, U2, V > |
This template encapsulates a binary member function and a single object into a function expecting the two parameters of the member function. More... | |
class | mrpt::utils::metaprogramming::UnaryMemberFunctionWrapper< T, U, V > |
This template encapsulates an unary member function and a single object into a function expecting the parameter of the member function. More... | |
class | mrpt::utils::metaprogramming::MemberFunctionWrapper< T, V > |
This template encapsulates a member function without arguments and a single object into a function. More... | |
class | mrpt::utils::metaprogramming::NonConstBind1st< Op > |
Equivalent of std::bind1st for functions with non-const arguments. More... | |
class | mrpt::utils::metaprogramming::NonConstBind2nd< Op > |
Equivalent of std::bind2nd for functions with non-const arguments. More... | |
struct | mrpt::utils::metaprogramming::ObjectReadFromStream |
An object for reading objects from a stream, intended for being used in STL algorithms. More... | |
struct | mrpt::utils::metaprogramming::ObjectReadFromStreamToPtrs< ptr_t > |
struct | mrpt::utils::metaprogramming::ObjectWriteToStream |
An object for writing objects to a stream, intended for being used in STL algorithms. More... | |
class | mrpt::utils::poly_ptr< T > |
Smart pointer for polymorphic classes with a clone() method. More... | |
class | mrpt::utils::poly_ptr_ptr< T > |
Wrapper to a smart pointer to polymorphic classes, capable of handling copy operator, etc. More... | |
struct | mrpt::utils::map_traits_stdmap |
Traits for using a std::map<> (sparse representation) More... | |
struct | mrpt::utils::map_traits_map_as_vector |
Traits for using a mrpt::utils::map_as_vector<> (dense, fastest representation) More... | |
Namespaces | |
mrpt::utils::internal | |
mrpt::utils::metaprogramming | |
A set of utility objects for metaprogramming with STL algorithms. | |
Macros | |
#define | MRPTSTL_SERIALIZABLE_SEQ_CONTAINER(CONTAINER) |
#define | MRPTSTL_SERIALIZABLE_ASSOC_CONTAINER(CONTAINER) |
Functions | |
template<typename T > | |
void | mrpt::utils::metaprogramming::DeleteContainer (T &container) |
A function which deletes a container of pointers. More... | |
template<typename it_src , typename it_dst > | |
void | mrpt::utils::metaprogramming::copy_typecasting (it_src first, it_src last, it_dst target) |
Behaves like std::copy but allows the source and target iterators to be of different types through static typecasting. More... | |
template<typename src_container , typename dst_container > | |
void | mrpt::utils::metaprogramming::copy_container_typecasting (const src_container &src, dst_container &trg) |
Copy all the elements in a container (vector, deque, list) into a different one performing the appropriate typecasting. More... | |
template<typename U , typename T > | |
MemoryBypasserIterator< T, U > | mrpt::utils::metaprogramming::bypassPointer (const T &baseIterator) |
Sintactic sugar for MemoryBypasserIterator. More... | |
template<typename T , typename U1 , typename U2 , typename V > | |
BinaryMemberFunctionWrapper< T, U1, U2, V > | mrpt::utils::metaprogramming::wrapMember (V &obj, T(V::*fun)(U1, U2)) |
This function creates a function from an object and a member function. More... | |
template<typename T , typename U , typename V > | |
UnaryMemberFunctionWrapper< T, U, V > | mrpt::utils::metaprogramming::wrapMember (V &obj, T(V::*fun)(U)) |
template<typename T , typename V > | |
MemberFunctionWrapper< T, V > | mrpt::utils::metaprogramming::wrapMember (V &obj, T(V::*fun)(void)) |
template<typename Op > | |
NonConstBind1st< Op > | mrpt::utils::metaprogramming::nonConstBind1st (Op &o, typename Op::first_argument_type &t) |
Use this function instead of directly calling NonConstBind1st. More... | |
template<typename Op > | |
NonConstBind2nd< Op > | mrpt::utils::metaprogramming::nonConstBind2nd (Op &o, typename Op::second_argument_type &t) |
Do not directly use the NonConstBind2nd class directly. More... | |
template<class T , class CONTAINER > | |
size_t | mrpt::utils::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::utils::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::utils::erase_return_next (std::map< K, V > &cont, typename std::map< K, V >::iterator &it) |
template<class K , class V > | |
std::multimap< K, V >::iterator | mrpt::utils::erase_return_next (std::multimap< K, V > &cont, typename std::multimap< K, V >::iterator &it) |
template<class T > | |
std::set< T >::iterator | mrpt::utils::erase_return_next (std::set< T > &cont, typename std::set< T >::iterator &it) |
template<class T > | |
std::string | mrpt::utils::getSTLContainerAsString (const T &t) |
Return a STL container in std::string form. More... | |
template<class T > | |
void | mrpt::utils::printSTLContainer (const T &t) |
Print the given vector t. More... | |
template<class T > | |
void | mrpt::utils::printSTLContainerOfContainers (const T &t) |
Print the given STL container of containers t. More... | |
template<class T1 , class T2 > | |
std::string | mrpt::utils::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::utils::printMap (const std::map< T1, T2 > &m) |
Print the given map m. More... | |
mrpt::utils::MRPTSTL_SERIALIZABLE_SEQ_CONTAINER (std::vector) MRPTSTL_SERIALIZABLE_SEQ_CONTAINER(std | |
Template method to serialize a STL pair. More... | |
template<class T1 , class T2 > | |
CStream & | mrpt::utils::operator>> (mrpt::utils::CStream &in, std::pair< T1, T2 > &obj) |
Template method to deserialize a STL pair. More... | |
#define MRPTSTL_SERIALIZABLE_ASSOC_CONTAINER | ( | CONTAINER | ) |
Definition at line 56 of file stl_serialization.h.
#define MRPTSTL_SERIALIZABLE_SEQ_CONTAINER | ( | CONTAINER | ) |
Definition at line 28 of file stl_serialization.h.
|
inline |
Sintactic sugar for MemoryBypasserIterator.
For example, having the following declarations: vector<double *> vec; void modifyVal(double &v); The following sentence is not legal: for_each(vec.begin(),vec.end(),&modifyVal) But this one is: for_each(bypassPointer(vec.begin()),bypassPointer(vec.end()),&modifyVal)
Definition at line 225 of file metaprogramming.h.
|
inline |
Copy all the elements in a container (vector, deque, list) into a different one performing the appropriate typecasting.
The target container is automatically resized to the appropriate size, and previous contents are lost. This can be used to assign std::vector's of different types:
Definition at line 138 of file metaprogramming.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), and TEST().
|
inline |
Behaves like std::copy but allows the source and target iterators to be of different types through static typecasting.
Definition at line 121 of file metaprogramming.h.
|
inline |
A function which deletes a container of pointers.
Definition at line 38 of file metaprogramming.h.
|
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 37 of file stl_containers_utils.h.
Referenced by mrpt::vision::TSequenceFeatureObservations::decimateCameraFrames(), and mrpt::hmtslam::CHMTSLAM::LSLAM_process_message_from_AA().
|
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 43 of file stl_containers_utils.h.
|
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 51 of file stl_containers_utils.h.
|
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 59 of file stl_containers_utils.h.
size_t mrpt::utils::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().
std::string mrpt::utils::getMapAsString | ( | const std::map< T1, T2 > & | m, |
const std::string & | sep = " => " |
||
) |
Return contents of map in a string representation.
[in] | m | Template map |
[in] | sep | String that seperates visually each key and its value. Defaults to " => " |
Definition at line 111 of file stl_containers_utils.h.
Referenced by mrpt::utils::printMap().
std::string mrpt::utils::getSTLContainerAsString | ( | const T & | t | ) |
Return a STL container in std::string form.
[in] | t | Template STL container (e.g. vector) |
Definition at line 72 of file stl_containers_utils.h.
Referenced by mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::checkPartitionsForLC(), mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::generateHypotsPool(), mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::generatePWConsistenciesMatrix(), mrpt::graphslam::TUncertaintyPath< GRAPH_T >::getAsString(), and mrpt::utils::printSTLContainer().
mrpt::utils::MRPTSTL_SERIALIZABLE_SEQ_CONTAINER | ( | std::vector | ) |
Template method to serialize a STL pair.
Definition at line 92 of file stl_serialization.h.
References mrpt::utils::TTypeName< T >::get().
|
inline |
Use this function instead of directly calling NonConstBind1st.
Definition at line 309 of file metaprogramming.h.
|
inline |
Do not directly use the NonConstBind2nd class directly.
Use this function.
Definition at line 328 of file metaprogramming.h.
CStream& mrpt::utils::operator>> | ( | mrpt::utils::CStream & | in, |
std::pair< T1, T2 > & | obj | ||
) |
Template method to deserialize a STL pair.
Definition at line 146 of file stl_serialization.h.
References mrpt::format(), mrpt::utils::TTypeName< T >::get(), and THROW_EXCEPTION.
void mrpt::utils::printMap | ( | const std::map< T1, T2 > & | m | ) |
Print the given map m.
[in] | m | Template map |
Definition at line 130 of file stl_containers_utils.h.
References mrpt::utils::getMapAsString().
void mrpt::utils::printSTLContainer | ( | const T & | t | ) |
Print the given vector t.
[in] | t | Template vector |
Definition at line 85 of file stl_containers_utils.h.
References mrpt::utils::getSTLContainerAsString().
Referenced by mrpt::utils::printSTLContainerOfContainers().
void mrpt::utils::printSTLContainerOfContainers | ( | const T & | t | ) |
Print the given STL container of containers t.
[in] | t | Template STL container (containing other containers) |
Definition at line 94 of file stl_containers_utils.h.
References mrpt::utils::printSTLContainer().
|
inline |
This function creates a function from an object and a member function.
It has three overloads, for zero, one and two parameters in the function.
Definition at line 283 of file metaprogramming.h.
|
inline |
Definition at line 286 of file metaprogramming.h.
|
inline |
Definition at line 289 of file metaprogramming.h.
Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019 |