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

Public Member Functions

 symbol (context &c, Z3_symbol s)
 
 symbol (symbol const &s)
 
symboloperator= (symbol const &s)
 
 operator Z3_symbol () const
 
Z3_symbol_kind kind () const
 
std::string str () const
 
int to_int () 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, symbol const &s)
 

Additional Inherited Members

- Protected Attributes inherited from object
contextm_ctx
 

Detailed Description

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

Constructor & Destructor Documentation

§ symbol() [1/2]

symbol ( context c,
Z3_symbol  s 
)
inline

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

341 :object(c), m_sym(s) {}
object(context &c)
Definition: z3++.h:330

§ symbol() [2/2]

symbol ( symbol const &  s)
inline

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

342 :object(s), m_sym(s.m_sym) {}
object(context &c)
Definition: z3++.h:330

Member Function Documentation

§ kind()

Z3_symbol_kind kind ( ) const
inline

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

Referenced by z3::operator<<().

345 { return Z3_get_symbol_kind(ctx(), m_sym); }
context & ctx() const
Definition: z3++.h:332

§ operator Z3_symbol()

operator Z3_symbol ( ) const
inline

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

344 { return m_sym; }

§ operator=()

symbol& operator= ( symbol const &  s)
inline

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

343 { m_ctx = s.m_ctx; m_sym = s.m_sym; return *this; }
context * m_ctx
Definition: z3++.h:328

§ str()

std::string str ( ) const
inline

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

Referenced by z3::operator<<().

346 { assert(kind() == Z3_STRING_SYMBOL); return Z3_get_symbol_string(ctx(), m_sym); }
Z3_symbol_kind kind() const
Definition: z3++.h:345
context & ctx() const
Definition: z3++.h:332

§ to_int()

int to_int ( ) const
inline

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

Referenced by z3::operator<<().

347 { assert(kind() == Z3_INT_SYMBOL); return Z3_get_symbol_int(ctx(), m_sym); }
Z3_symbol_kind kind() const
Definition: z3++.h:345
context & ctx() const
Definition: z3++.h:332

Friends And Related Function Documentation

§ operator<<

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

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

351  {
352  if (s.kind() == Z3_INT_SYMBOL)
353  out << "k!" << s.to_int();
354  else
355  out << s.str().c_str();
356  return out;
357  }