OOFEM 3.0
Loading...
Searching...
No Matches
oofem::EnumTraits< Enum > Struct Template Reference

#include <enum.h>

Public Types

typedef EnumData< Enum > D

Static Public Member Functions

static const bool _starts_with_prefix (const char *s)
static std::optional< const char * > name (typename D::Enum v)
static std::optional< typename D::Enum > value (int i)
static std::optional< typename D::Enum > value (const char *n)
static std::map< int, std::vector< std::string > > all_values_to_names ()

Static Public Attributes

static constexpr auto enum_name = D::enum_name

Detailed Description

template<typename Enum>
struct oofem::EnumTraits< Enum >

Definition at line 51 of file enum.h.

Member Typedef Documentation

◆ D

template<typename Enum>
typedef EnumData<Enum> oofem::EnumTraits< Enum >::D

Definition at line 52 of file enum.h.

Member Function Documentation

◆ _starts_with_prefix()

template<typename Enum>
const bool oofem::EnumTraits< Enum >::_starts_with_prefix ( const char * s)
inlinestatic

Definition at line 56 of file enum.h.

Referenced by all_values_to_names(), and value().

◆ all_values_to_names()

template<typename Enum>
std::map< int, std::vector< std::string > > oofem::EnumTraits< Enum >::all_values_to_names ( )
inlinestatic

Definition at line 78 of file enum.h.

References _starts_with_prefix().

◆ name()

template<typename Enum>
std::optional< const char * > oofem::EnumTraits< Enum >::name ( typename D::Enum v)
inlinestatic

Definition at line 60 of file enum.h.

◆ value() [1/2]

template<typename Enum>
std::optional< typename D::Enum > oofem::EnumTraits< Enum >::value ( const char * n)
inlinestatic

Definition at line 70 of file enum.h.

References _starts_with_prefix().

◆ value() [2/2]

template<typename Enum>
std::optional< typename D::Enum > oofem::EnumTraits< Enum >::value ( int i)
inlinestatic

Definition at line 65 of file enum.h.

Member Data Documentation

◆ enum_name

template<typename Enum>
auto oofem::EnumTraits< Enum >::enum_name = D::enum_name
staticconstexpr

Definition at line 54 of file enum.h.


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

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