diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-07 15:21:51 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-07 15:21:51 +0100 |
commit | 8c6652ae30202ba50f989a3b4d6c7255e4351251 (patch) | |
tree | a1cedea97187cd66082c688ae40e5202945017a3 /include/hashmember.h | |
parent | 834c9d477a3f73ca42d13cb777d451b63f1cbf3a (diff) |
update documentation, implemented comparison operator for hashmember class, added Value constructor that receives a Php::Type to initialize as a specific type, added Value constructors to initialize a Value directly from a map or a vector, fixed value comparison operators, added casting constructors to cast a value to a vector or a map
Diffstat (limited to 'include/hashmember.h')
-rw-r--r-- | include/hashmember.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/hashmember.h b/include/hashmember.h index 9933445..65ca23d 100644 --- a/include/hashmember.h +++ b/include/hashmember.h @@ -317,6 +317,17 @@ public: Value operator%(double value) { return this->value() % value; } /** + * Comparison operators + * @param value + */ + template <typename T> bool operator==(const T &value) const { return (T)*this == value; } + template <typename T> bool operator!=(const T &value) const { return (T)*this != value; } + template <typename T> bool operator<=(const T &value) const { return (T)*this <= value; } + template <typename T> bool operator>=(const T &value) const { return (T)*this >= value; } + template <typename T> bool operator< (const T &value) const { return (T)*this < value; } + template <typename T> bool operator> (const T &value) const { return (T)*this > value; } + + /** * Handle calls to the hash member * @param param0 * @param param1 |