OpenCV  3.0.0-dev
Open Source Computer Vision
Public Member Functions | Friends | List of all members
cv::dnn::Dict Class Reference

This class implements name-value dictionary, values are instances of DictValue. More...

#include "dict.hpp"

Inheritance diagram for cv::dnn::Dict:
cv::dnn::LayerParams

Public Member Functions

const DictValueget (const String &key) const
 If the key in the dictionary then returns its value, else an error will be generated. More...
 
template<typename T >
get (const String &key) const
 
template<typename 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)
 Checks a presence of the key in the dictionary. More...
 
DictValueptr (const String &key)
 If the key in the dictionary then returns pointer to its value, else returns NULL. More...
 
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)
 

Detailed Description

This class implements name-value dictionary, values are instances of DictValue.

Member Function Documentation

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

If the key in the dictionary then returns its value, else an error will be generated.

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

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

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

If the key in the dictionary then returns its value, else returns defaultValue.

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

Checks a presence of the key in the dictionary.

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

If the key in the dictionary then returns pointer to its value, else returns NULL.

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

Sets new value for the key, or adds new key-value pair into the dictionary.

Friends And Related Function Documentation

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

The documentation for this class was generated from the following file: