Public Member Functions
efl::eina::inarray< T > Class Template Reference

Inline array class. More...

Public Member Functions

 inarray (Eina_Inarray *array)
 Create a new object from a handle to a native Eina_Inarray. More...
 
 inarray ()
 Default constructor. More...
 
 inarray (typename _base_type::size_type n, typename _base_type::value_type const &t)
 Construct an array object with n copies of t. More...
 
template<typename InputIterator >
 inarray (InputIterator i, InputIterator const &j, typename eina::enable_if<!eina::is_integral< InputIterator >::value >::type *=0)
 Create a inline array with elements from the given range. More...
 

Detailed Description

template<typename T>
class efl::eina::inarray< T >

Inline array class.

It provides an OOP interface to the Eina_Inarray functions, and automatically take care of allocating and deallocating resources using the RAII programming idiom.

It also provides additional member functions to facilitate the access to the array content, much like a STL vector.

Constructor & Destructor Documentation

§ inarray() [1/4]

template<typename T>
efl::eina::inarray< T >::inarray ( Eina_Inarray array)
inline

Create a new object from a handle to a native Eina_Inarray.

Parameters
arrayHandle to a native Eina_Inarray.

This constructor wraps a pre-allocated Eina_Inarray providing an OOP interface to it.

Warning
It is important to note that the created object gains ownership of the handle, deallocating it at destruction time.

§ inarray() [2/4]

template<typename T>
efl::eina::inarray< T >::inarray ( )
inline

Default constructor.

Creates an empty array.

§ inarray() [3/4]

template<typename T>
efl::eina::inarray< T >::inarray ( typename _base_type::size_type  n,
typename _base_type::value_type const &  t 
)
inline

Construct an array object with n copies of t.

Parameters
nNumber of elements.
tValue to be copied to each element.

This constructor creates an inline array with n elements, each one as a copy of t.

§ inarray() [4/4]

template<typename T>
template<typename InputIterator >
efl::eina::inarray< T >::inarray ( InputIterator  i,
InputIterator const &  j,
typename eina::enable_if<!eina::is_integral< InputIterator >::value >::type *  = 0 
)
inline

Create a inline array with elements from the given range.

Parameters
iIterator to the initial position. The element pointed by this iterator will be copied.
jIterator to the final position. The element pointed by this iterator will NOT be copied.

This constructor creates a inline array with copies of the elements between i and j in the same order.

Note
The ending element (pointed by j) is not copied.