OpenCV
3.4.1
Open Source Computer Vision
|
This class implements name-value dictionary, values are instances of DictValue. More...
#include "dict.hpp"
Public Member Functions | |
const DictValue & | get (const String &key) const |
If the key in the dictionary then returns its value, else an error will be generated. More... | |
template<typename T > | |
T | get (const String &key) const |
template<typename T > | |
T | get (const String &key, const T &defaultValue) const |
If the key in the dictionary then returns its value, else returns defaultValue . More... | |
bool | has (const String &key) const |
Checks a presence of the key in the dictionary. More... | |
DictValue * | ptr (const String &key) |
If the key in the dictionary then returns pointer to its value, else returns NULL. More... | |
const DictValue * | ptr (const String &key) const |
template<typename T > | |
const T & | set (const String &key, const T &value) |
Sets new value for the key , or adds new key-value pair into the dictionary. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const Dict &dict) |
This class implements name-value dictionary, values are instances of DictValue.
If the key
in the dictionary then returns its value, else an error will be generated.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
If the key
in the dictionary then returns its value, else returns defaultValue
.
bool cv::dnn::Dict::has | ( | const String & | key | ) | const |
Checks a presence of the key
in the dictionary.
If the key
in the dictionary then returns pointer to its value, else returns NULL.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sets new value
for the key
, or adds new key-value pair into the dictionary.
|
friend |