OpenCV 4.12.0
開源計算機視覺
載入中...
搜尋中...
無匹配項
cv::dnn::Dict 類參考

此類實現名稱-值字典,值是 DictValue 的例項。更多...

#include <opencv2/dnn/dict.hpp>

cv::dnn::Dict 的協作圖

公共成員函式

std::map< String, DictValue >::const_iterator begin () const
 
std::map< String, DictValue >::const_iterator end () const
 
void erase (const String &key)
 從字典中刪除 key
 
const DictValueget (const String &key) const
 如果字典中存在 key,則返回其值,否則將生成錯誤。
 
template<typename T >
get (const String &key) const
 
template<typename T >
get (const String &key, const T &defaultValue) const
 如果字典中存在 key,則返回其值,否則返回 defaultValue
 
bool has (const String &key) const
 檢查字典中是否存在 key
 
DictValueptr (const String &key)
 如果字典中存在 key,則返回指向其值的指標,否則返回 NULL。
 
const DictValueptr (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 的例項。

成員函式文件

◆ begin()

std::map< String, DictValue >::const_iterator cv::dnn::Dict::begin ( ) const

◆ end()

std::map< String, DictValue >::const_iterator cv::dnn::Dict::end ( ) const

◆ erase()

void cv::dnn::Dict::erase ( const String & key)

從字典中刪除 key

◆ get() [1/3]

const DictValue & cv::dnn::Dict::get ( const String & key) const

如果字典中存在 key,則返回其值,否則將生成錯誤。

◆ get() [2/3]

template<typename T >
T cv::dnn::Dict::get ( const String & key) const

這是一個過載的成員函式,為方便起見而提供。 它與上述函式的不同之處僅在於它接受的引數。

◆ get() [3/3]

template<typename T >
T cv::dnn::Dict::get ( const String & key,
const T & defaultValue ) const

如果字典中存在 key,則返回其值,否則返回 defaultValue

◆ has()

bool cv::dnn::Dict::has ( const String & key) const

檢查字典中是否存在 key

◆ ptr() [1/2]

DictValue * cv::dnn::Dict::ptr ( const String & key)

如果字典中存在 key,則返回指向其值的指標,否則返回 NULL。

◆ ptr() [2/2]

const DictValue * cv::dnn::Dict::ptr ( const String & key) const

這是一個過載的成員函式,為方便起見而提供。 它與上述函式的不同之處僅在於它接受的引數。

◆ set()

template<typename T >
const T & cv::dnn::Dict::set ( const String & key,
const T &  )

key 設定新的 value,或將新的鍵值對新增到字典中。

友元和相關符號文件

◆ operator<<

std::ostream & operator<< ( std::ostream & ,
const Dict & dict )
friend

此類的文件是從以下檔案生成的