slang/util/Enum.h file

Various enum utilities.

Namespaces

namespace slang
Root namespace.

Classes

template<typename T>
class slang::bitmask
A convenience wrapper around an enum that is intended to be used as a combination of bitwise-combined flags.

Defines

#define SLANG_ENUM(name, elements)
The SLANG_ENUM macro defines a strongly-typed enum with the given elements along with a toString() method and an overload of operator<< for formatting.
#define SLANG_BITMASK(value_type, max_element)
The SLANG_BITMASK macro defines convenience operators for a bitmask type.

Define documentation

#define SLANG_BITMASK(value_type, max_element)

The SLANG_BITMASK macro defines convenience operators for a bitmask type.

This is to work around strongly typed enums not being combinable by operators like | and & in C++.