tesseract  4.0.0-1-g2a2b
tesseract::DoubleParam Class Reference

#include <params.h>

Inheritance diagram for tesseract::DoubleParam:
tesseract::Param

Public Member Functions

 DoubleParam (double value, const char *name, const char *comment, bool init, ParamsVectors *vec)
 
 ~DoubleParam ()
 
 operator double () const
 
void operator= (double value)
 
void set_value (double value)
 
void ResetToDefault ()
 
- Public Member Functions inherited from tesseract::Param
 ~Param ()=default
 
const char * name_str () const
 
const char * info_str () const
 
bool is_init () const
 
bool is_debug () const
 
bool constraint_ok (SetParamConstraint constraint) const
 

Additional Inherited Members

- Protected Member Functions inherited from tesseract::Param
 Param (const char *name, const char *comment, bool init)
 
- Protected Attributes inherited from tesseract::Param
const char * name_
 
const char * info_
 
bool init_
 
bool debug_
 

Detailed Description

Definition at line 219 of file params.h.

Constructor & Destructor Documentation

◆ DoubleParam()

tesseract::DoubleParam::DoubleParam ( double  value,
const char *  name,
const char *  comment,
bool  init,
ParamsVectors vec 
)
inline

Definition at line 221 of file params.h.

222  : Param(name, comment, init) {
223  value_ = value;
224  default_ = value;
225  params_vec_ = &(vec->double_params);
226  vec->double_params.push_back(this);
227  }
Param(const char *name, const char *comment, bool init)
Definition: params.h:131

◆ ~DoubleParam()

tesseract::DoubleParam::~DoubleParam ( )
inline

Definition at line 228 of file params.h.

228 { ParamUtils::RemoveParam<DoubleParam>(this, params_vec_); }

Member Function Documentation

◆ operator double()

tesseract::DoubleParam::operator double ( ) const
inline

Definition at line 229 of file params.h.

229 { return value_; }

◆ operator=()

void tesseract::DoubleParam::operator= ( double  value)
inline

Definition at line 230 of file params.h.

230 { value_ = value; }

◆ ResetToDefault()

void tesseract::DoubleParam::ResetToDefault ( )
inline

Definition at line 232 of file params.h.

232  {
233  value_ = default_;
234  }

◆ set_value()

void tesseract::DoubleParam::set_value ( double  value)
inline

Definition at line 231 of file params.h.

231 { value_ = value; }

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