static ib_status_t ibpp_transformation_translator( ib_mpool_t* mp, const ib_field_t* fin, const ib_field_t** fout, void *cbdata ) { try { ConstTransformation::transformation_t transformation = data_to_value<ConstTransformation::transformation_t>(cbdata); ConstField result = transformation(MemoryPool(mp), ConstField(fin)); *fout = result.ib(); } catch (...) { return convert_exception(); } return IB_OK; }
ConstField ConstTransformation::execute( MemoryPool pool, ConstField input ) const { const ib_field_t* result; throw_if_error(ib_tfn_execute( pool.ib(), ib(), input.ib(), &result )); return ConstField(result); }
int ConstOperatorInstance::execute( Transaction tx, ConstField input, Field capture ) const { ib_num_t result; throw_if_error( ib_operator_inst_execute( ib(), tx.ib(), input.ib(), capture.ib(), &result ) ); return static_cast<int>(result); }
// See api documentation for discussion of const_cast. Field Field::remove_const(const ConstField& field) { return Field(const_cast<ib_field_t*>(field.ib())); }
void set(Context ctx, ConstField value) { throw_if_error(ib_module_constant_set(ctx.ib(), value.ib())); }