bool parse( sim_t* sim, const std::string& n, const std::string& value ) const override { if ( name() != n ) return false; return _fun( sim, n, value ); }
/** * Override : return the value of the function at x or a quiet NAN if fun(x) is not defined. **/ virtual double _function(double x) const override { if ((x < _minDomain) || (x>_maxDomain)) return std::numeric_limits<double>::quiet_NaN(); double y; try { y = (double)_fun(x); } catch (...) { return std::numeric_limits<double>::quiet_NaN(); } return y; }
void QrsDynamicObject::invokeMetacall(int id, void **args) { if (_fun) _fun(_data, id, (QVariant **)args); else qWarning("QrsDynamicMetaObject: tried to invoke metacall but handler not set"); }
inline Result call( Result (SGE_OPENGL_APIENTRY &_fun)(Args...), Args... _args ) { return _fun( _args... ); }
~SimpleGuard() { _fun();}
~UnsafeScopeGuard() noexcept(false) { _fun(); }
virtual bool do_(typename AdaptorPredicate::ArgType t) const { return _fun(t); }