Eclipse SUMO - Simulation of Urban MObility
GUISelectedStorage::SingleTypeSelections Class Reference

A container for ids of selected objects of a certain type. More...

#include <GUISelectedStorage.h>

Collaboration diagram for GUISelectedStorage::SingleTypeSelections:

Public Member Functions

void clear ()
 Clears the list of selected objects. More...
 
void deselect (GUIGlID id)
 Deselects the object with the given id from the list of selected objects. More...
 
const std::set< GUIGlID > & getSelected () const
 Returns the list of selected ids. More...
 
bool isSelected (GUIGlID id)
 Returns the information whether the object with the given id is qithin the selection. More...
 
void save (const std::string &filename)
 Saves the list of selected objects to a file named as given. More...
 
void select (GUIGlID id)
 Adds the object with the given id to the list of selected objects. More...
 
 SingleTypeSelections ()
 Constructor. More...
 
 ~SingleTypeSelections ()
 Destructor. More...
 

Private Attributes

std::set< GUIGlIDmySelected
 The list of selected ids. More...
 

Detailed Description

A container for ids of selected objects of a certain type.

Definition at line 223 of file GUISelectedStorage.h.

Constructor & Destructor Documentation

◆ SingleTypeSelections()

GUISelectedStorage::SingleTypeSelections::SingleTypeSelections ( )

Constructor.

Definition at line 42 of file GUISelectedStorage.cpp.

◆ ~SingleTypeSelections()

GUISelectedStorage::SingleTypeSelections::~SingleTypeSelections ( )

Destructor.

Definition at line 45 of file GUISelectedStorage.cpp.

Member Function Documentation

◆ clear()

void GUISelectedStorage::SingleTypeSelections::clear ( )

Clears the list of selected objects.

Definition at line 67 of file GUISelectedStorage.cpp.

◆ deselect()

void GUISelectedStorage::SingleTypeSelections::deselect ( GUIGlID  id)

Deselects the object with the given id from the list of selected objects.

Parameters
[in]idThe id of the object

Definition at line 61 of file GUISelectedStorage.cpp.

◆ getSelected()

const std::set< GUIGlID > & GUISelectedStorage::SingleTypeSelections::getSelected ( ) const

Returns the list of selected ids.

Returns
A list containing the ids of all selected objects

Definition at line 79 of file GUISelectedStorage.cpp.

◆ isSelected()

bool GUISelectedStorage::SingleTypeSelections::isSelected ( GUIGlID  id)

Returns the information whether the object with the given id is qithin the selection.

Parameters
[in]idThe id of the object
Returns
Whether the object is selected

Definition at line 49 of file GUISelectedStorage.cpp.

◆ save()

void GUISelectedStorage::SingleTypeSelections::save ( const std::string &  filename)

Saves the list of selected objects to a file named as given.

Parameters
[in]filenameThe name of the file to save the list into

Definition at line 73 of file GUISelectedStorage.cpp.

References GUISelectedStorage::save().

◆ select()

void GUISelectedStorage::SingleTypeSelections::select ( GUIGlID  id)

Adds the object with the given id to the list of selected objects.

Parameters
[in]idThe id of the object

Definition at line 55 of file GUISelectedStorage.cpp.

Field Documentation

◆ mySelected

std::set<GUIGlID> GUISelectedStorage::SingleTypeSelections::mySelected
private

The list of selected ids.

Definition at line 263 of file GUISelectedStorage.h.


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