Z3
Public Member Functions | Friends
stats Class Reference
+ Inheritance diagram for stats:

Public Member Functions

 stats (context &c)
 
 stats (context &c, Z3_stats e)
 
 stats (stats const &s)
 
 ~stats ()
 
 operator Z3_stats () const
 
statsoperator= (stats const &s)
 
unsigned size () const
 
std::string key (unsigned i) const
 
bool is_uint (unsigned i) const
 
bool is_double (unsigned i) const
 
unsigned uint_value (unsigned i) const
 
double double_value (unsigned i) const
 
- Public Member Functions inherited from object
 object (context &c)
 
 object (object const &s)
 
contextctx () const
 
void check_error () const
 

Friends

std::ostream & operator<< (std::ostream &out, stats const &s)
 

Additional Inherited Members

- Protected Attributes inherited from object
contextm_ctx
 

Detailed Description

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

Constructor & Destructor Documentation

stats ( context c)
inline

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

1233 :object(c), m_stats(0) {}
object(context &c)
Definition: z3++.h:275
stats ( context c,
Z3_stats  e 
)
inline

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

1234 :object(c) { init(e); }
object(context &c)
Definition: z3++.h:275
stats ( stats const &  s)
inline

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

1235 :object(s) { init(s.m_stats); }
object(context &c)
Definition: z3++.h:275
~stats ( )
inline

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

1236 { if (m_stats) Z3_stats_dec_ref(ctx(), m_stats); }
void Z3_API Z3_stats_dec_ref(Z3_context c, Z3_stats s)
Decrement the reference counter of the given statistics object.
context & ctx() const
Definition: z3++.h:277

Member Function Documentation

double double_value ( unsigned  i) const
inline

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

1250 { double r = Z3_stats_get_double_value(ctx(), m_stats, i); check_error(); return r; }
context & ctx() const
Definition: z3++.h:277
void check_error() const
Definition: z3++.h:278
double Z3_API Z3_stats_get_double_value(Z3_context c, Z3_stats s, unsigned idx)
Return the double value of the given statistical data.
bool is_double ( unsigned  i) const
inline

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

1248 { Z3_bool r = Z3_stats_is_double(ctx(), m_stats, i); check_error(); return r != 0; }
int Z3_bool
Z3 Boolean type. It is just an alias for int.
Definition: z3_api.h:110
context & ctx() const
Definition: z3++.h:277
void check_error() const
Definition: z3++.h:278
Z3_bool Z3_API Z3_stats_is_double(Z3_context c, Z3_stats s, unsigned idx)
Return Z3_TRUE if the given statistical data is a double.
bool is_uint ( unsigned  i) const
inline

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

1247 { Z3_bool r = Z3_stats_is_uint(ctx(), m_stats, i); check_error(); return r != 0; }
int Z3_bool
Z3 Boolean type. It is just an alias for int.
Definition: z3_api.h:110
context & ctx() const
Definition: z3++.h:277
void check_error() const
Definition: z3++.h:278
Z3_bool Z3_API Z3_stats_is_uint(Z3_context c, Z3_stats s, unsigned idx)
Return Z3_TRUE if the given statistical data is a unsigned integer.
std::string key ( unsigned  i) const
inline

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

1246 { Z3_string s = Z3_stats_get_key(ctx(), m_stats, i); check_error(); return s; }
Z3_string Z3_API Z3_stats_get_key(Z3_context c, Z3_stats s, unsigned idx)
Return the key (a string) for a particular statistical data.
context & ctx() const
Definition: z3++.h:277
void check_error() const
Definition: z3++.h:278
const char * Z3_string
Z3 string type. It is just an alias for const char *.
Definition: z3_api.h:119
operator Z3_stats ( ) const
inline

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

1237 { return m_stats; }
stats& operator= ( stats const &  s)
inline

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

1238  {
1239  Z3_stats_inc_ref(s.ctx(), s.m_stats);
1240  if (m_stats) Z3_stats_dec_ref(ctx(), m_stats);
1241  m_ctx = s.m_ctx;
1242  m_stats = s.m_stats;
1243  return *this;
1244  }
void Z3_API Z3_stats_inc_ref(Z3_context c, Z3_stats s)
Increment the reference counter of the given statistics object.
void Z3_API Z3_stats_dec_ref(Z3_context c, Z3_stats s)
Decrement the reference counter of the given statistics object.
context & ctx() const
Definition: z3++.h:277
context * m_ctx
Definition: z3++.h:273
unsigned size ( ) const
inline

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

1245 { return Z3_stats_size(ctx(), m_stats); }
context & ctx() const
Definition: z3++.h:277
unsigned Z3_API Z3_stats_size(Z3_context c, Z3_stats s)
Return the number of statistical data in s.
unsigned uint_value ( unsigned  i) const
inline

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

1249 { unsigned r = Z3_stats_get_uint_value(ctx(), m_stats, i); check_error(); return r; }
context & ctx() const
Definition: z3++.h:277
void check_error() const
Definition: z3++.h:278
unsigned Z3_API Z3_stats_get_uint_value(Z3_context c, Z3_stats s, unsigned idx)
Return the unsigned value of the given statistical data.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
stats const &  s 
)
friend

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

1251 { out << Z3_stats_to_string(s.ctx(), s); return out; }
Z3_string Z3_API Z3_stats_to_string(Z3_context c, Z3_stats s)
Convert a statistics into a string.