PLCnext API Documentation 25.0.2.69
Public Member Functions | Static Public Member Functions | List of all members
Arp::Base::Core::Convert Class Reference

This pure static class converts values of arbitrary Arp type from and to string, respectively. More...

#include <Convert.hpp>

Public Member Functions

 Convert (void)=delete
 Deleted default constructor to make this class pure static.
 

Static Public Member Functions

template<class T >
static T ToValue (const char *input)
 Converts the supplied string to a value. More...
 
template<class T >
static T ToValue (const String &input)
 Converts the supplied string to a value. More...
 
template<class T >
static String ToString (const T &value)
 Converts the supplied value to string. More...
 

Detailed Description

This pure static class converts values of arbitrary Arp type from and to string, respectively.

All primitive and elementary types, which are defined in Arp root namespace, are supported by this class, as well as all enum types defined in Arp namespace or any sub-namespace.

Furthermore all types providing specialized std::ostream and std::istream operators are also supported.

Member Function Documentation

◆ ToString()

template<class T >
String Arp::Base::Core::Convert::ToString ( const T &  value)
inlinestatic

Converts the supplied value to string.

Template Parameters
TThe value type.
Parameters
valueThe value to convert to string.
Returns
The value as string.

◆ ToValue() [1/2]

template<class T >
T Arp::Base::Core::Convert::ToValue ( const char *  input)
inlinestatic

Converts the supplied string to a value.

Template Parameters
TThe desired type of the resulting value.
Parameters
inputThe input string to convert.
Returns
The converted value.

◆ ToValue() [2/2]

template<class T >
T Arp::Base::Core::Convert::ToValue ( const String input)
inlinestatic

Converts the supplied string to a value.

Template Parameters
TThe desired type of the resulting value.
Parameters
inputThe input string to convert.
Returns
The converted value.

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