summaryrefslogtreecommitdiff
path: root/src/arithmetic.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-15 18:31:42 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-15 18:31:42 +0100
commit3bcd6e21d1142b5ec35f99c4bdcd925bf7ae5083 (patch)
tree08903d9b7e7b2bd57fa1a01fc873d618a17b0a8f /src/arithmetic.h
parent38b866988761f4da01eab769dc660b06b07e97be (diff)
added empty() function, and added HardCoded class
Diffstat (limited to 'src/arithmetic.h')
-rw-r--r--src/arithmetic.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/arithmetic.h b/src/arithmetic.h
index 21343d1..00d5641 100644
--- a/src/arithmetic.h
+++ b/src/arithmetic.h
@@ -127,7 +127,7 @@ public:
// convert string to integer
return apply(atoi(value.c_str()));
}
-
+
/**
* Apply a string (representing a number), and return a new value object after running the arithmetic function
* @param value
@@ -138,6 +138,17 @@ public:
// convert string to integer
return apply(atoi(value));
}
+
+ /**
+ * Apply a string (representing a number), and return a new value object after running the arithmetic function
+ * @param value
+ * @return Value
+ */
+ Value apply(const HardCoded &value)
+ {
+ // convert string to integer
+ return apply(atoi(value.buffer()));
+ }
/**
* Apply a string (representing a number), and return a new value object after running the arithmetic function