1 #ifndef PRIMITIVE_VALUE_H 2 #define PRIMITIVE_VALUE_H 14 enum { None, Integer, Double, String };
20 bool HasType(
int _type)
const {
return type == _type; }
21 bool CanCast(
int _type)
const;
22 bool IsNumeric()
const;
23 operator const int& ()
const;
25 operator const double& ()
const;
27 operator const string& ()
const;
29 int AsInteger()
const;
30 double AsDouble()
const;
31 string AsString()
const;
32 bool operator == (
int v)
const;
33 bool operator == (
double v)
const;
34 bool operator == (
const string& v)
const;
36 bool operator < (
int v)
const;
37 bool operator < (
double v)
const;
38 bool operator < (
const string& v)
const;
40 bool operator <= (
int v)
const;
41 bool operator <= (
double v)
const;
42 bool operator <= (
const string& v)
const;
A basic primitive value type, including integers, floats, and strings.
Definition: PrimitiveValue.h:11
Definition: rayprimitives.h:132