slang/util/Enum.h file

Various enum utilities.

Namespaces

namespace slang
Root namespace.

Classes

template<typename T>
class slang::bitmask

Defines

#define ENUM(name, elements)
#define BITMASK(value_type, max_element)

Define documentation

#define ENUM(name, elements)

The ENUM macro defines a strongly-typed enum with the given elements along with a toString() method and an overload of operator<< for formatting.

#define BITMASK(value_type, max_element)

The 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++.