Z3
Loading...
Searching...
No Matches
apply_result Class Reference

#include <z3++.h>

Inheritance diagram for apply_result:

Public Member Functions

 apply_result (context &c, Z3_apply_result s)
 apply_result (apply_result const &s)
 ~apply_result () override
 operator Z3_apply_result () const
apply_result & operator= (apply_result const &s)
unsigned size () const
goal operator[] (int i) const
Public Member Functions inherited from object
 object (context &c)
virtual ~object ()=default
context & ctx () const
Z3_error_code check_error () const

Friends

std::ostream & operator<< (std::ostream &out, apply_result const &r)

Additional Inherited Members

Protected Attributes inherited from object
context * m_ctx

Detailed Description

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

Constructor & Destructor Documentation

◆ apply_result() [1/2]

apply_result ( context & c,
Z3_apply_result s )
inline

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

3422:object(c) { init(s); }

Referenced by tactic::apply(), apply_result(), operator<<, and operator=().

◆ apply_result() [2/2]

apply_result ( apply_result const & s)
inline

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

3423:object(s) { init(s.m_apply_result); }

◆ ~apply_result()

~apply_result ( )
inlineoverride

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

3424{ Z3_apply_result_dec_ref(ctx(), m_apply_result); }
void Z3_API Z3_apply_result_dec_ref(Z3_context c, Z3_apply_result r)
Decrement the reference counter of the given Z3_apply_result object.

Member Function Documentation

◆ operator Z3_apply_result()

operator Z3_apply_result ( ) const
inline

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

3425{ return m_apply_result; }

◆ operator=()

apply_result & operator= ( apply_result const & s)
inline

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

3426 {
3427 Z3_apply_result_inc_ref(s.ctx(), s.m_apply_result);
3428 Z3_apply_result_dec_ref(ctx(), m_apply_result);
3429 object::operator=(s);
3430 m_apply_result = s.m_apply_result;
3431 return *this;
3432 }
void Z3_API Z3_apply_result_inc_ref(Z3_context c, Z3_apply_result r)
Increment the reference counter of the given Z3_apply_result object.

◆ operator[]()

goal operator[] ( int i) const
inline

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

3434{ assert(0 <= i); Z3_goal r = Z3_apply_result_get_subgoal(ctx(), m_apply_result, i); check_error(); return goal(ctx(), r); }
Z3_goal Z3_API Z3_apply_result_get_subgoal(Z3_context c, Z3_apply_result r, unsigned i)
Return one of the subgoals in the Z3_apply_result object returned by Z3_tactic_apply.

◆ size()

unsigned size ( ) const
inline

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

3433{ return Z3_apply_result_get_num_subgoals(ctx(), m_apply_result); }
unsigned Z3_API Z3_apply_result_get_num_subgoals(Z3_context c, Z3_apply_result r)
Return the number of subgoals in the Z3_apply_result object returned by Z3_tactic_apply.

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
apply_result const & r )
friend

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

3437{ out << Z3_apply_result_to_string(r.ctx(), r); return out; }
Z3_string Z3_API Z3_apply_result_to_string(Z3_context c, Z3_apply_result r)
Convert the Z3_apply_result object returned by Z3_tactic_apply into a string.

Referenced by operator<<.