Z3
 
Loading...
Searching...
No Matches
ast_vector_tpl< T >::iterator Class Referencefinal

#include <z3++.h>

Public Member Functions

 iterator (ast_vector_tpl const *v, unsigned i)
 
bool operator== (iterator const &other) const noexcept
 
bool operator!= (iterator const &other) const noexcept
 
iteratoroperator++ () noexcept
 
void set (T &arg)
 
iterator operator++ (int) noexcept
 
T * operator-> () const
 
operator* () const
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ iterator()

template<typename T >
iterator ( ast_vector_tpl const * v,
unsigned i )
inline

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

628: m_vector(v), m_index(i) {}

Member Function Documentation

◆ operator!=()

template<typename T >
bool operator!= ( iterator const & other) const
inlinenoexcept

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

633 {
634 return other.m_index != m_index;
635 };

◆ operator*()

template<typename T >
T operator* ( ) const
inline

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

645{ return (*m_vector)[m_index]; }

Referenced by ast_vector_tpl< T >::iterator::operator->().

◆ operator++() [1/2]

template<typename T >
iterator & operator++ ( )
inlinenoexcept

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

636 {
637 ++m_index;
638 return *this;
639 }

◆ operator++() [2/2]

template<typename T >
iterator operator++ ( int )
inlinenoexcept

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

643{ iterator tmp = *this; ++m_index; return tmp; }
iterator(ast_vector_tpl const *v, unsigned i)
Definition z3++.h:628

◆ operator->()

template<typename T >
T * operator-> ( ) const
inline

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

644{ return &(operator*()); }

◆ operator==()

template<typename T >
bool operator== ( iterator const & other) const
inlinenoexcept

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

630 {
631 return other.m_index == m_index;
632 };

◆ set()

template<typename T >
void set ( T & arg)
inline

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

640 {
641 Z3_ast_vector_set(m_vector->ctx(), *m_vector, m_index, arg);
642 }
context & ctx() const
Definition z3++.h:474
void Z3_API Z3_ast_vector_set(Z3_context c, Z3_ast_vector v, unsigned i, Z3_ast a)
Update position i of the AST vector v with the AST a.