double get_float() const { if (i_value) return static_cast<double>(*i_value); if (f_value) return static_cast<double>(*f_value); throw filter_exception("Type is not float"); }
long long get_int() const { if (i_value) return static_cast<long long>(*i_value); if (f_value) return static_cast<long long>(*f_value); throw filter_exception("Type is not int"); }
long long get_int() const { if (i_value) return *i_value; if (f_value) return *f_value; throw filter_exception("Type is not int"); }
double get_float() const { if (i_value) return *i_value; if (f_value) return *f_value; throw filter_exception("Type is not float"); }
bool inline fetch_data(filter_obj *parent, fun_ptr_type f, data_type &data) { raw_type tmp; HRESULT hr = (parent->task->*f)(&tmp); if (traits::has_failed(hr)) { throw filter_exception("ERROR: " + ::error::format::from_system(hr)); data = traits::get_default(); return false; } else { data = traits::convert(hr, tmp); traits::cleanup(tmp); return true; } }