summaryrefslogtreecommitdiff
path: root/include/hashparent.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hashparent.h')
-rw-r--r--include/hashparent.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/hashparent.h b/include/hashparent.h
index 4c2ee68..5ba05bd 100644
--- a/include/hashparent.h
+++ b/include/hashparent.h
@@ -56,6 +56,13 @@ public:
virtual bool contains(int index) const = 0;
/**
+ * Check if a certain index exists in the array/object
+ * @param key
+ * @return bool
+ */
+ virtual bool contains(const Value &index) const = 0;
+
+ /**
* Retrieve the value at a string index
* @param key
* @return Value
@@ -68,6 +75,13 @@ public:
* @return Value
*/
virtual Value get(int index) const = 0;
+
+ /**
+ * Retrieve the value at a value index
+ * @param key
+ * @return Value
+ */
+ virtual Value get(const Value &key) const = 0;
/**
* Overwrite the value at a certain string index
@@ -83,6 +97,31 @@ public:
*/
virtual void set(int index, const Value &value) = 0;
+ /**
+ * Overwrite the value at a certain variant index
+ * @param key
+ * @param value
+ */
+ virtual void set(const Value &key, const Value &value) = 0;
+
+ /**
+ * Unset a member by its index
+ * @param index
+ */
+ virtual void unset(int index) = 0;
+
+ /**
+ * Unset a member by its key
+ * @param key
+ */
+ virtual void unset(const std::string &key) = 0;
+
+ /**
+ * Unset a member by its key
+ * @param key
+ */
+ virtual void unset(const Value &key) = 0;
+
};
/**