|
ivl 679
|
1-dimensional array of type T More...
#include <ref_iterator_class.hpp>
Inherits array_common_base< array< T, data::ref_iterator< IT, CONST_IT, LENGTH, HAS_C_PTR::type, DERIVED_INFO > > >.
Public Types | |
| typedef types::t_if < types::t_and< types::is_ptr < stored_it_type >, is_wrt > , T *, invalid_data_init_arg > ::type | data_init_arg |
| typedef ptrdiff_t | diff_type |
| difference type of iterators | |
| typedef size_t | size_type |
| parameter of resize, in each class of the hierarchy | |
Public Member Functions | |
| ~array () | |
| destructor | |
Size functions | |
| size_t | length () const |
| Get the length of the element sequence. | |
| size_type | size () const |
| Get the size of the array. generic-class function. | |
| size_t | numel () const |
| Get the length of the element sequence. | |
Constructors | |
| array () | |
| Default constructor. | |
| array (int) | |
| with number (for null) | |
| array (const stored_it_type &it, illegal_ifn_fixedlen disable=illegal_ifn_fixedlen(), illegal_ifn_rnd disable2=illegal_ifn_rnd()) | |
| array (const stored_it_type &it, size_t n, illegal_if_fixedlen disable=illegal_if_fixedlen(), illegal_ifn_rnd disable_cond_2=illegal_ifn_rnd()) | |
| array (const stored_it_type &it, size_t n, const stored_it_type &it_end, illegal_if_fixedlen disable=illegal_if_fixedlen()) | |
| array (const stored_it_type &it, const stored_it_type &it_end, size_t n) | |
| array (const stored_it_type &it, const stored_it_type &it_end, illegal_ifn_rnd_and_fixedlen disable=illegal_ifn_rnd_and_fixedlen()) | |
| array (const this_type &a) | |
| Copy-constructor. | |
| template<class J , class S > | |
| array (size_t len, const array< J, S > &a) | |
| chain constructor with size_type and T& or A& | |
| template<class J , class S > | |
| array (size_t len, array< J, S > &a) | |
| chain constructor with size_type and T& or A& | |
| template<class J , class S > | |
| array (const array< J, S > &a) | |
| chain constructor with other type array | |
| template<class J , class S > | |
| array (array< J, S > &a) | |
| chain constructor with other type array | |
filler chain constructors | |
| array (size_t) | |
| used to work with NULL | |
| array (size_t len, const T *ptr, illegal_if_writeable=illegal_if_writeable()) | |
| chain constructor with size_type and T* | |
| array (size_t len, const data_init_arg &y) | |
| chain constructor with size_type and data_init_arg | |
Special member functions | |
| void | set_null () |
| bool | is_null () const |
| void | set_free (bool enable=true) |
Init member functions | |
| void | init (const array &o) |
| void | init (const stored_it_type &it, illegal_ifn_fixedlen disable=illegal_ifn_fixedlen(), illegal_ifn_rnd disable2=illegal_ifn_rnd()) |
| void | init (const stored_it_type &it, size_t n, illegal_if_fixedlen disable=illegal_if_fixedlen(), illegal_ifn_rnd disable_cond_2=illegal_ifn_rnd()) |
| void | init (const stored_it_type &it, size_t n, const stored_it_type &it_end, illegal_if_fixedlen disable=illegal_if_fixedlen()) |
| void | init (const stored_it_type &it, const stored_it_type &it_end, size_t n) |
| void | init (const stored_it_type &it, const stored_it_type &it_end, illegal_ifn_rnd_and_fixedlen disable=illegal_ifn_rnd_and_fixedlen()) |
| template<class J , class S > | |
| void | init (size_t len, const array< J, S > &a) |
| chain constructor with size_type and T& or A& | |
| template<class J , class S > | |
| void | init (size_t len, array< J, S > &a) |
| chain constructor with size_type and T& or A& | |
| template<class J , class S > | |
| void | init (const array< J, S > &a) |
| chain constructor with other type array | |
| template<class J , class S > | |
| void | init (array< J, S > &a) |
| chain constructor with other type array | |
| void | init (size_t s) |
| void | init (size_t len, const T *ptr, illegal_if_writeable disable=illegal_if_writeable()) |
| chain constructor with size_type and T* | |
| void | init (size_t len, const data_init_arg &y) |
setref member functions | |
| void | setref (const array &o) |
| void | setref (const stored_it_type &it, illegal_ifn_fixedlen disable=illegal_ifn_fixedlen(), illegal_ifn_rnd disable2=illegal_ifn_rnd()) |
| void | setref (const stored_it_type &it, size_t n, illegal_if_fixedlen disable=illegal_if_fixedlen(), illegal_ifn_rnd disable_cond_2=illegal_ifn_rnd()) |
| void | setref (const stored_it_type &it, size_t n, const stored_it_type &it_end, illegal_if_fixedlen disable=illegal_if_fixedlen()) |
| void | setref (const stored_it_type &it, const stored_it_type &it_end, size_t n) |
| void | setref (const stored_it_type &it, const stored_it_type &it_end, illegal_ifn_rnd_and_fixedlen disable=illegal_ifn_rnd_and_fixedlen()) |
| template<class J , class S > | |
| void | setref (size_t len, const array< J, S > &a) |
| template<class J , class S > | |
| void | setref (size_t len, array< J, S > &a) |
| template<class J , class S > | |
| void | setref (const array< J, S > &a) |
| template<class J , class S > | |
| void | setref (array< J, S > &a) |
| void | setref (size_t s) |
| void | setref (size_t len, const T *ptr, illegal_if_writeable disable=illegal_if_writeable()) |
| void | setref (size_t len, const data_init_arg &y) |
Assignement Operators | |
| template<class K > | |
| derived_type & | operator= (const K &k) |
| this_type & | operator= (const this_type &a) |
1-dimensional array of type T
This class is a very important specialization. It wraps any iterator (could be a user made iterator or an iterator from an stl container) to an ivl array. This class defines an simple one-dimensional array. IT should have the container iterator. CONST_IT the const_iterator. LENGTH should be 0, or a number for a fixed length container. give types::term as IT to make the array CONST. or give IT = const_iterator and CONST_IT = types::term to make the array CONST. or give IT = CONST_IT = const_iterator to make the array CONST. give IT = iterator and CONST_IT = types::term for an array with no const access (full access only). latest feature: ref iterator supports a flag that allows freeing the memory.
| typedef types::t_if<types::t_and< types::is_ptr<stored_it_type>, is_wrt>, T*, invalid_data_init_arg>::type array< T, data::ref_iterator< IT, CONST_IT, LENGTH, HAS_C_PTR, DERIVED_INFO > >::data_init_arg |
redefine data_init_arg ref_iterator arrays of T* may be initialized with the size and a T*
| array< T, data::ref_iterator< IT, CONST_IT, LENGTH, HAS_C_PTR, DERIVED_INFO > >::array | ( | const stored_it_type & | it, |
| illegal_ifn_fixedlen | disable = illegal_ifn_fixedlen(), |
||
| illegal_ifn_rnd | disable2 = illegal_ifn_rnd() |
||
| ) | [inline] |
Constructor from iterator, in case container is const and N is positive.
| array< T, data::ref_iterator< IT, CONST_IT, LENGTH, HAS_C_PTR, DERIVED_INFO > >::array | ( | const stored_it_type & | it, |
| size_t | n, | ||
| illegal_if_fixedlen | disable = illegal_if_fixedlen(), |
||
| illegal_ifn_rnd | disable_cond_2 = illegal_ifn_rnd() |
||
| ) | [inline] |
Constructor from iterator and size. in case iterator is random access
| array< T, data::ref_iterator< IT, CONST_IT, LENGTH, HAS_C_PTR, DERIVED_INFO > >::array | ( | const stored_it_type & | it, |
| size_t | n, | ||
| const stored_it_type & | it_end, | ||
| illegal_if_fixedlen | disable = illegal_if_fixedlen() |
||
| ) | [inline] |
Constructor from begin() iterator, size and end() iterator. for non-random-access iterators, and all other types.
| array< T, data::ref_iterator< IT, CONST_IT, LENGTH, HAS_C_PTR, DERIVED_INFO > >::array | ( | const stored_it_type & | it, |
| const stored_it_type & | it_end, | ||
| size_t | n | ||
| ) | [inline] |
Constructor from begin() iterator, size and end() iterator. for non-random-access iterators, and all other types.
| array< T, data::ref_iterator< IT, CONST_IT, LENGTH, HAS_C_PTR, DERIVED_INFO > >::array | ( | const stored_it_type & | it, |
| const stored_it_type & | it_end, | ||
| illegal_ifn_rnd_and_fixedlen | disable = illegal_ifn_rnd_and_fixedlen() |
||
| ) | [inline] |
Constructor from begin() iterator, size and end() iterator. for non-random-access iterators, and all other types.