4#include <rudiments/private/new.h>
5#include <rudiments/bytestring.h>
7template<
class valuetype >
13template<
class valuetype >
22template<
class valuetype >
26 construct(v.initcount,v.inccount);
30template<
class valuetype >
38template<
class valuetype >
43 clear(v.initcount,v.inccount);
45 construct(v.initcount,v.inccount);
51template<
class valuetype >
58 construct(initcount,inccount);
64template<
class valuetype >
68 extents.setManageArrayValues(
true);
74 curext=extents.getFirst();
78template<
class valuetype >
86 totalcount=v.totalcount;
87 lastcount=v.lastcount;
88 initcount=v.initcount;
92 bool managevalues=this->getManageValues();
93 bool managearrayvalues=this->getManageArrayValues();
94 for (uint64_t
i=0;
i<v.getCount();
i++) {
95 find(
i)=node_duplicate_value(&(v.find(
i)),
96 managevalues,managearrayvalues);
101 curext=extents.getFirst();
107template<
class valuetype >
110 lastcount=v.getCount();
111 bool managevalues=this->getManageValues();
112 bool managearrayvalues=this->getManageArrayValues();
113 for (uint64_t
i=0;
i<lastcount;
i++) {
114 find(
i)=node_duplicate_value(&(v[
i]),
115 managevalues,managearrayvalues);
119template<
class valuetype >
122 deleteManagedValues();
125template<
class valuetype >
131template<
class valuetype >
137template<
class valuetype >
143template<
class valuetype >
146 uint64_t start, uint64_t count) {
147 uint64_t end=start+count;
148 for (uint64_t
i=start;
i<end;
i++) {
153template<
class valuetype >
157 if (
index>=lastcount) {
182template<
class valuetype >
188template<
class valuetype >
194template<
class valuetype >
200template<
class valuetype >
203 uint64_t
inc=(extents.getCount())?inccount:initcount;
204 while (totalcount<count) {
212template<
class valuetype >
219 if (
index<initcount) {
220 curext=extents.getFirst();
233 eind=initcount+inccount*(curind-1);
238template<
class valuetype >
252template<
class valuetype >
255 return clear(initcount,inccount);
258template<
class valuetype >
262 bool managevalues=this->getManageValues();
263 bool managearrayvalues=this->getManageArrayValues();
266 if (managevalues || managearrayvalues) {
268 uint64_t count=initcount;
269 for (curext=extents.getFirst();
i<lastcount && curext;
272 for (uint64_t
j=0;
i<lastcount &&
j<count;
j++) {
273 node_delete_value(&(data[
j]),
274 managevalues,managearrayvalues);
275 node_zero_value(&(data[
j]));
283template<
class valuetype >
288 deleteManagedValues();
293 curext=extents.getLast();
294 while (curext!=extents.getFirst()) {
296 extents.remove(curext);
302 for (uint64_t
i=0;
i<initcount;
i++) {
307 #if __GNUC__ == 2 && __GNUC_MINOR__ == 91
327 curext=extents.getFirst();
334 totalcount=initcount;
Definition arraycollection.h:13
avltreenode(valuetype value)
Definition avltreeinlines.h:555
treenode< valuetype > * getNext()
Definition avltreeinlines.h:671
treenode< valuetype > * getPrevious()
Definition avltreeinlines.h:620
valuetype getValue()
Definition avltreeinlines.h:578
static void * set(void *dest, byte_t character, size_t size)
collection & operator=(collection &c)
Definition collectioninlines.h:30
Definition dynamicarray.h:52
dynamicarray()
Definition dynamicarrayinlines.h:9
bool clear()
Definition dynamicarrayinlines.h:254
void zero(uint64_t count)
Definition dynamicarrayinlines.h:127
~dynamicarray()
Definition dynamicarrayinlines.h:121
uint64_t getCount()
Definition dynamicarrayinlines.h:196
dynamicarray< valuetype > & operator=(dynamicarray< valuetype > &v)
Definition dynamicarrayinlines.h:40
valuetype & operator[](uint64_t index)
Definition dynamicarrayinlines.h:155
void set(byte_t value, uint64_t count)
Definition dynamicarrayinlines.h:139