Exemplo n.º 1
0
Arquivo: node.hpp Projeto: mickem/nscp
			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");
			}
Exemplo n.º 2
0
Arquivo: node.hpp Projeto: mickem/nscp
			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");
			}
Exemplo n.º 3
0
			long long get_int() const {
				if (i_value)
					return *i_value;
				if (f_value)
					return *f_value;
				throw filter_exception("Type is not int");
			}
Exemplo n.º 4
0
			double get_float() const {
				if (i_value)
					return *i_value;
				if (f_value)
					return *f_value;
				throw filter_exception("Type is not float");
			}
Exemplo n.º 5
0
			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;
				}
			}