tesseract  4.1.1
tesseract::Param Class Reference

#include <params.h>

Inheritance diagram for tesseract::Param:
tesseract::BoolParam tesseract::DoubleParam tesseract::IntParam tesseract::StringParam

Public Member Functions

 ~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
 

Protected Member Functions

 Param (const char *name, const char *comment, bool init)
 

Protected Attributes

const char * name_
 
const char * info_
 
bool init_
 
bool debug_
 

Detailed Description

Definition at line 109 of file params.h.

Constructor & Destructor Documentation

◆ ~Param()

tesseract::Param::~Param ( )
default

◆ Param()

tesseract::Param::Param ( const char *  name,
const char *  comment,
bool  init 
)
inlineprotected

Definition at line 127 of file params.h.

128  : name_(name), info_(comment), init_(init) {
129  debug_ = (strstr(name, "debug") != nullptr) || (strstr(name, "display"));
130  }
const char * info_
Definition: params.h:133
const char * name_
Definition: params.h:132

Member Function Documentation

◆ constraint_ok()

bool tesseract::Param::constraint_ok ( SetParamConstraint  constraint) const
inline

Definition at line 117 of file params.h.

117  {
118  return (
119  constraint == SET_PARAM_CONSTRAINT_NONE ||
120  (constraint == SET_PARAM_CONSTRAINT_DEBUG_ONLY && this->is_debug()) ||
121  (constraint == SET_PARAM_CONSTRAINT_NON_DEBUG_ONLY &&
122  !this->is_debug()) ||
123  (constraint == SET_PARAM_CONSTRAINT_NON_INIT_ONLY && !this->is_init()));
124  }
bool is_debug() const
Definition: params.h:116
bool is_init() const
Definition: params.h:115

◆ info_str()

const char* tesseract::Param::info_str ( ) const
inline

Definition at line 114 of file params.h.

114 { return info_; }
const char * info_
Definition: params.h:133

◆ is_debug()

bool tesseract::Param::is_debug ( ) const
inline

Definition at line 116 of file params.h.

116 { return debug_; }

◆ is_init()

bool tesseract::Param::is_init ( ) const
inline

Definition at line 115 of file params.h.

115 { return init_; }

◆ name_str()

const char* tesseract::Param::name_str ( ) const
inline

Definition at line 113 of file params.h.

113 { return name_; }
const char * name_
Definition: params.h:132

Member Data Documentation

◆ debug_

bool tesseract::Param::debug_
protected

Definition at line 135 of file params.h.

◆ info_

const char* tesseract::Param::info_
protected

Definition at line 133 of file params.h.

◆ init_

bool tesseract::Param::init_
protected

Definition at line 134 of file params.h.

◆ name_

const char* tesseract::Param::name_
protected

Definition at line 132 of file params.h.


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