![]() |
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 |