Associative Maps
Collaboration diagram for Associative Maps:
Classes | |
class | FSTR::MapPair< KeyType, ContentType > |
describes a pair mapping key => data for a specified key type More... | |
Macros | |
#define | DECLARE_FSTR_MAP(name, KeyType, ContentType) DECLARE_FSTR_OBJECT(name, DECL((FSTR::Map<KeyType, ContentType>))) |
Declare a global Map& reference. More... | |
#define | DEFINE_FSTR_MAP(name, KeyType, ContentType, ...) |
Define a Map Object with global reference. More... | |
#define | DEFINE_FSTR_MAP_LOCAL(name, KeyType, ContentType, ...) |
Like DEFINE_FSTR_MAP except reference is declared static constexpr. More... | |
#define | DEFINE_FSTR_MAP_SIZED(name, KeyType, ContentType, size, ...) |
Define a Map Object with global reference, specifying the number of elements. More... | |
#define | DEFINE_FSTR_MAP_SIZED_LOCAL(name, KeyType, ContentType, size, ...) |
Like DEFINE_FSTR_MAP_SIZED except reference is declared static. More... | |
#define | DEFINE_FSTR_MAP_DATA(name, KeyType, ContentType, ...) |
Define a Map data structure. More... | |
#define | DEFINE_FSTR_MAP_DATA_SIZED(name, KeyType, ContentType, size, ...) |
Define a Map data structure, specifying the number of elements. More... | |
Detailed Description
Macro Definition Documentation
◆ DECLARE_FSTR_MAP
#define DECLARE_FSTR_MAP | ( | name, | |
KeyType, | |||
ContentType | |||
) | DECLARE_FSTR_OBJECT(name, DECL((FSTR::Map<KeyType, ContentType>))) |
Declare a global Map& reference.
- Parameters
-
name Name of the Map& reference to define KeyType Integral type to use for key ContentType Object type to declare for content
- Note
- Use DEFINE_FSTR_MAP to instantiate the global object
◆ DEFINE_FSTR_MAP
#define DEFINE_FSTR_MAP | ( | name, | |
KeyType, | |||
ContentType, | |||
... | |||
) |
Value:
DEFINE_FSTR_REF_NAMED(name, DECL((FSTR::Map<KeyType, ContentType>)));
#define DEFINE_FSTR_MAP_DATA(name, KeyType, ContentType,...)
Define a Map data structure.
Definition: Map.hpp:90
#define FSTR_DATA_NAME(name)
Provide internal name for generated flash string structures.
Definition: Object.hpp:56
#define DECL(t)
Wrap a type declaration so it can be passed with commas in it.
Definition: Utility.hpp:58
Definition: WebConstants.h:72
Define a Map Object with global reference.
- Parameters
-
name Name of the Map& reference to define KeyType Integral type to use for key ContentType Object type to declare for content ... List of MapPair definitions { key, &content }
- Note
- Size will be calculated
◆ DEFINE_FSTR_MAP_DATA
#define DEFINE_FSTR_MAP_DATA | ( | name, | |
KeyType, | |||
ContentType, | |||
... | |||
) |
Value:
DEFINE_FSTR_MAP_DATA_SIZED(name, KeyType, ContentType, \
sizeof(FSTR::MapPair<KeyType, ContentType>)), \
__VA_ARGS__)
describes a pair mapping key => data for a specified key type
Definition: MapPair.hpp:37
#define DEFINE_FSTR_MAP_DATA_SIZED(name, KeyType, ContentType, size,...)
Define a Map data structure, specifying the number of elements.
Definition: Map.hpp:104
Define a Map data structure.
- Parameters
-
name Name of data structure KeyType Integral type to use for key ContentType Object type to declare for content ... List of MapPair definitions { key, &content }
- Note
- Size will be calculated
◆ DEFINE_FSTR_MAP_DATA_SIZED
#define DEFINE_FSTR_MAP_DATA_SIZED | ( | name, | |
KeyType, | |||
ContentType, | |||
size, | |||
... | |||
) |
Value:
constexpr const struct { \
FSTR::ObjectBase object; \
FSTR::MapPair<KeyType, ContentType> data[size]; \
FSTR_CHECK_STRUCT(name);
Define a Map data structure, specifying the number of elements.
- Parameters
-
name Name of data structure KeyType Integral type to use for key ContentType Object type to declare for content size Number of elements ... List of MapPair definitions { key, &content }
◆ DEFINE_FSTR_MAP_LOCAL
#define DEFINE_FSTR_MAP_LOCAL | ( | name, | |
KeyType, | |||
ContentType, | |||
... | |||
) |
Value:
Like DEFINE_FSTR_MAP except reference is declared static constexpr.
◆ DEFINE_FSTR_MAP_SIZED
#define DEFINE_FSTR_MAP_SIZED | ( | name, | |
KeyType, | |||
ContentType, | |||
size, | |||
... | |||
) |
Value:
DEFINE_FSTR_REF_NAMED(name, DECL((FSTR::Map<KeyType, ContentType>)));
Define a Map Object with global reference, specifying the number of elements.
- Parameters
-
name Name of the Map& reference to define KeyType Integral type to use for key ContentType Object type to declare for content size Number of elements ... List of MapPair definitions { key, &content }
◆ DEFINE_FSTR_MAP_SIZED_LOCAL
#define DEFINE_FSTR_MAP_SIZED_LOCAL | ( | name, | |
KeyType, | |||
ContentType, | |||
size, | |||
... | |||
) |
Value:
Like DEFINE_FSTR_MAP_SIZED except reference is declared static.