-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvars.h
60 lines (42 loc) · 958 Bytes
/
vars.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/***********************************************************
* this code by Peter Semiletov is Public Domain *
**********************************************************/
#ifndef VARS_H
#define VARS_H
#include <string>
#include <vector>
#include <random>
#include "macro.h"
//using namespace std;
#define VT_NONE 0
#define VT_SINGLE 1
#define VT_SEQ 2
#define VT_RANGE 3
#define VT_FLOATRANGE 4
#define VT_DATETIME 5
#define VT_MACRO 6
#define VT_MACSEQ 6
class CVar
{
public:
//std::mt19937 *rnd_generator;
//std::random_device rnd_dev;
CMacrosPool pool;
CMacrosCache cache;
int vartype;
int precision;
int rnd_length;
int a;
int b;
double fa;
double fb;
std::string k; //key
std::vector <std::string> v; //values
std::string macroname;
CVar (const std::string &key, const std::string &val);
~CVar();
int get_rnd (int ta, int tb);
std::string gen_msecs();
std::string get_val();
};
#endif