Go to the documentation of this file.
40#include<initializer_list>
57 return D::opt_prefix_len>0 && std::strlen(s)>D::opt_prefix_len && std::strncmp(s,D::opt_prefix,D::opt_prefix_len)==0;
60 static std::optional<const char*>
name(
typename D::Enum v){
61 for(
const auto& vn: D::value_to_name){
if(vn.value==v)
return vn.name; }
65 static std::optional<typename D::Enum>
value(
int i){
66 for(
const auto& vn: D::value_to_name){
if((
int)vn.value==i)
return vn.value; }
70 static std::optional<typename D::Enum>
value(
const char* n){
71 for(
const auto& vn: D::value_to_name){
72 if(std::strcmp(vn.name,n)==0)
return vn.value;
73 if(
_starts_with_prefix(vn.name) && std::strcmp(vn.name+D::opt_prefix_len,n)==0)
return vn.value;
79 std::map<int,std::vector<std::string>> ret;
80 for(
const auto& vn: D::value_to_name){
81 auto [I,_]=ret.insert({(int)vn.value,{vn.name,}});
static const bool _starts_with_prefix(const char *s)
static std::map< int, std::vector< std::string > > all_values_to_names()
static std::optional< typename D::Enum > value(int i)
static std::optional< const char * > name(typename D::Enum v)
static std::optional< typename D::Enum > value(const char *n)
static constexpr auto enum_name
This page is part of the
OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak
Bořek Patzák
Project e-mail:
oofem@fsv.cvut.cz
Generated at for OOFEM by
doxygen
1.15.0 written by Dimitri van Heesch,
© 1997-2011