From 3bcd6e21d1142b5ec35f99c4bdcd925bf7ae5083 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Sat, 15 Mar 2014 18:31:42 +0100 Subject: added empty() function, and added HardCoded class --- include/call.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/call.h') 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 &member) { return !member.exists() || empty(member.value()); } +inline Value empty(const HashMember &member) { return !member.exists() || empty(member.value()); } +//inline Value isset(const Value &value) { return call("isset", value); } +//inline Value isset(const HashMember &member) { return member.exists() && isset(member.value()); } +//inline Value isset(const HashMember &member) { return member.exists() && isset(member.value()); } /** * End of namespace -- cgit v1.2.3