Public Member Functions
InferenceEngine::Parameter Class Reference

This class represents an object to work with different parameters. More...

#include <ie_parameter.hpp>

Public Member Functions

  Parameter ()=default
  Default constructor.
 
  Parameter (const std::string &value)
  The constructor creates a Parameter object with string value. More...
 
template<class T >
  Parameter (const T &value)
  The constructor creates a Parameter object with template value. More...
 
template<class T >
  Parameter (const std::vector< T > &values)
  The constructor creates a Parameter object with a vector of template values. More...
 
  operator std::string () const
  The cast to string object Throws exception if parameter was not found. More...
 
std::string  asString (std::string def) const
  Returns a string value for the given parameter or returns the default one. More...
 
std::string  asString () const
  Returns a string value for the given parameter. Throws exception if parameter was not found. More...
 
float  asFloat (float def) const
  Gets float value for the given parameter. More...
 
float  asFloat () const
  Returns a float value for the given layer parameter. More...
 
std::vector< float >  asFloats (std::vector< float > def) const
  Returns a vector of float values for the given parameter or returns the default value. More...
 
std::vector< float >  asFloats () const
  Returns a vector of float values for the given parameter. More...
 
int  asInt (int def) const
  Returns an integer value for the given parameter or returns the default value. More...
 
int  asInt () const
  Returns an integer value for the given parameter. More...
 
std::vector< int >  asInts (std::vector< int > def) const
  Returns a vector of int values for the given parameter or returns the default value. More...
 
std::vector< int >  asInts () const
  Returns a vector of int values for the given parameter. More...
 
unsigned int  asUInt (unsigned int def) const
  Returns an unsigned integer value for the given parameter or returns the default value. More...
 
unsigned int  asUInt () const
  Returns an unsigned integer value for the given parameter. More...
 
std::vector< unsigned int >  asUInts (std::vector< unsigned int > def) const
  Returns a vector of unsigned int values for the given parameter or returns the default value. More...
 
std::vector< unsigned int >  asUInts () const
  Returns a vector of unsigned int values for the given parameter. More...
 
bool  asBool (bool def) const
  Returns an boolean value for the given parameter. The valid values are (true, false, 1, 0). More...
 
bool  asBool () const
  Returns an boolean value for the given parameter. The valid values are (true, false, 1, 0). More...
 

Detailed Description

This class represents an object to work with different parameters.

Constructor & Destructor Documentation

§ Parameter() [1/3]

InferenceEngine::Parameter::Parameter ( const std::string &  value )
inline

The constructor creates a Parameter object with string value.

Parameters
value string value

§ Parameter() [2/3]

template<class T >
InferenceEngine::Parameter::Parameter ( const T &  value )
inline

The constructor creates a Parameter object with template value.

Parameters
value template value

§ Parameter() [3/3]

template<class T >
InferenceEngine::Parameter::Parameter ( const std::vector< T > &  values )
inline

The constructor creates a Parameter object with a vector of template values.

Parameters
values vector of template values

Member Function Documentation

§ asBool() [1/2]

bool InferenceEngine::Parameter::asBool ( bool  def ) const
inline

Returns an boolean value for the given parameter. The valid values are (true, false, 1, 0).

Parameters
def Default value of the parameter if not found
Returns
An bool value for the specified parameter

§ asBool() [2/2]

bool InferenceEngine::Parameter::asBool ( ) const
inline

Returns an boolean value for the given parameter. The valid values are (true, false, 1, 0).

Returns
An bool value for the specified parameter

§ asFloat() [1/2]

float InferenceEngine::Parameter::asFloat ( float  def ) const
inline

Gets float value for the given parameter.

Parameters
def - default value of the parameter if not found
Returns
float value

§ asFloat() [2/2]

float InferenceEngine::Parameter::asFloat ( ) const
inline

Returns a float value for the given layer parameter.

Returns
A float value for the specified parameter

§ asFloats() [1/2]

std::vector<float> InferenceEngine::Parameter::asFloats ( std::vector< float >  def ) const
inline

Returns a vector of float values for the given parameter or returns the default value.

Parameters
def Default value of the parameter if not found
Returns
vector of float values

§ asFloats() [2/2]

std::vector<float> InferenceEngine::Parameter::asFloats ( ) const
inline

Returns a vector of float values for the given parameter.

Returns
vector of float values

§ asInt() [1/2]

int InferenceEngine::Parameter::asInt ( int  def ) const
inline

Returns an integer value for the given parameter or returns the default value.

Parameters
def Default value of the parameter if not found
Returns
An int value for the specified parameter

§ asInt() [2/2]

int InferenceEngine::Parameter::asInt ( ) const
inline

Returns an integer value for the given parameter.

Returns
An int value for the specified parameter

§ asInts() [1/2]

std::vector<int> InferenceEngine::Parameter::asInts ( std::vector< int >  def ) const
inline

Returns a vector of int values for the given parameter or returns the default value.

Parameters
def Default value of the parameter if not found
Returns
vector of int values

§ asInts() [2/2]

std::vector<int> InferenceEngine::Parameter::asInts ( ) const
inline

Returns a vector of int values for the given parameter.

Returns
vector of int values

§ asString() [1/2]

std::string InferenceEngine::Parameter::asString ( std::string  def ) const
inline

Returns a string value for the given parameter or returns the default one.

Parameters
def Default value of the parameter if not found
Returns
A string value

§ asString() [2/2]

std::string InferenceEngine::Parameter::asString ( ) const
inline

Returns a string value for the given parameter. Throws exception if parameter was not found.

Returns
A string value

§ asUInt() [1/2]

unsigned int InferenceEngine::Parameter::asUInt ( unsigned int  def ) const
inline

Returns an unsigned integer value for the given parameter or returns the default value.

Parameters
def Default value of the parameter if not found
Returns
An unsigned integer value for the specified parameter

§ asUInt() [2/2]

unsigned int InferenceEngine::Parameter::asUInt ( ) const
inline

Returns an unsigned integer value for the given parameter.

Returns
An unsigned integer value for the specified parameter

§ asUInts() [1/2]

std::vector<unsigned int> InferenceEngine::Parameter::asUInts ( std::vector< unsigned int >  def ) const
inline

Returns a vector of unsigned int values for the given parameter or returns the default value.

Parameters
def Default value of the parameter if not found
Returns
vector of unsigned int values

§ asUInts() [2/2]

std::vector<unsigned int> InferenceEngine::Parameter::asUInts ( ) const
inline

Returns a vector of unsigned int values for the given parameter.

Returns
vector of unsigned int values

§ operator std::string()

InferenceEngine::Parameter::operator std::string ( ) const
inline

The cast to string object Throws exception if parameter was not found.

Returns
string value

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