![]() |
OpenCV 4.12.0
开源计算机视觉
|
此类实现名称-值字典,值是 DictValue 的实例。更多...
#include <opencv2/dnn/dict.hpp>
公共成员函数 | |
| std::map< String, DictValue >::const_iterator | begin () const |
| std::map< String, DictValue >::const_iterator | end () const |
| void | erase (const String &key) |
从字典中删除 key。 | |
| const DictValue & | get (const String &key) const |
如果字典中存在 key,则返回其值,否则将生成错误。 | |
| template<typename T > | |
| T | get (const String &key) const |
| template<typename T > | |
| T | get (const String &key, const T &defaultValue) const |
如果字典中存在 key,则返回其值,否则返回 defaultValue。 | |
| bool | has (const String &key) const |
检查字典中是否存在 key。 | |
| DictValue * | ptr (const String &key) |
如果字典中存在 key,则返回指向其值的指针,否则返回 NULL。 | |
| const DictValue * | ptr (const String &key) const |
| template<typename T > | |
| const T & | set (const String &key, const T &value) |
为 key 设置新的 value,或将新的键值对添加到字典中。 | |
友元 | |
| std::ostream & | operator<< (std::ostream &stream, const Dict &dict) |
此类实现名称-值字典,值是 DictValue 的实例。
| void cv::dnn::Dict::erase | ( | const String & | key | ) |
从字典中删除 key。
| T cv::dnn::Dict::get | ( | const String & | key | ) | const |
这是一个重载的成员函数,为方便起见而提供。 它与上述函数的不同之处仅在于它接受的参数。
| T cv::dnn::Dict::get | ( | const String & | key, |
| const T & | defaultValue ) const |
如果字典中存在 key,则返回其值,否则返回 defaultValue。
| bool cv::dnn::Dict::has | ( | const String & | key | ) | const |
检查字典中是否存在 key。
这是一个重载的成员函数,为方便起见而提供。 它与上述函数的不同之处仅在于它接受的参数。
| const T & cv::dnn::Dict::set | ( | const String & | key, |
| const T & | 值 ) |
为 key 设置新的 value,或将新的键值对添加到字典中。
|
friend |