Flow123d  master-46b78a5
Public Member Functions | Private Attributes | List of all members
Input::Enum Class Reference

#include <accessors.hh>

Public Member Functions

 Enum ()
 
 Enum (int v)
 
 operator int () const
 
 operator unsigned int () const
 

Private Attributes

int val_
 

Detailed Description

Class that works as base type of all enum types. We need it to return integer from a Selection input without knowing exact enum type. This class contains int and is convertible to int.

Usage example: @CODE

 // in some general read function that do not know BCTypeEnum
 int bc_type_int = record.val<Enum>("bc_type_selection_key");
 ...
 // outside of general function
 enum { dirichlet, neumann, newton } BCTypeEnum;
 BCTypeEnum bc_type = bc_typ_int;

@ENDCODE

Definition at line 119 of file accessors.hh.

Constructor & Destructor Documentation

◆ Enum() [1/2]

Input::Enum::Enum ( )
inline

Definition at line 121 of file accessors.hh.

◆ Enum() [2/2]

Input::Enum::Enum ( int  v)
inline

Definition at line 122 of file accessors.hh.

Member Function Documentation

◆ operator int()

Input::Enum::operator int ( ) const
inline

Definition at line 123 of file accessors.hh.

◆ operator unsigned int()

Input::Enum::operator unsigned int ( ) const
inline

Definition at line 124 of file accessors.hh.

Member Data Documentation

◆ val_

int Input::Enum::val_
private

Definition at line 126 of file accessors.hh.


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