Compile time string map
更多...
#include <StaticStringUtils.hpp>
|
|
| CTSMap () |
| | Construct a new CTSMap object
|
| |
|
| ~CTSMap () |
| | Destroy the CTSMap object
|
| |
| template<CTString CT, typename T> |
| void | get (T &value) |
| | get the value of a compile time string key
|
| |
| size_t | size () |
| | get the size of the map
|
| |
| size_t | index (const std::string_view &str) |
| | get the index of a runtime string key
|
| |
| template<CTString CT, typename T> |
| void | set (const T &value) |
| | set the value of a compile time string key
|
| |
|
| template<CTString CT> |
| static constexpr size_t | index () |
| | get the index of a compile time string key
|
| |
template<
CTSPair ... CTS>
class z::CTSMap< CTS >
Compile time string map
- 模板参数
-
| CTS | compile time string key-value pairs |
CTSMap<CTSPair<"key1", int>, CTSPair<"key2", float>> ctsMap;
◆ get()
get the value of a compile time string key
- 模板参数
-
| CT | compile time string key |
| T | value type |
- 参数
-
◆ index() [1/2]
| static constexpr size_t z::CTSMap< CTS >::index |
( |
| ) |
|
|
inlinestaticconstexpr |
get the index of a compile time string key
- 模板参数
-
| CT | compile time string key |
- 返回
- size_t index of the compile time string key
◆ index() [2/2]
| size_t z::CTSMap< CTS >::index |
( |
const std::string_view & | str | ) |
|
|
inline |
get the index of a runtime string key
- 参数
-
- 返回
- size_t index of the runtime string key
◆ set()
| void z::CTSMap< CTS >::set |
( |
const T & | value | ) |
|
|
inline |
set the value of a compile time string key
- 模板参数
-
| CT | compile time string key |
| T | value type |
- 参数
-
◆ size()
get the size of the map
- 返回
- size_t size of the map
该类的文档由以下文件生成: