Compute Graph Framework SDK Reference
5.4.5418 Release
For Test and Development only

EnumDescriptor.hpp File Reference

Go to the source code of this file.

Data Structures

struct  dw::framework::EnumDescription< EnumT >
 

Namespaces

 dw
 
 dw::framework
 

Macros

#define DW_DESCRIBE_C_ENUMERATOR(NAME)   describeEnumerator(_DW_ENUMERATOR_NAME_STRING_VIEW(#NAME), (NAME))
 Syntactic sugar calling describeEnumerator(). More...
 
#define DW_DESCRIBE_ENUMERATOR(NAME)   describeEnumerator(_DW_ENUMERATOR_NAME_STRING_VIEW(#NAME), EnumT::NAME)
 Syntactic sugar calling describeEnumerator(). More...
 

Functions

template<typename EnumT >
constexpr auto dw::framework::describeEnumerator (dw::core::StringView const &&name, EnumT value)
 Describe an enumerator. More...
 
template<typename EnumT , typename... Args>
constexpr auto dw::framework::describeEnumeratorCollection (Args const &&... args)
 Describe the enumerators. More...
 
template<typename EnumT >
auto dw::framework::mapEnumNameToValue (dw::core::StringView const &name) -> EnumT
 Get the enumerator value based on the name. More...
 
template<typename EnumT >
dw::core::StringView dw::framework::mapEnumValueToName (EnumT value)
 Get the enumerator name based on the value. More...
 

Macro Definition Documentation

◆ DW_DESCRIBE_C_ENUMERATOR

#define DW_DESCRIBE_C_ENUMERATOR (   NAME)    describeEnumerator(_DW_ENUMERATOR_NAME_STRING_VIEW(#NAME), (NAME))

Syntactic sugar calling describeEnumerator().

It avoid having to pass both the enumerator name and value explicitly. The block scope must contain the user-defined string literal from dw::core::operator""_sv

Definition at line 63 of file EnumDescriptor.hpp.

◆ DW_DESCRIBE_ENUMERATOR

#define DW_DESCRIBE_ENUMERATOR (   NAME)    describeEnumerator(_DW_ENUMERATOR_NAME_STRING_VIEW(#NAME), EnumT::NAME)

Syntactic sugar calling describeEnumerator().

It avoid having to pass both the enumerator name and value explicitly. This macro should only be used within dw::framework::EnumDescription::get() where EnumT is defined. The block scope must contain the user-defined string literal from dw::core::operator""_sv

Definition at line 55 of file EnumDescriptor.hpp.