Rudiments

dynamicarray.h
1 // Copyright (c) 1999-2018 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_DYNAMICARRAY_H
5 #define RUDIMENTS_DYNAMICARRAY_H
6
7 #include <rudiments/private/dynamicarrayincludes.h>
8
39 template < class valuetype >
40 class dynamicarray {
41 public:
43 dynamicarray();
44
49 dynamicarray(uint64_t initiallength, uint64_t incrementlength);
50
53 dynamicarray(const dynamicarray<valuetype> &v);
54
57 dynamicarray<valuetype> &operator=(
58 const dynamicarray<valuetype> &v);
59
62 ~dynamicarray();
63
66 valuetype &operator[](uint64_t index);
67
68 /* Returns the length of the initial extent. */
69 uint64_t getInitialLength() const;
70
71 /* Returns the length of each incremental extent. */
72 uint64_t getIncrementLength() const;
73
75 uint64_t getLength() const;
76
78 void clear();
79
82 void clear(uint64_t initiallength, uint64_t incrementlength);
83
84 #include <rudiments/private/dynamicarray.h>
85 };
86
87 #include <rudiments/private/dynamicarrayinlines.h>
88
89 #endif
dynamicarray
Definition: dynamicarray.h:40
dynamicarray::dynamicarray
dynamicarray()
Definition: dynamicarrayinlines.h:8
dynamicarray::getLength
uint64_t getLength() const
Definition: dynamicarrayinlines.h:123
dynamicarray::clear
void clear()
Definition: dynamicarrayinlines.h:182
dynamicarray::~dynamicarray
~dynamicarray()
Definition: dynamicarrayinlines.h:95
dynamicarray::operator=
dynamicarray< valuetype > & operator=(const dynamicarray< valuetype > &v)
Definition: dynamicarrayinlines.h:29
dynamicarray::operator[]
valuetype & operator[](uint64_t index)
Definition: dynamicarrayinlines.h:101