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)
 
 ~array ()
 
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 394 of file z3++.h.

Constructor & Destructor Documentation

◆ array() [1/2]

array ( unsigned  sz)
inline

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

400 :m_size(sz) { m_array = new T[sz]; }

◆ array() [2/2]

array ( ast_vector_tpl< T2 > const &  v)

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

1982  {
1983  m_array = new T[v.size()];
1984  m_size = v.size();
1985  for (unsigned i = 0; i < m_size; i++) {
1986  m_array[i] = v[i];
1987  }
1988  }

◆ ~array()

~array ( )
inline

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

403 { delete[] m_array; }

Member Function Documentation

◆ operator[]() [1/2]

T& operator[] ( int  i)
inline

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

406 { 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 407 of file z3++.h.

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

◆ ptr() [1/2]

T const* ptr ( ) const
inline

◆ ptr() [2/2]

T* ptr ( )
inline

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

409 { return m_array; }

◆ resize()

void resize ( unsigned  sz)
inline

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

Referenced by solver::trail().

404 { delete[] m_array; m_size = sz; m_array = new T[sz]; }

◆ size()

unsigned size ( ) const
inline