diff --git a/include/nt_Value.h b/include/nt_Value.h index 0b5a1b16d5..d99f8ea89b 100644 --- a/include/nt_Value.h +++ b/include/nt_Value.h @@ -36,6 +36,18 @@ class Value { const NT_Value& value() const { return m_val; } unsigned long long last_change() const { return m_val.last_change; } + /* + * Type Checkers + */ + bool IsBoolean() const { return m_val.type == NT_BOOLEAN; } + bool IsDouble() const { return m_val.type == NT_DOUBLE; } + bool IsString() const { return m_val.type == NT_STRING; } + bool IsRaw() const { return m_val.type == NT_RAW; } + bool IsRpc() const { return m_val.type == NT_RPC; } + bool IsBooleanArray() const { return m_val.type == NT_BOOLEAN_ARRAY; } + bool IsDoubleArray() const { return m_val.type == NT_DOUBLE_ARRAY; } + bool IsStringArray() const { return m_val.type == NT_STRING_ARRAY; } + /* * Type-Safe Getters */