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)
 
const T & operator[] (int i) const
 
const T * ptr () const
 
T * ptr ()
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ array() [1/2]

array ( unsigned  sz)
inline

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

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

◆ array() [2/2]

array ( ast_vector_tpl< T2 > const &  v)

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

2284  :m_array(new T[v.size()]), m_size(v.size()) {
2285  for (unsigned i = 0; i < m_size; i++) {
2286  m_array[i] = v[i];
2287  }
2288  }

Member Function Documentation

◆ operator[]() [1/2]

T& operator[] ( int  i)
inline

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

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

◆ operator[]() [2/2]

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

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

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

◆ ptr() [1/2]

T* ptr ( )
inline

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

443 { return m_array.get(); }

◆ ptr() [2/2]

const T* ptr ( ) const
inline

◆ resize()

void resize ( unsigned  sz)
inline

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

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

Referenced by solver::trail().

◆ size()

unsigned size ( ) const
inline