diff options
Diffstat (limited to 'enginedata.h')
-rw-r--r-- | enginedata.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/enginedata.h b/enginedata.h index e5d488e..9cf0b53 100644 --- a/enginedata.h +++ b/enginedata.h @@ -3,7 +3,6 @@ #include <string> #include <map> #include <list> -#include "Maybe.h" using namespace std; @@ -12,18 +11,10 @@ struct Row; struct ColHeader; struct Table; -string serialise(const ColHeader &header,const RowItem &rowitem); -string serialise(int32_t v); -string serialise(uint32_t v); -string serialise(unsigned char *v,int len); - - struct RowItem{ - union { //watch the pointerness or not-pointerness of the attributes! - int32_t rh_int32; - uint32_t rh_uint32; - unsigned char *rh_bytes; - } u; + int32_t rh_int32; + uint32_t rh_uint32; + unsigned char *rh_bytes; }; enum ColHeaderType{ @@ -57,9 +48,19 @@ struct Table{ Table(const string &_n,const int _nc,const ColHeader *const _hd); ~Table(void); + Table(const Table &other); Table(Table &&other); bool insert(Row &&row); bool insert(Row &row); - list<Row> find(const string &key); }; + +string serialise(const ColHeader &header,const RowItem &rowitem); +string serialise(int32_t v); +string serialise(uint32_t v); +string serialise(unsigned char *v,int len); + +int riCompare(const ColHeader &header,const RowItem &ri1,const RowItem &ri2); +int riCompare(int32_t v1,int32_t v2); +int riCompare(uint32_t v1,uint32_t v2); +int riCompare(unsigned char *v1,unsigned char *v2,int len); |