template class mrpt::containers::list_searchable

Overview

This class implements a STL container with features of both, a std::set and a std::list.

Defined in #include <mrpt/containers/list_searchable.h>

#include <mrpt/containers/list_searchable.h>

template <class T>
class list_searchable: public std::list< T >
{
public:
    // fields

    T elements;

    // methods

    void insert(const T& o);
    std::list<T>::iterator find(const T& i);
    std::list<T>::const_iterator find(const T& i) const;

    template <typename PTR>
    std::list<T>::iterator find_ptr_to(const PTR ptr);

    template <typename PTR>
    std::list<T>::const_iterator find_ptr_to(const PTR ptr) const;
};

Fields

T elements

STL member.

Methods

template <typename PTR>
std::list<T>::iterator find_ptr_to(const PTR ptr)

Finds an element in a list of smart pointers, having “->pointer()”, such as it matches a given plain pointer “ptr”.

template <typename PTR>
std::list<T>::const_iterator find_ptr_to(const PTR ptr) const

Finds an element in a list of smart pointers, having “->pointer()”, such as it matches a given plain pointer “ptr”.