Macros for automatically converting a compile-time-sized array to a range. More...
Go to the source code of this file.
Data Structures | |
struct | ArrayRange< Element > |
struct | ArrayConstRange< Element > |
Defines | |
#define | INCLUDED_GENERIC_ARRAYRANGE_H |
#define | ARRAY_SIZE(array) (sizeof(array) / sizeof(*array)) |
#define | ARRAY_END(array) (array + ARRAY_SIZE(array)) |
#define | ARRAY_RANGE(array) (makeArrayRange(array, ARRAY_END(array))) |
#define | STRING_ARRAY_RANGE(array) (StringArrayRange(array, ARRAY_END(array))) |
Typedefs | |
typedef ArrayConstRange< const char * > | StringArrayRange |
typedef ArrayRange< const char > | StringRange |
Functions | |
template<typename Element > | |
ArrayRange< Element > | makeArrayRange (Element *first, Element *last) |
template<typename Element > | |
ArrayConstRange< Element > | makeArrayRange (const Element *first, const Element *last) |
Macros for automatically converting a compile-time-sized array to a range.
Definition in file arrayrange.h.
#define ARRAY_END | ( | array | ) | (array + ARRAY_SIZE(array)) |
Definition at line 59 of file arrayrange.h.
#define ARRAY_RANGE | ( | array | ) | (makeArrayRange(array, ARRAY_END(array))) |
Definition at line 60 of file arrayrange.h.
#define ARRAY_SIZE | ( | array | ) | (sizeof(array) / sizeof(*array)) |
Definition at line 58 of file arrayrange.h.
#define INCLUDED_GENERIC_ARRAYRANGE_H |
Definition at line 23 of file arrayrange.h.
#define STRING_ARRAY_RANGE | ( | array | ) | (StringArrayRange(array, ARRAY_END(array))) |
Definition at line 64 of file arrayrange.h.
typedef ArrayConstRange<const char*> StringArrayRange |
Definition at line 63 of file arrayrange.h.
typedef ArrayRange<const char> StringRange |
Definition at line 66 of file arrayrange.h.
ArrayConstRange<Element> makeArrayRange | ( | const Element * | first, | |
const Element * | last | |||
) | [inline] |
Definition at line 54 of file arrayrange.h.
ArrayRange<Element> makeArrayRange | ( | Element * | first, | |
Element * | last | |||
) | [inline] |
Definition at line 39 of file arrayrange.h.