-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathconstants.hh
More file actions
39 lines (29 loc) · 901 Bytes
/
constants.hh
File metadata and controls
39 lines (29 loc) · 901 Bytes
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
#ifndef _CONSTANTS_HH_
#define _CONSTANTS_HH_
#include <string>
#include "values.hh"
class Constant : public Value
{
public:
Constant();
virtual ~Constant();
bool operator == (const Constant &);
bool operator != (const Constant &);
void setToDecimal(double);
void setToInteger(int);
void setToString(const std::string &);
void setToBoolean(bool);
unsigned compareToValue(Value &);
double getDecimal(void);
int getInteger(void);
std::string getString(std::string = "", double = 0);
bool getBoolean(void);
bool isConstant(void);
private:
bool boolval;
};
extern Constant *getConstantFromDecimal(double);
extern Constant *getConstantFromInteger(int);
extern Constant *getConstantFromString(const std::string &);
extern Constant *getConstantFromBoolean(bool);
#endif