8#include "Arp/Base/Core/Detail/EnumDictionaryBase.hxx"
10namespace Arp {
namespace Base {
namespace Core
16template<
class T,
char Delimiter = '|'>
42 bool IsFlag(T value)
const;
43 bool TryGetCombinedEnumString(T value,
String& result)
const;
44 bool TryParseCombinedEnumValue(
const String& input, T& value)
const;
45 bool TryFormatFlags(T value,
String& result)
const;
48 T flagsMask =
static_cast<T
>(std::numeric_limits<U>::max());
57#include "Arp/Base/Core/Detail/EnumFlagsDictionary.ipp"
This class implements an adapter for enums to define the string literals of the enum entries.
Definition: EnumDictionaryBase.hxx:18
std::initializer_list< typename Fields::value_type > InitializerList
The initializer list type of the Fields container.
Definition: EnumDictionaryBase.hxx:24
typename std::underlying_type< T >::type U
The underlying integral type of the enum.
Definition: EnumDictionaryBase.hxx:25
This class implements an adapter for enums containing flags to define the string literals of the enum...
Definition: EnumFlagsDictionary.hxx:18
std::ostream & WriteEnumString(std::ostream &os, T value) const
Writes the string of the specified enum value to the given stream.
Definition: EnumFlagsDictionary.ipp:69
T GetEnumValue(const String &fieldName) const
Returns the value of the specified enum string.
Definition: EnumFlagsDictionary.ipp:137
bool TryGetEnumValue(const String &fieldName, T &value) const
Tries to get the enum value of the specified string.
Definition: EnumFlagsDictionary.ipp:152
String GetEnumString(T value) const
Returns the string of the specified enum entry.
Definition: EnumFlagsDictionary.ipp:111
EnumFlagsDictionary(const InitializerList &fields)
Constructor passing the enum fields as initializer list.
Definition: EnumFlagsDictionary.ipp:19
bool TryGetEnumString(T value, String &result) const
Returns the string of the specified enum value or nullptr if the value could not be found.
Definition: EnumFlagsDictionary.ipp:127
std::istream & ReadEnumValue(std::istream &is, T &value) const
Tries to return the enum entry of the specified string.
Definition: EnumFlagsDictionary.ipp:95
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
Root namespace for the PLCnext API