Rudiments
collection.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information.
3
4#ifndef RUDIMENTS_COLLECTION_H
5#define RUDIMENTS_COLLECTION_H
6
7#include <rudiments/object.h>
8#include <rudiments/comparator.h>
9
11class collection : virtual public object {
12 public:
13
15 collection();
16
20
24
26 virtual ~collection();
27
30 virtual const char *getType()=0;
31
33 virtual uint64_t getCount()=0;
34
39
42 void setComparator(comparator *newcomp);
43
48 virtual bool isReadOnly();
49
54 virtual bool isBlockBased();
55
60 virtual uint64_t getBlockSize();
61
66 virtual bool isSequentialAccess();
67
110 virtual void setManageValues(bool manage);
111
119 virtual bool getManageValues();
120
184 virtual void setManageArrayValues(bool manage);
185
193 virtual bool getManageArrayValues();
194
237 virtual void setManageKeys(bool manage);
238
246 virtual bool getManageKeys();
247
312 virtual void setManageArrayKeys(bool manage);
313
321 virtual bool getManageArrayKeys();
322
324 virtual bool clear()=0;
325
328 virtual ssize_t write()=0;
329
331 virtual ssize_t write(output *out)=0;
332
335 virtual ssize_t writeJson()=0;
336
343 virtual ssize_t writeJson(bool indent)=0;
344
346 virtual ssize_t writeJson(output *out)=0;
347
353 virtual ssize_t writeJson(output *out, bool indent)=0;
354
355 #include <rudiments/private/collection.h>
356};
357
358#include <rudiments/private/collectioninlines.h>
359
360#endif
Definition collection.h:11
virtual bool clear()=0
virtual ~collection()
Definition collectioninlines.h:44
virtual const char * getType()=0
void setComparator(comparator *newcomp)
Definition collectioninlines.h:53
virtual bool getManageArrayValues()
Definition collectioninlines.h:99
collection & operator=(collection &c)
Definition collectioninlines.h:30
virtual uint64_t getCount()=0
virtual ssize_t write()=0
virtual bool getManageArrayKeys()
Definition collectioninlines.h:121
virtual bool isReadOnly()
Definition collectioninlines.h:68
virtual ssize_t writeJson(output *out, bool indent)=0
virtual ssize_t writeJson(output *out)=0
virtual void setManageArrayValues(bool manage)
Definition collectioninlines.h:93
virtual ssize_t writeJson()=0
virtual void setManageValues(bool manage)
Definition collectioninlines.h:62
virtual void setManageKeys(bool manage)
Definition collectioninlines.h:104
virtual ssize_t writeJson(bool indent)=0
virtual void setManageArrayKeys(bool manage)
Definition collectioninlines.h:115
virtual bool getManageValues()
Definition collectioninlines.h:88
virtual bool getManageKeys()
Definition collectioninlines.h:110
virtual uint64_t getBlockSize()
Definition collectioninlines.h:78
collection()
Definition collectioninlines.h:9
comparator * getComparator()
Definition collectioninlines.h:48
virtual ssize_t write(output *out)=0
virtual bool isSequentialAccess()
Definition collectioninlines.h:83
virtual bool isBlockBased()
Definition collectioninlines.h:73
Definition comparator.h:11
Definition object.h:10
Definition output.h:11