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
nameName of the Map& reference to define
KeyTypeIntegral type to use for key
ContentTypeObject 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:
static DEFINE_FSTR_MAP_DATA(FSTR_DATA_NAME(name), KeyType, ContentType, __VA_ARGS__); \
DEFINE_FSTR_REF_NAMED(name, DECL((FSTR::Map<KeyType, ContentType>)));
Class template to access an associative map.
Definition: Map.hpp:120
#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
nameName of the Map& reference to define
KeyTypeIntegral type to use for key
ContentTypeObject 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:
(sizeof((const FSTR::MapPair<KeyType, ContentType>[]){__VA_ARGS__}) / \
__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
nameName of data structure
KeyTypeIntegral type to use for key
ContentTypeObject 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_PACKED FSTR_ALIGNED name PROGMEM = {{sizeof(name.data)}, {__VA_ARGS__}}; \
FSTR_CHECK_STRUCT(name);
#define PROGMEM
Definition: Arch/Esp32/Components/libc/src/include/sys/pgmspace.h:26
#define FSTR_PACKED
Definition: config.hpp:31
#define FSTR_ALIGNED
Definition: config.hpp:30

Define a Map data structure, specifying the number of elements.

Parameters
nameName of data structure
KeyTypeIntegral type to use for key
ContentTypeObject type to declare for content
sizeNumber of elements
...List of MapPair definitions { key, &content }

◆ DEFINE_FSTR_MAP_LOCAL

#define DEFINE_FSTR_MAP_LOCAL (   name,
  KeyType,
  ContentType,
  ... 
)
Value:
static DEFINE_FSTR_MAP_DATA(FSTR_DATA_NAME(name), KeyType, ContentType, __VA_ARGS__); \
#define DEFINE_FSTR_REF_NAMED(name, ObjectType)
Definition: Object.hpp:51

Like DEFINE_FSTR_MAP except reference is declared static constexpr.

◆ DEFINE_FSTR_MAP_SIZED

#define DEFINE_FSTR_MAP_SIZED (   name,
  KeyType,
  ContentType,
  size,
  ... 
)
Value:
static DEFINE_FSTR_MAP_DATA_SIZED(FSTR_DATA_NAME(name), KeyType, ContentType, size, __VA_ARGS__); \
DEFINE_FSTR_REF_NAMED(name, DECL((FSTR::Map<KeyType, ContentType>)));

Define a Map Object with global reference, specifying the number of elements.

Parameters
nameName of the Map& reference to define
KeyTypeIntegral type to use for key
ContentTypeObject type to declare for content
sizeNumber of elements
...List of MapPair definitions { key, &content }

◆ DEFINE_FSTR_MAP_SIZED_LOCAL

#define DEFINE_FSTR_MAP_SIZED_LOCAL (   name,
  KeyType,
  ContentType,
  size,
  ... 
)
Value:
static DEFINE_FSTR_MAP_DATA_SIZED(FSTR_DATA_NAME(name), KeyType, ContentType, size, __VA_ARGS__); \

Like DEFINE_FSTR_MAP_SIZED except reference is declared static.