aboutsummaryrefslogtreecommitdiff
path: root/engine.cpp
blob: dd0f5f4bdeed09c6eb26700de9c0a9f8bdae3254 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <vector>
#include <map>
#include <cstdlib>
#include "enginedata.h"

using namespace std;


map<string,Table> tables;


int main(int argc,char **argv){
	ColHeader *header=new ColHeader[3];
	header[0]={RH_INT32,0};
	header[1]={RH_UINT32,0};
	header[2]={RH_BYTES,10};
	tables.emplace("hoi",Table("hoi",3,header));
	Table *hoitb=&tables.at("hoi");
	Row row(3,hoitb);
	row.items[0].u.rh_int32=42;
	row.items[1].u.rh_uint32=42;
	row.items[2].u.rh_bytes=new unsigned char[10];
	strcpy((char*)row.items[2].u.rh_bytes,"hallo daar");
	hoitb->insert(row);
	cout<<"hoitb has "<<hoitb->rows.size()<<" row"<<(hoitb->rows.size()==1?"":"s")<<endl;
	return 0;
}