![]() |
OpenCV 4.11.0
开源计算机视觉
|
#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 & | value ) |
为key设置新的value,或向字典中添加新的键值对。
|
friend |