diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-06-11 18:02:25 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-06-11 18:02:25 +0200 |
commit | 104cc016c84ece1d5d28aef921bb39f1f2f1e8f7 (patch) | |
tree | 9f51b15fe009eb4a3516969e1a6d90d3db8ad172 /include | |
parent | b17b09c3b482f51a842f5272e88a7ed2820a1925 (diff) | |
parent | 4f3769855dd65a8ef0b647c7e98860b8aa747c26 (diff) |
Merge pull request #95 from valmat/FixCompareOp
Comparison operators for hardcoded Php::Value
Diffstat (limited to 'include')
-rw-r--r-- | include/value.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/value.h b/include/value.h index 63e8e6f..e8337a0 100644 --- a/include/value.h +++ b/include/value.h @@ -322,6 +322,17 @@ public: bool operator> (const char *value) const { return ::strcmp(rawValue(), value) > 0; } /** + * Comparison operators for hardcoded Value + * @param value + */ + bool operator==(const Value &value) const; + bool operator!=(const Value &value) const { return !operator==(value); } + bool operator< (const Value &value) const; + bool operator> (const Value &value) const { return value.operator<(*this); } + bool operator<=(const Value &value) const { return !operator>(value); } + bool operator>=(const Value &value) const { return !operator<(value); } + + /** * Comparison operators * @param value */ |