Gromacs  2024.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Enumerations
stringtoenumvalueconverter.h File Reference
#include <map>
#include <optional>
#include <string>
#include "gromacs/utility/enumerationhelpers.h"
#include "gromacs/utility/stringutil.h"
#include "stringcompare.h"
+ Include dependency graph for stringtoenumvalueconverter.h:

Description

Defines helper function object for class enumerations.

This helper type facilitates efficient lookup of values from an enumeration identified by a string, given a pre-declared mapping of values to such strings.

It is separated from enumerationhelpers.h because it is not as widely used and brings in several extra dependencies not needed by that header.

Author
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Classes

class  gmx::StringToEnumValueConverter< EnumType,, stringCompareType, stripStrings >
 A class to convert a string to an enum value of type EnumType. More...
 

Enumerations

enum  gmx::StripStrings : int { gmx::StripStrings::No, gmx::StripStrings::Yes }
 Enum class for whether StringToEnumValueConverter will strip strings of leading and trailing whitespace before comparison. More...