LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
util::MultipleChoiceSelection< Choices > Class Template Reference

Helper to select one among multiple choices via strings. More...

#include "MultipleChoiceSelection.h"

Inheritance diagram for util::MultipleChoiceSelection< Choices >:
util::MultipleChoiceSelectionBase

Public Types

using Choices_t = Choices
 Type of the underlying choice. More...
 
using Option_t = details::MultipleChoiceSelectionOption_t< Choices_t >
 

Public Member Functions

 MultipleChoiceSelection ()=default
 
template<typename... Options>
 MultipleChoiceSelection (std::initializer_list< Option_t > options)
 Constructor: adds the specified options. More...
 
template<typename... Aliases>
auto addOption (Choices_t value, std::string label, Aliases...aliases) -> Option_t const &
 
template<typename... Aliases>
auto addAlias (Choices_t value, Aliases...aliases) -> std::enable_if_t< details::AllConvertibleToStrings_v< Aliases... >, Option_t const & >
 
template<typename... Aliases>
auto addAlias (Option_t const &option, Aliases...aliases) -> std::enable_if_t< details::AllConvertibleToStrings_v< Aliases... >, Option_t const & >
 
template<typename... Aliases>
auto recordLabels (std::size_t index, std::string alias, Aliases...moreAliases) -> std::enable_if_t< details::AllConvertibleToStrings_v< Aliases... >>
 
Option management
std::size_t size () const
 Returns the number of available options. More...
 
bool empty () const
 Returns whether there is no available option. More...
 
template<typename... Aliases>
Option_t const & addOption (Choices_t value, std::string label, Aliases...aliases)
 Adds a new option to the selector. More...
 
template<typename... Aliases>
std::enable_if_t< details::AllConvertibleToStrings_v< Aliases... >, Option_t const & > addAlias (Choices_t value, Aliases...aliases)
 Adds aliases to an existing option. More...
 
template<typename... Aliases>
std::enable_if_t< details::AllConvertibleToStrings_v< Aliases... >, Option_t const & > addAlias (Option_t const &option, Aliases...aliases)
 Adds labels to an existing option. More...
 
bool hasOption (Choices_t value) const
 Returns whether the selector has an option with the specified value. More...
 
bool hasOption (std::string const &label) const
 Returns whether the selector has an option with the specified label. More...
 
bool hasOption (Option_t const &option) const
 Returns if the specified option is present in the selector (by value). More...
 
Option access
Option_t const & get (Choices_t value) const
 Returns the specified option. More...
 
Option_t const & get (std::string const &label) const
 Returns the option with the specified label. More...
 
Option_t const & parse (std::string const &label) const
 Returns the option matching the specified label. More...
 
Presentation and dumping

— BEGIN -------------------------------------------------------------—

std::string optionListString (std::string const &sep=", ") const
 Returns a string with the (main) name of all options. More...
 
std::string optionListDump (std::string const &indent, std::string const &firstIndent) const
 Returns a string with all the options, one per line. More...
 
std::string optionListDump (std::string const &indent="") const
 Returns a string with all the options, one per line. More...
 

Private Types

using Selector_t = MultipleChoiceSelection< Choices >
 This type. More...
 
using OptionList_t = std::vector< Option_t >
 Type of collection of options. More...
 
using OptionLabelMap_t = std::map< std::string, std::size_t, details::SorterFrom< details::CaseInsensitiveComparer >>
 Type of label index (associative container: label to option index). More...
 

Private Member Functions

Option_t const & addOption (Option_t &&option)
 Moves the specified option into the list of registered options. More...
 
void recordLabel (std::string &&label, std::size_t index)
 
template<typename... Aliases>
std::enable_if_t< details::AllConvertibleToStrings_v< Aliases... > > recordLabels (std::size_t index, std::string alias, Aliases...moreAliases)
 
void unregisterLabel (std::string const &label)
 Removes the specified label from the register. More...
 
OptionList_t::const_iterator findOption (Choices_t value) const
 Returns an iterator to the option with label, or npos if none. More...
 
OptionList_t::iterator findOption (Choices_t value)
 Returns an iterator to the option with label, or npos if none. More...
 
std::size_t findOptionIndex (Choices_t value) const
 Returns the index of the option with label, or npos if none. More...
 
std::size_t findOptionIndex (std::string const &label) const
 Returns the index of the option with label, or npos if none. More...
 

Private Attributes

OptionList_t fOptions
 The list of registered objects. More...
 
OptionLabelMap_t fLabelToOptionIndex
 Map from labels to option index in fOptions. More...
 

Static Private Attributes

static constexpr auto npos = std::numeric_limits<std::size_t>::max()
 Special value. More...
 

Detailed Description

template<typename Choices>
class util::MultipleChoiceSelection< Choices >

Helper to select one among multiple choices via strings.

Template Parameters
Choicestype describing the choices
Note
If the type to describe the choice is a string, its value still need to be explicitly added as an option label.

Definition at line 200 of file MultipleChoiceSelection.h.

Member Typedef Documentation

template<typename Choices >
using util::MultipleChoiceSelection< Choices >::Choices_t = Choices

Type of the underlying choice.

Definition at line 217 of file MultipleChoiceSelection.h.

Definition at line 219 of file MultipleChoiceSelection.h.

template<typename Choices >
using util::MultipleChoiceSelection< Choices >::OptionLabelMap_t = std::map<std::string, std::size_t, details::SorterFrom<details::CaseInsensitiveComparer>>
private

Type of label index (associative container: label to option index).

Definition at line 369 of file MultipleChoiceSelection.h.

template<typename Choices >
using util::MultipleChoiceSelection< Choices >::OptionList_t = std::vector<Option_t>
private

Type of collection of options.

— END ------------------------------------------------------------——

Definition at line 365 of file MultipleChoiceSelection.h.

template<typename Choices >
using util::MultipleChoiceSelection< Choices >::Selector_t = MultipleChoiceSelection<Choices>
private

This type.

Definition at line 214 of file MultipleChoiceSelection.h.

Constructor & Destructor Documentation

template<typename Choices >
util::MultipleChoiceSelection< Choices >::MultipleChoiceSelection ( )
default

Default constructor: flags are set to DefaultFlags, options may be added later.

template<typename Choices >
template<typename... Options>
util::MultipleChoiceSelection< Choices >::MultipleChoiceSelection ( std::initializer_list< Option_t options)

Constructor: adds the specified options.

Template Parameters
Optionsa number of Option_t objects
Parameters
optionsa list of options to add to the selector

All specified options are added as with addOption().

Definition at line 749 of file MultipleChoiceSelection.h.

751 {
752  for (Option_t option : options)
753  addOption(std::move(option));
754 } // util::MultipleChoiceSelection<>::MultipleChoiceSelection()
Option_t const & addOption(Choices_t value, std::string label, Aliases...aliases)
Adds a new option to the selector.
details::MultipleChoiceSelectionOption_t< Choices_t > Option_t

Member Function Documentation

template<typename Choices >
template<typename... Aliases>
std::enable_if_t<details::AllConvertibleToStrings_v<Aliases...>, Option_t const&> util::MultipleChoiceSelection< Choices >::addAlias ( Choices_t  value,
Aliases...  aliases 
)

Adds aliases to an existing option.

Template Parameters
Argsany number of std::string
Parameters
valuethe value of the option to assign labels to
aliasesthe additional alias(es) to assign to this option
Returns
the option being changed
Exceptions
UnknownOptionErrorif no option with value is registered yet
template<typename Choices >
template<typename... Aliases>
std::enable_if_t<details::AllConvertibleToStrings_v<Aliases...>, Option_t const&> util::MultipleChoiceSelection< Choices >::addAlias ( Option_t const &  option,
Aliases...  aliases 
)

Adds labels to an existing option.

Template Parameters
Aliasesany number of std::string
Parameters
optionthe option to assign labels to
aliasesthe additional alias(es) to assign to this option
Returns
the option being changed
Exceptions
UnknownOptionErrorif no option with value is registered yet

The option with the same value as the option argument is assigned the specified aliases.

template<typename Choices >
template<typename... Aliases>
auto util::MultipleChoiceSelection< Choices >::addAlias ( Choices_t  value,
Aliases...  aliases 
) -> std::enable_if_t<details::AllConvertibleToStrings_v<Aliases...>, Option_t const&>

Definition at line 783 of file MultipleChoiceSelection.h.

References util::details::MultipleChoiceSelectionOption_t< Choices >::value(), and util::details::MultipleChoiceSelectionOption_t< Choices >::value_as_string().

785 {
786  std::size_t const index = findOptionIndex(value);
787  if (index >= fOptions.size()) throw UnknownOptionError(Option_t::value_as_string(value, ""));
788  recordLabels(index, aliases...);
789  return fOptions[index].addAlias(std::move(aliases)...);
790 } // util::MultipleChoiceSelection<>::addAlias()
double value
Definition: spectrum.C:18
OptionList_t fOptions
The list of registered objects.
std::size_t findOptionIndex(Choices_t value) const
Returns the index of the option with label, or npos if none.
std::enable_if_t< details::AllConvertibleToStrings_v< Aliases... > > recordLabels(std::size_t index, std::string alias, Aliases...moreAliases)
template<typename Choices >
template<typename... Aliases>
auto util::MultipleChoiceSelection< Choices >::addAlias ( Option_t const &  option,
Aliases...  aliases 
) -> std::enable_if_t<details::AllConvertibleToStrings_v<Aliases...>, Option_t const&>

Definition at line 795 of file MultipleChoiceSelection.h.

References util::details::MultipleChoiceSelectionOption_t< Choices >::addAlias().

797 {
798  return addAlias(option.value(), std::move(aliases)...);
799 } // util::MultipleChoiceSelection<>::addAlias()
std::enable_if_t< details::AllConvertibleToStrings_v< Aliases... >, Option_t const & > addAlias(Choices_t value, Aliases...aliases)
Adds aliases to an existing option.
template<typename Choices >
template<typename... Aliases>
Option_t const& util::MultipleChoiceSelection< Choices >::addOption ( Choices_t  value,
std::string  label,
Aliases...  aliases 
)

Adds a new option to the selector.

Template Parameters
Aliasesany number of std::string
Parameters
valuethe value of the new option
labelthe first label to associate to the option
aliasesadditional aliases for this option
Returns
the newly created option
Exceptions
OptionAlreadyExistsErrorif there is already an option with value
See also
addAlias()

An option must always have a label; aliases are instead optional. There must be no existing option with the specified value, otherwise an exception will be thrown with the label of the existing option. To add aliases to an existing option, use addAlias() instead. Currently, it is not possible to change a label after having added it.

template<typename Choices >
auto util::MultipleChoiceSelection< Choices >::addOption ( Option_t &&  option)
private

Moves the specified option into the list of registered options.

Parameters
optionthe option to move
Returns
the newly added option
Exceptions
OptionAlreadyExistsErrorif there is already an option with the same value or any of the labels; in that case, label() method of the exception will report the offending label of option or its name if it is the value to be duplicated

Definition at line 896 of file MultipleChoiceSelection.h.

References util::details::MultipleChoiceSelectionOption_t< Choices >::labels(), and util::size().

897 {
898  std::size_t const newOptionIndex = size();
899 
900  fOptions.push_back(std::move(option));
901  Option_t const& newOption = fOptions.back();
902  auto const& labels = newOption.labels();
903  for (auto iLabel = labels.begin(); iLabel != labels.end(); ++iLabel) {
904  try {
905  recordLabel(std::string{*iLabel}, newOptionIndex);
906  }
907  catch (OptionAlreadyExistsError const&) {
908  // we attempt to offer a strong guarantee here,
909  // that the object is restored in the state it was before the call
910 
911  // remove the new entries from the index
912  // (*iLabel was not inserted, and all labels before it were new)
913  for (auto iNewLabel = labels.begin(); iNewLabel != iLabel; ++iNewLabel)
914  unregisterLabel(*iNewLabel);
915 
916  // remove the new option from the list
917  fOptions.pop_back();
918 
919  // let the caller handle the rest
920  throw;
921  } // try ... catch
922  } // for labels
923 
924  return newOption;
925 } // util::MultipleChoiceSelection<>::addOption()
void recordLabel(std::string &&label, std::size_t index)
void unregisterLabel(std::string const &label)
Removes the specified label from the register.
OptionList_t fOptions
The list of registered objects.
details::MultipleChoiceSelectionOption_t< Choices_t > Option_t
std::size_t size() const
Returns the number of available options.
template<typename Choices >
template<typename... Aliases>
auto util::MultipleChoiceSelection< Choices >::addOption ( Choices_t  value,
std::string  label,
Aliases...  aliases 
) -> Option_t const&

Definition at line 773 of file MultipleChoiceSelection.h.

References util::details::MultipleChoiceSelectionOption_t< Choices >::value().

776 {
777  return addOption({value, std::move(label), std::move(aliases)...});
778 } // util::MultipleChoiceSelection<>::addOption()
Option_t const & addOption(Choices_t value, std::string label, Aliases...aliases)
Adds a new option to the selector.
double value
Definition: spectrum.C:18
template<typename Choices >
bool util::MultipleChoiceSelection< Choices >::empty ( ) const

Returns whether there is no available option.

Definition at line 765 of file MultipleChoiceSelection.h.

766 {
767  return fOptions.empty();
768 }
OptionList_t fOptions
The list of registered objects.
template<typename Choices >
auto util::MultipleChoiceSelection< Choices >::findOption ( Choices_t  value) const
private

Returns an iterator to the option with label, or npos if none.

Definition at line 976 of file MultipleChoiceSelection.h.

References util::details::MultipleChoiceSelectionOption_t< Choices >::value().

978 {
979  auto const matchValue = [value](Option_t const& option) { return option.value() == value; };
980  return std::find_if(fOptions.begin(), fOptions.end(), matchValue);
981 } // util::MultipleChoiceSelection<>::findOption(value) const
double value
Definition: spectrum.C:18
OptionList_t fOptions
The list of registered objects.
details::MultipleChoiceSelectionOption_t< Choices_t > Option_t
template<typename Choices >
auto util::MultipleChoiceSelection< Choices >::findOption ( Choices_t  value)
private

Returns an iterator to the option with label, or npos if none.

Definition at line 985 of file MultipleChoiceSelection.h.

References util::details::MultipleChoiceSelectionOption_t< Choices >::value().

987 {
988  auto const matchValue = [value](Option_t const& option) { return option.value() == value; };
989  return std::find_if(fOptions.begin(), fOptions.end(), matchValue);
990 } // util::MultipleChoiceSelection<>::findOption(value)
double value
Definition: spectrum.C:18
OptionList_t fOptions
The list of registered objects.
details::MultipleChoiceSelectionOption_t< Choices_t > Option_t
template<typename Choices >
std::size_t util::MultipleChoiceSelection< Choices >::findOptionIndex ( Choices_t  value) const
private

Returns the index of the option with label, or npos if none.

Definition at line 994 of file MultipleChoiceSelection.h.

References d, and util::size().

995 {
996  auto const d = static_cast<std::size_t>(std::distance(fOptions.begin(), findOption(value)));
997  return (d >= size()) ? npos : d;
998 } // util::MultipleChoiceSelection<>::findOptionIndex(value) const
static constexpr auto npos
Special value.
Float_t d
Definition: plot.C:235
double value
Definition: spectrum.C:18
OptionList_t::const_iterator findOption(Choices_t value) const
Returns an iterator to the option with label, or npos if none.
OptionList_t fOptions
The list of registered objects.
std::size_t size() const
Returns the number of available options.
template<typename Choices >
std::size_t util::MultipleChoiceSelection< Choices >::findOptionIndex ( std::string const &  label) const
private

Returns the index of the option with label, or npos if none.

Definition at line 1002 of file MultipleChoiceSelection.h.

1003 {
1004  auto const iOption = fLabelToOptionIndex.find(label);
1005  return (iOption == fLabelToOptionIndex.end()) ? npos : iOption->second;
1006 } // util::MultipleChoiceSelection<>::findOptionIndex(string) const
static constexpr auto npos
Special value.
OptionLabelMap_t fLabelToOptionIndex
Map from labels to option index in fOptions.
template<typename Choices >
auto util::MultipleChoiceSelection< Choices >::get ( Choices_t  value) const

Returns the specified option.

Parameters
valuevalue of the requested option
Returns
the requested option
Exceptions
UnknownOptionErrorif there is no available option with value (the string of the exception is empty)

Definition at line 824 of file MultipleChoiceSelection.h.

References util::details::MultipleChoiceSelectionOption_t< Choices >::value(), and util::details::MultipleChoiceSelectionOption_t< Choices >::value_as_string().

825 {
826  auto const iOption = findOption(value);
827  if (iOption == fOptions.end())
828  throw UnknownOptionError(Option_t::value_as_string(value).value_or(""));
829  return *iOption;
830 } // util::MultipleChoiceSelection<>::get(value)
double value
Definition: spectrum.C:18
OptionList_t::const_iterator findOption(Choices_t value) const
Returns an iterator to the option with label, or npos if none.
OptionList_t fOptions
The list of registered objects.
template<typename Choices >
auto util::MultipleChoiceSelection< Choices >::get ( std::string const &  label) const

Returns the option with the specified label.

Parameters
labellabel of the requested option
Returns
the requested option
Exceptions
UnknownOptionErrorif there is no available option with label (the string of the exception shows label value)

Definition at line 834 of file MultipleChoiceSelection.h.

835 {
836  auto const iLabelIndexPair = fLabelToOptionIndex.find(label);
837  if (iLabelIndexPair == fLabelToOptionIndex.end()) { throw UnknownOptionError(label); }
838  assert(iLabelIndexPair->second < fOptions.size());
839  return fOptions[iLabelIndexPair->second];
840 } // util::MultipleChoiceSelection<>::get(string)
OptionLabelMap_t fLabelToOptionIndex
Map from labels to option index in fOptions.
OptionList_t fOptions
The list of registered objects.
template<typename Choices >
bool util::MultipleChoiceSelection< Choices >::hasOption ( Choices_t  value) const

Returns whether the selector has an option with the specified value.

Definition at line 803 of file MultipleChoiceSelection.h.

804 {
805  return findOption(value) != fOptions.end();
806 }
double value
Definition: spectrum.C:18
OptionList_t::const_iterator findOption(Choices_t value) const
Returns an iterator to the option with label, or npos if none.
OptionList_t fOptions
The list of registered objects.
template<typename Choices >
bool util::MultipleChoiceSelection< Choices >::hasOption ( std::string const &  label) const

Returns whether the selector has an option with the specified label.

Definition at line 810 of file MultipleChoiceSelection.h.

811 {
812  return fLabelToOptionIndex.find(label) != fLabelToOptionIndex.end();
813 } // util::MultipleChoiceSelection<>::hasOption(string)
OptionLabelMap_t fLabelToOptionIndex
Map from labels to option index in fOptions.
template<typename Choices >
bool util::MultipleChoiceSelection< Choices >::hasOption ( Option_t const &  option) const

Returns if the specified option is present in the selector (by value).

Definition at line 817 of file MultipleChoiceSelection.h.

References util::details::MultipleChoiceSelectionOption_t< Choices >::value().

818 {
819  return hasOption(option.value());
820 }
bool hasOption(Choices_t value) const
Returns whether the selector has an option with the specified value.
template<typename Choices >
std::string util::MultipleChoiceSelection< Choices >::optionListDump ( std::string const &  indent,
std::string const &  firstIndent 
) const

Returns a string with all the options, one per line.

Definition at line 872 of file MultipleChoiceSelection.h.

References art::detail::indent().

875 {
876  using namespace std::string_literals;
877 
878  auto iOption = fOptions.begin();
879  auto const oend = fOptions.end();
880 
881  if (iOption == oend) return firstIndent + "<no options>\n"s;
882 
883  std::string s{firstIndent};
884  s += iOption->dump();
885  s += '\n';
886  while (++iOption != oend) {
887  s += indent;
888  s += iOption->dump();
889  s += '\n';
890  } // while
891  return s;
892 } // util::MultipleChoiceSelection<>::optionListDump()
std::string indent(std::size_t const i)
OptionList_t fOptions
The list of registered objects.
template<typename Choices >
std::string util::MultipleChoiceSelection< Choices >::optionListDump ( std::string const &  indent = "") const
inline

Returns a string with all the options, one per line.

Definition at line 355 of file MultipleChoiceSelection.h.

References art::detail::indent().

356  {
357  return optionListDump(indent, indent);
358  }
std::string indent(std::size_t const i)
std::string optionListDump(std::string const &indent, std::string const &firstIndent) const
Returns a string with all the options, one per line.
template<typename Choices >
std::string util::MultipleChoiceSelection< Choices >::optionListString ( std::string const &  sep = ", ") const

Returns a string with the (main) name of all options.

Definition at line 852 of file MultipleChoiceSelection.h.

854 {
855  using namespace std::string_literals;
856 
857  auto iOption = fOptions.begin();
858  auto const oend = fOptions.end();
859 
860  if (iOption == oend) return "<no options>"s;
861 
862  std::string s{*iOption};
863  while (++iOption != oend) {
864  s += sep;
865  s += *iOption;
866  } // while
867  return s;
868 } // util::MultipleChoiceSelection<>::optionListString()
OptionList_t fOptions
The list of registered objects.
template<typename Choices >
auto util::MultipleChoiceSelection< Choices >::parse ( std::string const &  label) const

Returns the option matching the specified label.

Parameters
labellabel of the requested option
Returns
the requested option
Exceptions
UnknownOptionErrorif there is no available option with label (the string of the exception shows label value)

Definition at line 844 of file MultipleChoiceSelection.h.

846 {
847  return get(label);
848 } // util::MultipleChoiceSelection<>::parse()
template<typename Choices >
void util::MultipleChoiceSelection< Choices >::recordLabel ( std::string &&  label,
std::size_t  index 
)
private

Associates label to the option at index.

Exceptions
OptionAlreadyExistsErrorif there is already an option with label

Definition at line 929 of file MultipleChoiceSelection.h.

930 {
931 
932  auto const iOption = fLabelToOptionIndex.lower_bound(label);
933 
934  // check for duplicate entries: if iOption is not `end()`, it points to an
935  // element whose key is either greater or equal (equivalent) to `label`;
936  // if the key is greater than `label`, we are good:
937  // we check it by requiring that `label` is smaller than the key;
938  // `key_compare(a, b)` comparison is equivalent to `a < b`,
939  if ((iOption != fLabelToOptionIndex.end()) &&
940  !OptionLabelMap_t::key_compare()(label, iOption->first)) {
941  throw OptionAlreadyExistsError(label); // maybe too terse?
942  }
943 
944  // the actual recording, at last:
945  fLabelToOptionIndex.emplace_hint(iOption, std::move(label), index);
946 
947 } // util::MultipleChoiceSelection<>::recordLabel()
OptionLabelMap_t fLabelToOptionIndex
Map from labels to option index in fOptions.
template<typename Choices >
template<typename... Aliases>
std::enable_if_t<details::AllConvertibleToStrings_v<Aliases...> > util::MultipleChoiceSelection< Choices >::recordLabels ( std::size_t  index,
std::string  alias,
Aliases...  moreAliases 
)
private

Associates all labels to the option at index.

Exceptions
OptionAlreadyExistsErrorif there is already an option with any of the aliases
template<typename Choices >
template<typename... Aliases>
auto util::MultipleChoiceSelection< Choices >::recordLabels ( std::size_t  index,
std::string  alias,
Aliases...  moreAliases 
) -> std::enable_if_t<details::AllConvertibleToStrings_v<Aliases...>>

Definition at line 952 of file MultipleChoiceSelection.h.

956 {
957  try {
958  recordLabel(std::move(alias), index);
959  if constexpr (sizeof...(moreAliases) > 0U) recordLabels(index, std::move(moreAliases)...);
960  }
961  catch (OptionAlreadyExistsError const&) {
962  unregisterLabel(alias); // if recordLabel() call threw alias is still intact
963  throw;
964  }
965 } // util::MultipleChoiceSelection<>::recordLabels()
void recordLabel(std::string &&label, std::size_t index)
STL namespace.
void unregisterLabel(std::string const &label)
Removes the specified label from the register.
std::enable_if_t< details::AllConvertibleToStrings_v< Aliases... > > recordLabels(std::size_t index, std::string alias, Aliases...moreAliases)
template<typename Choices >
std::size_t util::MultipleChoiceSelection< Choices >::size ( ) const

Returns the number of available options.

Definition at line 758 of file MultipleChoiceSelection.h.

759 {
760  return fOptions.size();
761 }
OptionList_t fOptions
The list of registered objects.
template<typename Choices >
void util::MultipleChoiceSelection< Choices >::unregisterLabel ( std::string const &  label)
private

Removes the specified label from the register.

Definition at line 969 of file MultipleChoiceSelection.h.

970 {
971  fLabelToOptionIndex.erase(label);
972 }
OptionLabelMap_t fLabelToOptionIndex
Map from labels to option index in fOptions.

Member Data Documentation

template<typename Choices >
OptionLabelMap_t util::MultipleChoiceSelection< Choices >::fLabelToOptionIndex
private

Map from labels to option index in fOptions.

Definition at line 374 of file MultipleChoiceSelection.h.

template<typename Choices >
OptionList_t util::MultipleChoiceSelection< Choices >::fOptions
private

The list of registered objects.

Definition at line 371 of file MultipleChoiceSelection.h.

template<typename Choices >
constexpr auto util::MultipleChoiceSelection< Choices >::npos = std::numeric_limits<std::size_t>::max()
staticprivate

Special value.

Definition at line 416 of file MultipleChoiceSelection.h.


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