-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerator.h
43 lines (37 loc) · 861 Bytes
/
generator.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef GENERATOR_H
#define GENERATOR_H
#include <string>
#include <vector>
#include <constants.h>
class Generator
{
public:
Generator(int _numColumns, int _maxLengthString);
~Generator();
std::string getHeader();
std::string generateRow();
private:
struct Column
{
std::string columnName;
Type typeName;
bool isBadChar{false};
};
enum class Cell
{
header,
simple
};
int numColumns;
int maxLengthString;
std::vector<Column> header;
Type getRandomType();
int randomInt(int min, int max);
float randomFloat(float min, float max);
bool isUnacceptableChar{false};
std::string getRandomData();
void generateHeader();
std::string getTypeAsString(Type type);
std::string generateRandomString(Cell flag, int len);
};
#endif // GENERATOR_H