#include <params.h>
Definition at line 232 of file params.h.
◆ StringParam()
tesseract::StringParam::StringParam |
( |
const char * |
value, |
|
|
const char * |
name, |
|
|
const char * |
comment, |
|
|
bool |
init, |
|
|
ParamsVectors * |
vec |
|
) |
| |
|
inline |
Definition at line 234 of file params.h.
236 :
Param(name, comment, init) {
239 params_vec_ = &(vec->string_params);
240 vec->string_params.push_back(this);
241 }
Param(const char *name, const char *comment, bool init)
◆ ~StringParam()
tesseract::StringParam::~StringParam |
( |
| ) |
|
|
inline |
Definition at line 242 of file params.h.
242 {
243 ParamUtils::RemoveParam<StringParam>(this, params_vec_);
244 }
◆ c_str()
const char * tesseract::StringParam::c_str |
( |
| ) |
const |
|
inline |
Definition at line 248 of file params.h.
248 {
249 return value_.c_str();
250 }
◆ contains()
bool tesseract::StringParam::contains |
( |
char |
c | ) |
const |
|
inline |
Definition at line 251 of file params.h.
251 {
252 return value_.find(c) != std::string::npos;
253 }
◆ empty()
bool tesseract::StringParam::empty |
( |
| ) |
const |
|
inline |
Definition at line 254 of file params.h.
254 {
255 return value_.empty();
256 }
◆ operator std::string &()
tesseract::StringParam::operator std::string & |
( |
| ) |
|
|
inline |
Definition at line 245 of file params.h.
245 {
246 return value_;
247 }
◆ operator=()
void tesseract::StringParam::operator= |
( |
const std::string & |
value | ) |
|
|
inline |
◆ operator==()
bool tesseract::StringParam::operator== |
( |
const std::string & |
other | ) |
const |
|
inline |
Definition at line 257 of file params.h.
257 {
258 return value_ == other;
259 }
◆ ResetFrom()
void tesseract::StringParam::ResetFrom |
( |
const ParamsVectors * |
vec | ) |
|
|
inline |
Definition at line 269 of file params.h.
269 {
270 for (auto *param : vec->string_params) {
271 if (strcmp(param->name_str(),
name_) == 0) {
272
273
274 value_ = *param;
275 break;
276 }
277 }
278 }
◆ ResetToDefault()
void tesseract::StringParam::ResetToDefault |
( |
| ) |
|
|
inline |
Definition at line 266 of file params.h.
266 {
267 value_ = default_;
268 }
◆ set_value()
void tesseract::StringParam::set_value |
( |
const std::string & |
value | ) |
|
|
inline |
The documentation for this class was generated from the following file:
- /media/home/debian/src/github/tesseract-ocr/tesseract/src/ccutil/params.h