maliput_malidrive
UniqueIntegerProvider Class Reference

Detailed Description

Class to handle the index arithmetic and get always an increasing integer as ID.

#include <src/maliput_malidrive/builder/id_providers.h>

Public Member Functions

 UniqueIntegerProvider ()=delete
 
 UniqueIntegerProvider (int base_id)
 Constructs an UniqueIntegerProvider. More...
 
int new_id ()
 
int get_last_id () const
 

Constructor & Destructor Documentation

◆ UniqueIntegerProvider() [1/2]

◆ UniqueIntegerProvider() [2/2]

UniqueIntegerProvider ( int  base_id)
explicit

Constructs an UniqueIntegerProvider.

Parameters
base_idis the base integer to be used as ID and start incrementing.

Member Function Documentation

◆ get_last_id()

int get_last_id ( ) const
Returns
The latest provided ID.

◆ new_id()

int new_id ( )
Returns
A new ID, which differs from the latest provided in +1.

The documentation for this class was generated from the following file: