00001
#ifndef TUPLEGENERATOR_H
00002
#define TUPLEGENERATOR_H
00003
00004
#include <string>
00005
#include <iostream>
00006
#include <stdio.h>
00007
#include <stdlib.h>
00008
#include <sys/time.h>
00009
#include "TupleDescription.h"
00010
00011
BOREALIS_NAMESPACE_BEGIN
00012
using namespace std;
00013
00014 class TupleGenerator
00015 {
00016
public:
00017
static void fillWithInt32(
char *p );
00018
static void fillWithInt64(
char *p );
00019
static void fillWithSingle(
char *p );
00020
static void fillWithDouble(
char *p );
00021
static void fillWithTimestamp(
char *p );
00022
00023
static void printInt32(
const char *p );
00024
static void printInt64(
const char *p );
00025
static void printSingle(
const char *p );
00026
static void printDouble(
const char *p );
00027
00028
static char*
generateTuple(
const char *format);
00029
static char*
generateTuple( TupleDescription *td );
00030
00031
static void printTuple(
const char* t,
const char *format );
00032
static void printTuple(
const char* t, TupleDescription *td );
00033
00034
private:
00035
static void fillWithChar(
char *p );
00036
00037
static void printChar(
const char *p );
00038
static void printTimestamp(
const char *p );
00039 };
00040
00041
BOREALIS_NAMESPACE_END
00042
#endif // TUPLEGENERATOR_H