tesseract  5.0.0-alpha-619-ge9db
tesseract::StringParam Class Reference

#include <params.h>

Inheritance diagram for tesseract::StringParam:
tesseract::Param

Public Member Functions

 StringParam (const char *value, const char *name, const char *comment, bool init, ParamsVectors *vec)
 
 ~StringParam ()
 
 operator STRING & ()
 
const char * c_str () const
 
bool empty ()
 
bool operator== (const STRING &other)
 
void operator= (const STRING &value)
 
void set_value (const STRING &value)
 
void ResetToDefault ()
 
void ResetFrom (const ParamsVectors *vec)
 
- 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 218 of file params.h.

Constructor & Destructor Documentation

◆ StringParam()

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

Definition at line 220 of file params.h.

220  { value_ = value; }
221  void ResetToDefault() { value_ = default_; }
222  void ResetFrom(const ParamsVectors* vec) {
223  for (int i = 0; i < vec->string_params.size(); ++i) {
224  if (strcmp(vec->string_params[i]->name_str(), name_) == 0) {
225  // printf("overriding param %s=%s by =%s\n", name_, value_,
226  // vec->string_params[i]->c_str());
227  value_ = *vec->string_params[i];

◆ ~StringParam()

tesseract::StringParam::~StringParam ( )
inline

Definition at line 228 of file params.h.

233 :
234  STRING value_;

Member Function Documentation

◆ c_str()

const char* tesseract::StringParam::c_str ( ) const
inline

Definition at line 230 of file params.h.

233 :
234  STRING value_;

◆ empty()

bool tesseract::StringParam::empty ( )
inline

Definition at line 231 of file params.h.

233 :
234  STRING value_;

◆ operator STRING &()

tesseract::StringParam::operator STRING & ( )
inline

Definition at line 229 of file params.h.

233 :
234  STRING value_;

◆ operator=()

void tesseract::StringParam::operator= ( const STRING value)
inline

Definition at line 233 of file params.h.

233 :
234  STRING value_;

◆ operator==()

bool tesseract::StringParam::operator== ( const STRING other)
inline

Definition at line 232 of file params.h.

233 :
234  STRING value_;

◆ ResetFrom()

void tesseract::StringParam::ResetFrom ( const ParamsVectors vec)
inline

Definition at line 236 of file params.h.

240  : public Param {
241  public:
242  DoubleParam(double value, const char* name, const char* comment, bool init,
243  ParamsVectors* vec)
244  : Param(name, comment, init) {
245  value_ = value;

◆ ResetToDefault()

void tesseract::StringParam::ResetToDefault ( )
inline

Definition at line 235 of file params.h.

240 : public Param {

◆ set_value()

void tesseract::StringParam::set_value ( const STRING value)
inline

Definition at line 234 of file params.h.

240 : public Param {

The documentation for this class was generated from the following file:
STRING
Definition: strngs.h:45
tesseract::StringParam::ResetFrom
void ResetFrom(const ParamsVectors *vec)
Definition: params.h:236
tesseract::Param::Param
Param(const char *name, const char *comment, bool init)
Definition: params.h:141
tesseract::Param::name_
const char * name_
Definition: params.h:146
tesseract::StringParam::ResetToDefault
void ResetToDefault()
Definition: params.h:235