Ctrl-Z
一个多线程机器人运动控制强化学习部署框架
载入中...
搜索中...
未找到
z::CTSMap< CTS > 模板类 参考

Compile time string map 更多...

#include <StaticStringUtils.hpp>

Public 成员函数

 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
 

静态 Public 成员函数

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

模板参数
CTScompile time string key-value pairs

CTSMap<CTSPair<"key1", int>, CTSPair<"key2", float>> ctsMap;

成员函数说明

◆ get()

template<CTSPair ... CTS>
template<CTString CT, typename T>
void z::CTSMap< CTS >::get ( T & value)
inline

get the value of a compile time string key

模板参数
CTcompile time string key
Tvalue type
参数
valuevalue to get

◆ index() [1/2]

template<CTSPair ... CTS>
template<CTString CT>
static constexpr size_t z::CTSMap< CTS >::index ( )
inlinestaticconstexpr

get the index of a compile time string key

模板参数
CTcompile time string key
返回
size_t index of the compile time string key

◆ index() [2/2]

template<CTSPair ... CTS>
size_t z::CTSMap< CTS >::index ( const std::string_view & str)
inline

get the index of a runtime string key

参数
strruntime string key
返回
size_t index of the runtime string key

◆ set()

template<CTSPair ... CTS>
template<CTString CT, typename T>
void z::CTSMap< CTS >::set ( const T & value)
inline

set the value of a compile time string key

模板参数
CTcompile time string key
Tvalue type
参数
valuevalue to set

◆ size()

template<CTSPair ... CTS>
size_t z::CTSMap< CTS >::size ( )
inline

get the size of the map

返回
size_t size of the map

该类的文档由以下文件生成: