The Vish Visualization Shell 0.3
Vish
Public Member Functions | Public Attributes | List of all members
Wizt::LabelSet Class Reference

A mapping from integer values to Labels, i.e. More...

#include <ocean/shrimp/Label.hpp>

Inheritance diagram for Wizt::LabelSet:

Public Member Functions

bool addSelection (const string &SelectionName)
 Create a new entry in the Selections and initialize it with Unselected, if it's not there yet.
 
 LabelSet (const LabelSet &)=default
 Copy constructor.
 
 LabelSet (const std::initializer_list< Label > &list)
 Construct from list of Labels.
 

Public Attributes

Label_t max = std::numeric_limits<Label_t>::max()
 Maximally allowed numerical label value.
 
Label_t min = 0
 Minimimally allowed numerical label value.
 
std::unordered_map< string, Label_t > Selections
 A selection is the picking of one specific label out of the set of all labels.
 

Detailed Description

A mapping from integer values to Labels, i.e.

basic and extendable information on each integer, plus support to perform multiple selections, i.e. selecting one item out of the set.

Member Function Documentation

◆ addSelection()

bool Wizt::LabelSet::addSelection ( const string &  SelectionName)

Create a new entry in the Selections and initialize it with Unselected, if it's not there yet.

Returns
true if the selection was not there yet, but is now.

References Selections.

Member Data Documentation

◆ Selections

std::unordered_map<string, Label_t> Wizt::LabelSet::Selections

A selection is the picking of one specific label out of the set of all labels.

Such a selection is selected with an arbitrary name, which identifies the selection.

Referenced by addSelection().