OpenCV  4.5.2
Open Source Computer Vision
Public Member Functions | Static Public Member Functions | Friends | List of all members
cv::dnn::DictValue Struct Reference

This struct stores the scalar value (or array) of one of the following type: double, cv::String or int64. More...

#include <opencv2/dnn/dict.hpp>

Public Member Functions

 DictValue (const DictValue &r)
 
 DictValue (bool i)
 Constructs integer scalar. More...
 
 DictValue (int64 i=0)
 Constructs integer scalar. More...
 
 DictValue (int i)
 Constructs integer scalar. More...
 
 DictValue (unsigned p)
 Constructs integer scalar. More...
 
 DictValue (double p)
 Constructs floating point scalar. More...
 
 DictValue (const String &s)
 Constructs string scalar. More...
 
 DictValue (const char *s)
 
 ~DictValue ()
 
template<typename T >
get (int idx=-1) const
 Tries to convert array element with specified index to requested type and returns its. More...
 
int getIntValue (int idx=-1) const
 
double getRealValue (int idx=-1) const
 
String getStringValue (int idx=-1) const
 
bool isInt () const
 
bool isReal () const
 
bool isString () const
 
DictValueoperator= (const DictValue &r)
 
int size () const
 

Static Public Member Functions

template<typename TypeIter >
static DictValue arrayInt (TypeIter begin, int size)
 Constructs integer array. More...
 
template<typename TypeIter >
static DictValue arrayReal (TypeIter begin, int size)
 Constructs floating point array. More...
 
template<typename TypeIter >
static DictValue arrayString (TypeIter begin, int size)
 Constructs array of strings. More...
 

Friends

std::ostream & operator<< (std::ostream &stream, const DictValue &dictv)
 

Detailed Description

This struct stores the scalar value (or array) of one of the following type: double, cv::String or int64.

Todo:
Maybe int64 is useless because double type exactly stores at least 2^52 integers.

Constructor & Destructor Documentation

◆ DictValue() [1/8]

cv::dnn::DictValue::DictValue ( const DictValue r)

◆ DictValue() [2/8]

cv::dnn::DictValue::DictValue ( bool  i)
inline

Constructs integer scalar.

◆ DictValue() [3/8]

cv::dnn::DictValue::DictValue ( int64  i = 0)
inline

Constructs integer scalar.

◆ DictValue() [4/8]

cv::dnn::DictValue::DictValue ( int  i)
inline

Constructs integer scalar.

◆ DictValue() [5/8]

cv::dnn::DictValue::DictValue ( unsigned  p)
inline

Constructs integer scalar.

◆ DictValue() [6/8]

cv::dnn::DictValue::DictValue ( double  p)
inline

Constructs floating point scalar.

◆ DictValue() [7/8]

cv::dnn::DictValue::DictValue ( const String s)
inline

Constructs string scalar.

◆ DictValue() [8/8]

cv::dnn::DictValue::DictValue ( const char *  s)
inline

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

◆ ~DictValue()

cv::dnn::DictValue::~DictValue ( )

Member Function Documentation

◆ arrayInt()

template<typename TypeIter >
static DictValue cv::dnn::DictValue::arrayInt ( TypeIter  begin,
int  size 
)
static

Constructs integer array.

◆ arrayReal()

template<typename TypeIter >
static DictValue cv::dnn::DictValue::arrayReal ( TypeIter  begin,
int  size 
)
static

Constructs floating point array.

◆ arrayString()

template<typename TypeIter >
static DictValue cv::dnn::DictValue::arrayString ( TypeIter  begin,
int  size 
)
static

Constructs array of strings.

◆ get()

template<typename T >
T cv::dnn::DictValue::get ( int  idx = -1) const

Tries to convert array element with specified index to requested type and returns its.

◆ getIntValue()

int cv::dnn::DictValue::getIntValue ( int  idx = -1) const

◆ getRealValue()

double cv::dnn::DictValue::getRealValue ( int  idx = -1) const

◆ getStringValue()

String cv::dnn::DictValue::getStringValue ( int  idx = -1) const

◆ isInt()

bool cv::dnn::DictValue::isInt ( ) const

◆ isReal()

bool cv::dnn::DictValue::isReal ( ) const

◆ isString()

bool cv::dnn::DictValue::isString ( ) const

◆ operator=()

DictValue& cv::dnn::DictValue::operator= ( const DictValue r)

◆ size()

int cv::dnn::DictValue::size ( ) const

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const DictValue dictv 
)
friend

Member Data Documentation

◆ pd

AutoBuffer<double, 1>* cv::dnn::DictValue::pd

◆ pi

AutoBuffer<int64, 1>* cv::dnn::DictValue::pi

◆ ps

AutoBuffer<String, 1>* cv::dnn::DictValue::ps

◆ pv

void* cv::dnn::DictValue::pv

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