#include <indexed_list.h>
|
T * | Add (const I id, const T &object) |
| copy object into the container. If the id is already exist, overwrite the object in the container. More...
|
|
T * | Find (const I id) |
| Find object by id in the container. More...
|
|
const T * | Find (const I id) const |
| Find object by id in the container. More...
|
|
const std::vector< const T * > & | Items () const |
| List all the items in the container. More...
|
|
const std::unordered_map< I, T > & | Dict () const |
| List all the items in the container. More...
|
|
IndexedList & | operator= (const IndexedList &other) |
| Copy the container with objects. More...
|
|
◆ Add()
template<typename I, typename T>
copy object into the container. If the id is already exist, overwrite the object in the container.
- Parameters
-
id | the id of the object |
object | the const reference of the objected to be copied to the container. |
- Returns
- The pointer to the object in the container.
◆ Dict()
template<typename I, typename T>
List all the items in the container.
- Returns
- the unordered_map of ids and objects in the container.
◆ Find() [1/2]
template<typename I, typename T>
Find object by id in the container.
- Parameters
-
- Returns
- the raw pointer to the object if found.
-
nullptr if the object is not found.
◆ Find() [2/2]
template<typename I, typename T>
Find object by id in the container.
- Parameters
-
- Returns
- the raw pointer to the object if found.
-
nullptr if the object is not found.
◆ Items()
template<typename I, typename T>
List all the items in the container.
- Returns
- the list of const raw pointers of the objects in the container.
◆ operator=()
template<typename I, typename T>
Copy the container with objects.
The documentation for this class was generated from the following file: