Z3
Public Member Functions
array< T > Class Template Reference

Public Member Functions

 array (unsigned sz)
 
template<typename T2 >
 array (ast_vector_tpl< T2 > const &v)
 
void resize (unsigned sz)
 
unsigned size () const
 
T & operator[] (int i)
 
T const & operator[] (int i) const
 
T const * ptr () const
 
T * ptr ()
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ array() [1/2]

array ( unsigned  sz)
inline

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

457 :m_array(new T[sz]),m_size(sz) {}

◆ array() [2/2]

array ( ast_vector_tpl< T2 > const &  v)

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

2317  :m_array(new T[v.size()]), m_size(v.size()) {
2318  for (unsigned i = 0; i < m_size; i++) {
2319  m_array[i] = v[i];
2320  }
2321  }

Member Function Documentation

◆ operator[]() [1/2]

T& operator[] ( int  i)
inline

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

462 { assert(0 <= i); assert(static_cast<unsigned>(i) < m_size); return m_array[i]; }

◆ operator[]() [2/2]

T const& operator[] ( int  i) const
inline

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

463 { assert(0 <= i); assert(static_cast<unsigned>(i) < m_size); return m_array[i]; }

◆ ptr() [1/2]

T* ptr ( )
inline

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

465 { return m_array.get(); }

◆ ptr() [2/2]

T const* ptr ( ) const
inline

◆ resize()

void resize ( unsigned  sz)
inline

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

460 { m_array.reset(new T[sz]); m_size = sz; }

Referenced by solver::trail().

◆ size()

unsigned size ( ) const
inline