summaryrefslogtreecommitdiff
path: root/include/call.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-15 18:31:42 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-15 18:31:42 +0100
commit3bcd6e21d1142b5ec35f99c4bdcd925bf7ae5083 (patch)
tree08903d9b7e7b2bd57fa1a01fc873d618a17b0a8f /include/call.h
parent38b866988761f4da01eab769dc660b06b07e97be (diff)
added empty() function, and added HardCoded class
Diffstat (limited to 'include/call.h')
-rw-r--r--include/call.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/call.h b/include/call.h
index bae0a0a..7cf68bb 100644
--- a/include/call.h
+++ b/include/call.h
@@ -44,8 +44,14 @@ Value call(const char *name, Params&&... params)
* make the code run on the highway), it is not expected that these functions
* are going to be used very often anyway.
*/
-inline Value array_keys(const Value &value) { return call("array_keys", value); }
-inline Value array_values(const Value &value) { return call("array_values", value); }
+inline Value array_keys(const Value &value) { return call("array_keys", value); }
+inline Value array_values(const Value &value) { return call("array_values", value); }
+inline Value empty(const Value &value) { return call("empty", value); }
+inline Value empty(const HashMember<std::string> &member) { return !member.exists() || empty(member.value()); }
+inline Value empty(const HashMember<int> &member) { return !member.exists() || empty(member.value()); }
+//inline Value isset(const Value &value) { return call("isset", value); }
+//inline Value isset(const HashMember<std::string> &member) { return member.exists() && isset(member.value()); }
+//inline Value isset(const HashMember<int> &member) { return member.exists() && isset(member.value()); }
/**
* End of namespace