|
lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
Dynamic array class. More...
#include <dynamic_array.h>
Public Types | |
| enum | consume_t { consume } |
| Allows for consuming construction from reference. More... | |
| typedef Heap | heap_type |
| Type of the heap used by this vector. | |
| typedef heap_type::size_type | size_type |
| Type of the size returned by this vector. | |
| typedef Element | value_type |
| Type of the elements contained by this vector. | |
| typedef value_type * | pointer |
| Type of pointers to the elements contained by this vector. | |
| typedef const value_type * | const_pointer |
| Type of constant pointers to the elements contained by this vector. | |
| typedef value_type & | reference |
| Type of references to the elements contained by this vector. | |
| typedef const value_type & | const_reference |
| Type of constant references to the elements contained by this vector. | |
| typedef pointer | iterator |
| Type of iterators to the elements contained by this vector. | |
| typedef const_pointer | const_iterator |
| Type of constant iterators to the elements contained by this vector. | |
Public Member Functions | |
| dynamic_array () | |
| Constructs an empty vector. | |
| dynamic_array (size_type capacity) | |
| Constructs an empty vector. | |
| dynamic_array (const dynamic_array &right) | |
| Copies all elements from the given vector to this vector. | |
| dynamic_array (dynamic_array &right, consume_t) | |
| Moves all elements from the given vector to this vector. | |
| ~dynamic_array () | |
| Destroys all elements in this vector. | |
| dynamic_array & | operator= (const dynamic_array &right) |
| Copies all elements of the given vector to this vector. | |
| LEAN_INLINE void * | allocate_back () |
| Returns a pointer to the next non-constructed element. | |
| LEAN_INLINE reference | shift_back (value_type *newElement) |
| Marks the next element as constructed. | |
| LEAN_INLINE reference | push_back () |
| Appends a default-constructed element to this vector. | |
| LEAN_INLINE pointer | push_back (size_type count) |
| Appends a default-constructed element to this vector. | |
| LEAN_INLINE void | push_back (const value_type &value) |
| Appends the given element to this vector. | |
| LEAN_INLINE void | pop_back () |
| Removes the last element from this vector. | |
| LEAN_INLINE void | clear () |
| Clears all elements from this vector. | |
| LEAN_INLINE void | reset (size_type newCapacity) |
| Reserves space for the given number of elements. | |
| LEAN_INLINE reference | front (void) |
| Gets the first element in the vector, access violation on failure. | |
| LEAN_INLINE const_reference | front (void) const |
| Gets the first element in the vector, access violation on failure. | |
| LEAN_INLINE reference | back (void) |
| Gets the last element in the vector, access violation on failure. | |
| LEAN_INLINE const_reference | back (void) const |
| Gets the last element in the vector, access violation on failure. | |
| LEAN_INLINE reference | operator[] (size_type pos) |
| Gets an element by position, access violation on failure. | |
| LEAN_INLINE const_reference | operator[] (size_type pos) const |
| Gets an element by position, access violation on failure. | |
| LEAN_INLINE iterator | begin (void) |
| Returns an iterator to the first element contained by this vector. | |
| LEAN_INLINE const_iterator | begin (void) const |
| Returns a constant iterator to the first element contained by this vector. | |
| LEAN_INLINE iterator | end (void) |
| Returns an iterator beyond the last element contained by this vector. | |
| LEAN_INLINE const_iterator | end (void) const |
| Returns a constant iterator beyond the last element contained by this vector. | |
| LEAN_INLINE bool | empty (void) const |
| Returns true if the vector is empty. | |
| LEAN_INLINE size_type | size (void) const |
| Returns the number of elements contained by this vector. | |
| LEAN_INLINE void | swap (dynamic_array &right) throw () |
| Swaps the contents of this vector and the given vector. | |
Dynamic array class.
| enum lean::containers::dynamic_array::consume_t |
1.7.6.1