Z3
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Friends
ast_vector_tpl< T > Class Template Reference
+ Inheritance diagram for ast_vector_tpl< T >:

Public Member Functions

 ast_vector_tpl (context &c)
 
 ast_vector_tpl (context &c, Z3_ast_vector v)
 
 ast_vector_tpl (ast_vector_tpl const &s)
 
 ~ast_vector_tpl ()
 
 operator Z3_ast_vector () const
 
unsigned size () const
 
operator[] (unsigned i) const
 
void push_back (T const &e)
 
void resize (unsigned sz)
 
back () const
 
void pop_back ()
 
bool empty () const
 
ast_vector_tploperator= (ast_vector_tpl const &s)
 
- 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, ast_vector_tpl const &v)
 

Additional Inherited Members

- Protected Attributes inherited from object
contextm_ctx
 

Detailed Description

template<typename T>
class z3::ast_vector_tpl< T >

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

Constructor & Destructor Documentation

ast_vector_tpl ( context c)
inline

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

:object(c) { init(Z3_mk_ast_vector(c)); }
ast_vector_tpl ( context c,
Z3_ast_vector  v 
)
inline

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

:object(c) { init(v); }
ast_vector_tpl ( ast_vector_tpl< T > const &  s)
inline

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

:object(s), m_vector(s.m_vector) { Z3_ast_vector_inc_ref(ctx(), m_vector); }
~ast_vector_tpl ( )
inline

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

{ Z3_ast_vector_dec_ref(ctx(), m_vector); }

Member Function Documentation

T back ( ) const
inline

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

{ return operator[](size() - 1); }
bool empty ( ) const
inline

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

{ return size() == 0; }
operator Z3_ast_vector ( ) const
inline

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

{ return m_vector; }
ast_vector_tpl& operator= ( ast_vector_tpl< T > const &  s)
inline

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

{
Z3_ast_vector_inc_ref(s.ctx(), s.m_vector);
Z3_ast_vector_dec_ref(ctx(), m_vector);
m_ctx = s.m_ctx;
m_vector = s.m_vector;
return *this;
}
T operator[] ( unsigned  i) const
inline

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

Referenced by ast_vector_tpl< T >::back().

{ Z3_ast r = Z3_ast_vector_get(ctx(), m_vector, i); check_error(); return cast_ast<T>()(ctx(), r); }
void pop_back ( )
inline

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

{ assert(size() > 0); resize(size() - 1); }
void push_back ( T const &  e)
inline

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

{ Z3_ast_vector_push(ctx(), m_vector, e); check_error(); }
void resize ( unsigned  sz)
inline

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

Referenced by ast_vector_tpl< T >::pop_back().

{ Z3_ast_vector_resize(ctx(), m_vector, sz); check_error(); }
unsigned size ( ) const
inline

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
ast_vector_tpl< T > const &  v 
)
friend

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

{ out << Z3_ast_vector_to_string(v.ctx(), v); return out; }