summaryrefslogtreecommitdiff
path: root/include/value.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-15 21:57:08 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-15 21:57:08 +0100
commit895f6315eb306a677bddba86980de8f8ee824efe (patch)
tree75380e6151407cba36ea2fc186268290a363774b /include/value.h
parent3bcd6e21d1142b5ec35f99c4bdcd925bf7ae5083 (diff)
removed HardCoded class because it turned out to be too difficult to implement it for now
Diffstat (limited to 'include/value.h')
-rw-r--r--include/value.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/include/value.h b/include/value.h
index 13cea38..ed0367c 100644
--- a/include/value.h
+++ b/include/value.h
@@ -57,7 +57,6 @@ public:
Value(char value);
Value(const std::string &value);
Value(const char *value, int size = -1);
- Value(const HardCoded &value);
Value(double value);
/**
@@ -162,7 +161,6 @@ public:
Value &operator=(char value);
Value &operator=(const std::string &value);
Value &operator=(const char *value);
- Value &operator=(const HardCoded &value);
Value &operator=(double value);
/**
@@ -178,7 +176,6 @@ public:
Value &operator+=(char value);
Value &operator+=(const std::string &value);
Value &operator+=(const char *value);
- Value &operator+=(const HardCoded &value);
Value &operator+=(double value);
/**
@@ -194,7 +191,6 @@ public:
Value &operator-=(char value);
Value &operator-=(const std::string &value);
Value &operator-=(const char *value);
- Value &operator-=(const HardCoded &value);
Value &operator-=(double value);
/**
@@ -210,7 +206,6 @@ public:
Value &operator*=(char value);
Value &operator*=(const std::string &value);
Value &operator*=(const char *value);
- Value &operator*=(const HardCoded &value);
Value &operator*=(double value);
/**
@@ -226,7 +221,6 @@ public:
Value &operator/=(char value);
Value &operator/=(const std::string &value);
Value &operator/=(const char *value);
- Value &operator/=(const HardCoded &value);
Value &operator/=(double value);
/**
@@ -242,7 +236,6 @@ public:
Value &operator%=(char value);
Value &operator%=(const std::string &value);
Value &operator%=(const char *value);
- Value &operator%=(const HardCoded &value);
Value &operator%=(double value);
/**
@@ -258,7 +251,6 @@ public:
Value operator+(char value);
Value operator+(const std::string &value);
Value operator+(const char *value);
- Value operator+(const HardCoded &value);
Value operator+(double value);
/**
@@ -274,7 +266,6 @@ public:
Value operator-(char value);
Value operator-(const std::string &value);
Value operator-(const char *value);
- Value operator-(const HardCoded &value);
Value operator-(double value);
/**
@@ -290,7 +281,6 @@ public:
Value operator*(char value);
Value operator*(const std::string &value);
Value operator*(const char *value);
- Value operator*(const HardCoded &value);
Value operator*(double value);
/**
@@ -306,7 +296,6 @@ public:
Value operator/(char value);
Value operator/(const std::string &value);
Value operator/(const char *value);
- Value operator/(const HardCoded &value);
Value operator/(double value);
/**
@@ -322,7 +311,6 @@ public:
Value operator%(char value);
Value operator%(const std::string &value);
Value operator%(const char *value);
- Value operator%(const HardCoded &value);
Value operator%(double value);
/**
@@ -388,12 +376,28 @@ public:
/**
* Get access to the raw buffer - you can use this for direct reading and
* writing to and from the buffer. Note that this only works for string
- * variables - other variables return nullptr
+ * variables - other variables return nullptr.
+ *
+ * If you are going to write to the buffer, make sure that you first call
+ * the reserve() method to ensure that the buffer is big enough.
+ *
* @return char *
*/
char *buffer() const;
/**
+ * Reserve enough space in the buffer. If you want to write directly to
+ * the buffer (which is returned by the buffer() method), you should first
+ * reserve enough space in it. This can be done with this reserve() method.
+ * This will also turn the Value object into a string (if it was not
+ * already a string). The writable buffer is returned.
+ *
+ * @param size
+ * @return char*
+ */
+ char *reserve(size_t size);
+
+ /**
* Get access to the raw buffer for read operationrs.
* @return const char *
*/