Apollo 11.0
自动驾驶开放平台
apollo::planning::ThreadSafeIndexedList< I, T > 模板类 参考

#include <indexed_list.h>

类 apollo::planning::ThreadSafeIndexedList< I, T > 继承关系图:
apollo::planning::ThreadSafeIndexedList< I, T > 的协作图:

Public 成员函数

T * Add (const I id, const T &object)
 
T * Find (const I id)
 
std::vector< const T * > Items () const
 
- Public 成员函数 继承自 apollo::planning::IndexedList< I, T >
T * Add (const I id, const T &object)
 copy object into the container.
 
T * Find (const I id)
 Find object by id in the container
 
const T * Find (const I id) const
 Find object by id in the container
 
const std::vector< const T * > & Items () const
 List all the items in the container.
 
const std::unordered_map< I, T > & Dict () const
 List all the items in the container.
 
IndexedListoperator= (const IndexedList &other)
 Copy the container with objects.
 

详细描述

template<typename I, typename T>
class apollo::planning::ThreadSafeIndexedList< I, T >

在文件 indexed_list.h109 行定义.

成员函数说明

◆ Add()

template<typename I , typename T >
T * apollo::planning::ThreadSafeIndexedList< I, T >::Add ( const I  id,
const T &  object 
)
inline

在文件 indexed_list.h111 行定义.

111 {
112 boost::unique_lock<boost::shared_mutex> writer_lock(mutex_);
113 return IndexedList<I, T>::Add(id, object);
114 }
T * Add(const I id, const T &object)
copy object into the container.

◆ Find()

template<typename I , typename T >
T * apollo::planning::ThreadSafeIndexedList< I, T >::Find ( const I  id)
inline

在文件 indexed_list.h116 行定义.

116 {
117 boost::shared_lock<boost::shared_mutex> reader_lock(mutex_);
118 return IndexedList<I, T>::Find(id);
119 }
T * Find(const I id)
Find object by id in the container

◆ Items()

template<typename I , typename T >
std::vector< const T * > apollo::planning::ThreadSafeIndexedList< I, T >::Items ( ) const
inline

在文件 indexed_list.h121 行定义.

121 {
122 boost::shared_lock<boost::shared_mutex> reader_lock(mutex_);
124 }
const std::vector< const T * > & Items() const
List all the items in the container.

该类的文档由以下文件生成: