Rudiments
tablecollection.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information.
3
4#ifndef RUDIMENTS_TABLECOLLECTION_H
5#define RUDIMENTS_TABLECOLLECTION_H
6
7#include <rudiments/nodecollection.h>
8
34template <class valuetype>
36 public:
37
40
44
48
50 virtual ~tablecollection();
51
53 virtual const char *getType();
54
56 virtual uint64_t getCount();
57
62 virtual void setColumnName(uint64_t col,
63 const char *name)=0;
64
67 virtual const char *getColumnName(uint64_t col)=0;
68
74 virtual void setCopyColumnNames(bool copy);
75
81 virtual bool getCopyColumnNames();
82
88 virtual uint64_t getColumnCount()=0;
89
94 virtual void setValue(uint64_t row,
95 uint64_t col,
96 valuetype value)=0;
97
100 virtual valuetype getValue(uint64_t row,
101 uint64_t col)=0;
102
104 virtual valuetype &getReference(uint64_t row,
105 uint64_t col)=0;
106
109 virtual valuetype getValue(uint64_t row,
110 const char * colname)=0;
111
121 virtual uint64_t getRowCount()=0;
122
126 virtual bool getAllRowsAvailable()=0;
127
130 virtual ssize_t write();
131
133 virtual ssize_t write(output *out);
134
137 virtual ssize_t writeJson();
138
145 virtual ssize_t writeJson(bool indent);
146
149 virtual ssize_t writeJson(output *out);
150
157 virtual ssize_t writeJson(output *out, bool indent);
158
159 #include <rudiments/private/tablecollection.h>
160};
161
162#include <rudiments/private/tablecollectioninlines.h>
163
164#endif
Definition avltree.h:11
Definition collection.h:11
Definition output.h:11
Definition tablecollection.h:35
virtual void setColumnName(uint64_t col, const char *name)=0
virtual ~tablecollection()
Definition tablecollectioninlines.h:31
virtual valuetype getValue(uint64_t row, const char *colname)=0
virtual bool getCopyColumnNames()
Definition tablecollectioninlines.h:54
tablecollection & operator=(tablecollection &c)
Definition tablecollectioninlines.h:21
virtual valuetype getValue(uint64_t row, uint64_t col)=0
virtual uint64_t getColumnCount()=0
virtual valuetype & getReference(uint64_t row, uint64_t col)=0
virtual bool getAllRowsAvailable()=0
virtual const char * getType()
Definition tablecollectioninlines.h:36
virtual uint64_t getCount()
Definition tablecollectioninlines.h:42
virtual const char * getColumnName(uint64_t col)=0
virtual ssize_t writeJson()
Definition tablecollectioninlines.h:72
virtual void setValue(uint64_t row, uint64_t col, valuetype value)=0
virtual uint64_t getRowCount()=0
virtual void setCopyColumnNames(bool copy)
Definition tablecollectioninlines.h:48
tablecollection()
Definition tablecollectioninlines.h:6
virtual ssize_t write()
Definition tablecollectioninlines.h:60