summaryrefslogtreecommitdiff
path: root/include/classbase.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/classbase.h')
-rw-r--r--include/classbase.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/classbase.h b/include/classbase.h
index da027ab..01f1d55 100644
--- a/include/classbase.h
+++ b/include/classbase.h
@@ -108,6 +108,14 @@ public:
virtual Base *clone(Base *orig) const = 0;
/**
+ * Compare two objects
+ * @param object1
+ * @param object2
+ * @return int
+ */
+ virtual int compare(Base *object1, Base *object2) const = 0;
+
+ /**
* Is this a traversable class?
* @return bool
*/
@@ -383,6 +391,14 @@ private:
static int cast(struct _zval_struct *object, struct _zval_struct *retval, int type);
/**
+ * Function to compare two objects
+ * @param object1
+ * @param object2
+ * @return int
+ */
+ static int compare(struct _zval_struct *object1, struct _zval_struct *object2);
+
+ /**
* Name of the class
* @var string
*/