-
Notifications
You must be signed in to change notification settings - Fork 15
/
var.h
56 lines (45 loc) · 1.2 KB
/
var.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
#pragma once
using namespace std;
enum vtype { EMP, DW, STR, FLT };
typedef unsigned long ulong;
class var
{
typedef unsigned long ulong;
public:
ulong dw;
wstring str;
long double flt;
vtype vt;
bool isbuf;
int size;
var();
var(const var& rhs);
var(wstring& rhs);
var(ulong rhs);
var(int rhs);
var(long double rhs);
// less than zero this < rhs
// zero this == rhs
// greater than zero this > rhs
int compare(const var& rhs) const;
int compare(const wstring& rhs) const;
int compare(const ulong& rhs) const;
int compare(const int& rhs) const;
int compare(const long double& rhs) const;
wstring strclean(void);
wstring strbuffhex(void);
wstring strbuff(void);
var& operator=(const var& rhs);
var& operator=(const wstring& rhs);
var& operator=(const ulong& rhs);
var& operator=(const int& rhs);
var& operator=(unsigned short& rhs);
var& operator=(unsigned char& rhs);
var& operator=(const long double& rhs);
var& operator+=(const var& rhs);
var& operator+=(const wstring& rhs);
var& operator+=(const ulong& rhs);
var& operator+=(const int& rhs);
var& operator+=(const long double& rhs);
void resize(ulong newsize);
};