PLCnext API Documentation  21.0.0.35466
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Arp::Enum< T > Class Template Reference

Adapter class for enums to make them loggable and parsable from e.g. XML files. More...

#include <Enum.hxx>

Public Types

typedef T Value
 The adapted enum class type. More...
 

Public Member Functions

 Enum (Value value=Value(0))
 Constructs an instace of Enum with the given value. More...
 
ToValue (void) const
 Converts this instance to the value of its adapted type More...
 
String ToString (void) const
 Converts this instance to its string representation. More...
 
Enumoperator= (const Enum &rhs)=default
 The default assignment operator. More...
 
Enumoperator= (Value rhs)
 The assignment operator for a value of the adapted type. More...
 
Enumoperator &= (Enum rhs)
 The assignment AND operator. More...
 
Enumoperator|= (Enum rhs)
 The assignment OR operator. More...
 
 operator T (void) const
 Converts this instance implicitely to the value of its adapted type More...
 

Static Public Member Functions

static bool TryParse (const char *input, Enum &result)
 Tries to parse the given input string. More...
 
static bool TryParse (const String &input, Enum &result)
 Tries to parse the given input string. More...
 
static Enum Parse (const char *input)
 Parses the given input string. More...
 
static Enum Parse (const String &input)
 Parses the given input string. More...
 

Detailed Description

template<class T = void>
class Arp::Enum< T >

Adapter class for enums to make them loggable and parsable from e.g. XML files.

Template Parameters
TThe type of the enum.

Member Typedef Documentation

◆ Value

template<class T = void>
typedef T Arp::Enum< T >::Value

The adapted enum class type.

Member Function Documentation

◆ operator &=()

template<class T = void>
Enum& Arp::Enum< T >::operator&= ( Enum< T >  rhs)

The assignment AND operator.

Parameters
rhsThe value to AND to this instance.
Returns
This instance as reference.

◆ operator=()

template<class T = void>
Enum& Arp::Enum< T >::operator= ( const Enum< T > &  rhs)
default

The default assignment operator.

Parameters
rhsThe value to assign to this instance.
Returns
This instance as reference.

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