MCPcopy Create free account
hub / github.com/creatale/node-dv / SetValue

Method SetValue

deps/tesseract/ccmain/paramsd.cpp:154–167  ·  view source on GitHub ↗

Setter for the value.

Source from the content-addressed store, hash-verified

152
153// Setter for the value.
154void ParamContent::SetValue(const char* val) {
155// TODO (wanke) Test if the values actually are properly converted.
156// (Quickly visible impacts?)
157 changed_ = TRUE;
158 if (param_type_ == VT_INTEGER) {
159 iIt->set_value(atoi(val));
160 } else if (param_type_ == VT_BOOLEAN) {
161 bIt->set_value(atoi(val));
162 } else if (param_type_ == VT_DOUBLE) {
163 dIt->set_value(strtod(val, NULL));
164 } else if (param_type_ == VT_STRING) {
165 sIt->set_value(val);
166 }
167}
168
169// Gets the up to the first 3 prefixes from s (split by _).
170// For example, tesseract_foo_bar will be split into tesseract,foo and bar.

Callers 2

NotifyMethod · 0.45
LoadFromFpMethod · 0.45

Calls 1

set_valueMethod · 0.45

Tested by

no test coverage detected