KiCad PCB EDA Suite
|
#include <iterator>
#include <type_traits>
Go to the source code of this file.
Classes | |
class | ENUM_ITERATOR< T, beginVal, endVal > |
Macros | |
#define | DEFINE_ENUM_VECTOR(enumName, ...) |
Macro to create const vectors containing enum values to enable easy iteration. | |
#define | DECLARE_ENUM_VECTOR(className, enumName) constexpr className::enumName className::enumName##_vector[]; |
#define | DEFINE_ENUM_CLASS_WITH_ITERATOR(enumName, beginVal, ...) |
Macro to create const vectors containing enum class values to enable easy iteration. | |
#define DECLARE_ENUM_VECTOR | ( | className, | |
enumName | |||
) | constexpr className::enumName className::enumName##_vector[]; |
Definition at line 49 of file enum_vector.h.
#define DEFINE_ENUM_CLASS_WITH_ITERATOR | ( | enumName, | |
beginVal, | |||
... | |||
) |
Macro to create const vectors containing enum class values to enable easy iteration.
Usage: [header] A { DEFINE_ENUM_CLASS_WITH_ITERATOR( COLOR, RED, GREEN, BLUE ) };
[source] for( COLOR color : COLOR_ITERATOR() ) { // do sth with color }
Definition at line 67 of file enum_vector.h.
#define DEFINE_ENUM_VECTOR | ( | enumName, | |
... | |||
) |
Macro to create const vectors containing enum values to enable easy iteration.
Do not use in new code. Use the DEFINE_ENUM_CLASS_WITH_ITERATOR and DECLARE_ENUM_CLASS_ITERATOR macros instead (unless they don't work ;) ).
Usage: [header] A { DEFINE_ENUM_VECTOR( COLOR, { RED, GREEN, BLUE } ) };
[source] for( COLOR color : COLOR_vector ) { // do sth with color }
DECLARE_ENUM_VECTOR( COLORS );
Definition at line 45 of file enum_vector.h.