Inline Array

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

Data Structures | Functions
Inline Array
Eina C++Eina C++ » | Data Types » Containers

Inline array is a container that stores the data itself not pointers to data, this means there is no memory fragmentation, also for small data types(such as char, short, int, etc.) it's more memory efficient. More...

## Data Structures
struct | efl::eina::_inarray_access_traits
class | efl::eina::inarray< T >
| Inline array class. More...
struct | efl::eina::range_inarray< T >
| Range class for inarray. More...
struct | efl::eina::_inarray_common_base
| Common inarray interface for every value type. More...
class | efl::eina::_pod_inarray< T >
| Optimized specialization of the base inline array for POD types. More...
class | efl::eina::_nonpod_inarray< T >

## Functions
template<typename T >
bool | efl::eina::operator== (inarray< T > const &lhs, inarray< T > const &rhs)
| Check if two inline arrays are equal. More...
template<typename T >
bool | efl::eina::operator!= (inarray< T > const &lhs, inarray< T > const &rhs)
| Check if two inline arrays are different. More...
template<typename T >
void | efl::eina::swap (inarray< T > &lhs, inarray< T > &rhs)
| Swap content between two inline arrays. More...

## Detailed Description

Inline array is a container that stores the data itself not pointers to data, this means there is no memory fragmentation, also for small data types(such as char, short, int, etc.) it's more memory efficient.

## Function Documentation

template<typename T >

bool efl::eina::operator== | ( | inarray< T > const & | lhs,
|  | inarray< T > const & | rhs
| ) |  |

Check if two inline arrays are equal.

Parameters

  lhs | Inline array at the left side of the expression.
  rhs | Inline array at the right side of the expression.

Returns
  `true` if the arrays are equals, `false` otherwise.

This operator checks if the given inline arrays are equal. To be considered equal both arrays need to have the same number of elements, and each element in one array must be equal to the element at the same position in the other array.

template<typename T >

bool efl::eina::operator!= | ( | inarray< T > const & | lhs,
|  | inarray< T > const & | rhs
| ) |  |

Check if two inline arrays are different.

Parameters

  lhs | Inline array at the left side of the expression.
  rhs | Inline array at the right side of the expression.

Returns
  `true` if the arrays are not equal , `false` otherwise.

This operator returns the opposite of operator==(inarray<T> const& lhs, inarray<T> const& rhs).

template<typename T >

void efl::eina::swap | ( | inarray< T > & | lhs,
|  | inarray< T > & | rhs
| ) |  |

Swap content between two inline arrays.

Parameters

  other | Other inline array of the same type.

Referenced by efl::eina::_pod_inarray< T >::swap(), and efl::eina::_nonpod_inarray< T >::swap().