Download src/binding_eval.h from dlxjj/imradv3: direct link, hf CLI and curl.
- Browser
- Download file 733 Bytes
-
https://huggingface.co/datasets/dlxjj/imradv3/resolve/main/src/binding_eval.h
- Command line
-
hf download hf://datasets/dlxjj/imradv3/src/binding_eval.h
-
curl -L -o binding_eval.h https://huggingface.co/datasets/dlxjj/imradv3/resolve/main/src/binding_eval.h
733 Bytes
| template <class T> | |
| T bindable<T>::eval(const UIContext& ctx) const { | |
| if (empty()) | |
| return {}; | |
| if (has_value()) | |
| return value(); | |
| const auto *var = ctx.codeGen->GetVar(str); | |
| if (var) { | |
| T val; | |
| std::istringstream is(var->init); | |
| if (is >> std::boolalpha >> val) | |
| return val; | |
| } | |
| return {}; | |
| } | |
| template <class T> | |
| T field_ref<T>::eval(const UIContext &ctx) const | |
| { | |
| if (empty()) | |
| return {}; | |
| const auto *var = ctx.codeGen->GetVar(str); | |
| if (!var) | |
| return {}; | |
| T val; | |
| std::istringstream is(var->init); | |
| if (is >> std::boolalpha >> val) | |
| return val; | |
| return {}; | |
| } | |