OpenMS
Loading...
Searching...
No Matches
EnumHelpers.h File Reference
#include <OpenMS/CONCEPT/Types.h>
#include <OpenMS/CONCEPT/Exception.h>
#include <algorithm>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  OpenMS
 Main OpenMS namespace.
 
namespace  OpenMS::Helpers
 

Functions

template<class ContainerType >
Size indexOf (const ContainerType &cont, const typename ContainerType::value_type &val)
 
template<class EnumType >
std::vector< std::string > enumNames (const std::string *names, EnumType size_value)
 Returns the names of all enum values, i.e. the first size_value entries of names.
 
template<class EnumType >
const std::string & enumToName (const std::string *names, EnumType value, EnumType size_value, const char *size_name, const char *function)
 Converts an enum value to its entry in names.
 
template<class EnumType >
EnumType enumFromName (const std::string *names, EnumType size_value, const std::string &name, const char *message, const char *function)
 Converts a name to the enum value at its index in names.