예제 #1
0
  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 );
  }
예제 #2
0
 /**
  * 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;
     }
예제 #3
0
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");
}
예제 #4
0
inline
Result
call(
	Result (SGE_OPENGL_APIENTRY &_fun)(Args...),
	Args... _args
)
{
	return
		_fun(
			_args...
		);
}
예제 #5
0
	~SimpleGuard() { _fun();}
예제 #6
0
파일: unittest.cpp 프로젝트: ajdavis/mongo
 ~UnsafeScopeGuard() noexcept(false) {
     _fun();
 }
예제 #7
0
 virtual bool do_(typename AdaptorPredicate::ArgType t) const
 {
     return _fun(t);
 }