libvisiontransfer  10.6.0
Public Types | Public Member Functions | List of all members
visiontransfer::param::ParameterValue Class Reference

Detailed Description

A raw castable variant value for parameters, used for several things internally in Parameter

Definition at line 59 of file parametervalue.h.

#include <visiontransfer/parametervalue.h>

Public Types

enum  ParameterType {
  TYPE_INT, TYPE_DOUBLE, TYPE_BOOL, TYPE_STRING,
  TYPE_SAFESTRING, TYPE_TENSOR, TYPE_COMMAND, TYPE_UNDEFINED
}
 

Public Member Functions

ParameterValuesetType (ParameterType t)
 
ParameterValuesetTensorShape (const std::vector< unsigned int > &shape)
 
bool isDefined () const
 
bool isUndefined () const
 
bool isTensor () const
 
bool isScalar () const
 
bool isCommand () const
 
unsigned int getTensorDimension () const
 
std::vector< unsigned int > getTensorShape () const
 
std::vector< double > getTensorData () const
 Return a copy of the internal tensor data. More...
 
std::vector< double > & getTensorDataReference ()
 Return a reference to the internal tensor data (caution) More...
 
ParameterValuesetTensorData (const std::vector< double > &data)
 
unsigned int getTensorNumElements () const
 
unsigned int getTensorCurrentDataSize () const
 
ParameterType getType () const
 
double & tensorElementAt (unsigned int x)
 
double & tensorElementAt (unsigned int y, unsigned int x)
 
double & tensorElementAt (unsigned int z, unsigned int y, unsigned int x)
 
template<typename T >
ParameterValuesetValue (T t)
 
template<typename T >
getValue () const
 
template<typename T >
getWithDefault (const T &deflt) const
 
template<>
VT_EXPORT ParameterValuesetValue (int t)
 
template<>
VT_EXPORT ParameterValuesetValue (bool t)
 
template<>
VT_EXPORT ParameterValuesetValue (double t)
 
template<>
VT_EXPORT ParameterValuesetValue (const char *t)
 
template<>
VT_EXPORT ParameterValuesetValue (const std::string &t)
 
template<>
VT_EXPORT ParameterValuesetValue (std::string t)
 
template<>
VT_EXPORT int getValue () const
 

Member Function Documentation

◆ getTensorData()

std::vector< double > visiontransfer::param::ParameterValue::getTensorData ( ) const

Return a copy of the internal tensor data.

Definition at line 121 of file parametervalue.cpp.

◆ getTensorDataReference()

std::vector<double>& visiontransfer::param::ParameterValue::getTensorDataReference ( )
inline

Return a reference to the internal tensor data (caution)

Definition at line 97 of file parametervalue.h.


The documentation for this class was generated from the following files:
Allied Vision