3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-27 16:38:45 +00:00

add documentation methods to param_descrs, add C++ API and example for param_descrs. Issue #443

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-02-12 11:45:00 +00:00
parent 9ed7dadc02
commit 8d61d36c3f
7 changed files with 91 additions and 0 deletions

View file

@ -179,6 +179,19 @@ extern "C" {
Z3_CATCH_RETURN(0);
}
Z3_string Z3_API Z3_param_descrs_get_documentation(Z3_context c, Z3_param_descrs p, Z3_symbol s) {
Z3_TRY;
LOG_Z3_param_descrs_get_documentation(c, p, s);
RESET_ERROR_CODE();
char const* result = to_param_descrs_ptr(p)->get_descr(to_symbol(s));
if (result == 0) {
SET_ERROR_CODE(Z3_IOB);
RETURN_Z3(0);
}
return mk_c(c)->mk_external_string(result);
Z3_CATCH_RETURN(0);
}
Z3_string Z3_API Z3_param_descrs_to_string(Z3_context c, Z3_param_descrs p) {
Z3_TRY;
LOG_Z3_param_descrs_to_string(c, p);