Z3 |

Public Member Functions | Friends
params Class Reference

`#include <z3++.h>`

Inheritance diagram for params:

## Public Member Functions
| params (context &c)
| params (params const &s)
| ~params ()
| operator Z3_params () const
params & | operator= (params const &s)
void | set (char const *k, bool b)
void | set (char const *k, unsigned n)
void | set (char const *k, double n)
void | set (char const *k, symbol const &s)
void | set (char const *k, char const *s)
Public Member Functions inherited from object
| object (context &c)
context & | ctx () const
Z3_error_code | check_error () const

## Friends
std::ostream & | operator<< (std::ostream &out, params const &p)

## Additional Inherited Members
Protected Attributes inherited from object
context * | m_ctx

## Detailed Description

Definition at line 472 of file z3++.h.

## Constructor & Destructor Documentation

## ◆ params() [1/2]

params | ( | context & | c | ) |
| inline

Definition at line 475 of file z3++.h.

475:object(c) { m_params = Z3_mk_params(c); Z3_params_inc_ref(ctx(), m_params); }
z3::object::ctx
context & ctx() const
Definition: z3++.h:422
z3::object::object
object(context &c)
Definition: z3++.h:421
Z3_mk_params
Z3_params Z3_API Z3_mk_params(Z3_context c)
Create a Z3 (empty) parameter set. Starting at Z3 4.0, parameter sets are used to configure many comp...
Z3_params_inc_ref
void Z3_API Z3_params_inc_ref(Z3_context c, Z3_params p)
Increment the reference counter of the given parameter set.

Referenced by ParamsRef::__deepcopy__(), ParamsRef::__del__(), ParamsRef::__repr__(), ParamsRef::set(), and ParamsRef::validate().

## ◆ params() [2/2]

params | ( | params const & | s | ) |
| inline

Definition at line 476 of file z3++.h.

476:object(s), m_params(s.m_params) { Z3_params_inc_ref(ctx(), m_params); }

Referenced by ParamsRef::__deepcopy__(), ParamsRef::__del__(), ParamsRef::__repr__(), ParamsRef::set(), and ParamsRef::validate().

## ◆ ~params()

~params | ( |  | ) |
| inline

Definition at line 477 of file z3++.h.

477{ Z3_params_dec_ref(ctx(), m_params); }
Z3_params_dec_ref
void Z3_API Z3_params_dec_ref(Z3_context c, Z3_params p)
Decrement the reference counter of the given parameter set.

## Member Function Documentation

## ◆ operator Z3_params()

operator Z3_params | ( |  | ) | const
| inline

Definition at line 478 of file z3++.h.

478{ return m_params; }

## ◆ operator=()

params & operator= | ( | params const & | s | ) |
| inline

Definition at line 479 of file z3++.h.

479 {
480 Z3_params_inc_ref(s.ctx(), s.m_params);
481 Z3_params_dec_ref(ctx(), m_params);
482 object::operator=(s);
483 m_params = s.m_params;
484 return *this;
485 }

## ◆ set() [1/5]

void set | ( | char const * | k,
|  | bool | b
| ) |  |
| inline

Definition at line 486 of file z3++.h.

486{ Z3_params_set_bool(ctx(), m_params, ctx().str_symbol(k), b); }
Z3_params_set_bool
void Z3_API Z3_params_set_bool(Z3_context c, Z3_params p, Z3_symbol k, bool v)
Add a Boolean parameter k with value v to the parameter set p.

Referenced by solver::set().

## ◆ set() [2/5]

void set | ( | char const * | k,
|  | char const * | s
| ) |  |
| inline

Definition at line 490 of file z3++.h.

490{ Z3_params_set_symbol(ctx(), m_params, ctx().str_symbol(k), ctx().str_symbol(s)); }
Z3_params_set_symbol
void Z3_API Z3_params_set_symbol(Z3_context c, Z3_params p, Z3_symbol k, Z3_symbol v)
Add a symbol parameter k with value v to the parameter set p.

## ◆ set() [3/5]

void set | ( | char const * | k,
|  | double | n
| ) |  |
| inline

Definition at line 488 of file z3++.h.

488{ Z3_params_set_double(ctx(), m_params, ctx().str_symbol(k), n); }
Z3_params_set_double
void Z3_API Z3_params_set_double(Z3_context c, Z3_params p, Z3_symbol k, double v)
Add a double parameter k with value v to the parameter set p.

## ◆ set() [4/5]

void set | ( | char const * | k,
|  | symbol const & | s
| ) |  |
| inline

Definition at line 489 of file z3++.h.

489{ Z3_params_set_symbol(ctx(), m_params, ctx().str_symbol(k), s); }

## ◆ set() [5/5]

void set | ( | char const * | k,
|  | unsigned | n
| ) |  |
| inline

Definition at line 487 of file z3++.h.

487{ Z3_params_set_uint(ctx(), m_params, ctx().str_symbol(k), n); }
Z3_params_set_uint
void Z3_API Z3_params_set_uint(Z3_context c, Z3_params p, Z3_symbol k, unsigned v)
Add a unsigned parameter k with value v to the parameter set p.

## Friends And Related Function Documentation

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | out,
|  | params const & | p
| ) |  |
| friend

Definition at line 494 of file z3++.h.

494 {
495 out << Z3_params_to_string(p.ctx(), p); return out;
496 }
Z3_params_to_string
Z3_string Z3_API Z3_params_to_string(Z3_context c, Z3_params p)
Convert a parameter set into a string. This function is mainly used for printing the contents of a pa...