diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-12 12:35:14 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-12 12:35:14 +0100 |
commit | f8775b64f67cc464e024cf79cd98eed30c659d25 (patch) | |
tree | e38670c0a68d8fcc8e4e9d819c0a2fb2c27659d9 /include/base.h | |
parent | 147f9395449db7fcb32957ae840017cff2740831 (diff) |
implemented magic __compare() method
Diffstat (limited to 'include/base.h')
-rw-r--r-- | include/base.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/base.h b/include/base.h index 6541549..e99023b 100644 --- a/include/base.h +++ b/include/base.h @@ -218,6 +218,20 @@ public: * @return bool */ virtual bool __toBool(); + + /** + * Compare the object with a different object of the same type + * + * This method should return 0 if both objects are equal, a negative value + * if the 'this' object is smaller, and a positive value if the 'this' + * object is bigger. + * + * The passed in object is an instance of base + * + * @param that Object to compare with + * @return int + */ + virtual bool __compare(const Base &that) const; private: |