Project

General

Profile

Actions

Task #4240

closed

Feature #4238: Increase independence of RoutingTable.

Replace Map's data structure

Added by Nicholas Gordon over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Currently Map uses a std::list, which is only optimal for insertion. Generally speaking, C++ encourages the use of std::vector as the "general purpose" container. However, each name must be unique, so an unordered set would be better. However, since we need lookup on two indices (name and mapping number), we can use a Boost multi_index container.

Alternatively, we could make the mapping number a function of the router name, and then the router name actually can be used as both keys. Currently, mapping numbers are sequentially assigned.

Actions

Also available in: Atom PDF