From 71e7157a650c5296e792e5a88cce14d7bfcbaec4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 26 Jan 2009 20:50:54 -0400 Subject: Added is_nonzero and a stream-based read() method to value_t. --- src/value.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/value.h') diff --git a/src/value.h b/src/value.h index 5c55a117..3c6c1d41 100644 --- a/src/value.h +++ b/src/value.h @@ -429,6 +429,10 @@ public: */ operator bool() const; + bool is_nonzero() const { + return ! is_zero(); + } + bool is_realzero() const; bool is_zero() const; bool is_null() const { @@ -892,6 +896,7 @@ public: * stream or a character pointer, and it may be serialized to an * output stream. The methods used are: */ + void read(std::istream& in); void read(const char *& data); void write(std::ostream& out) const; -- cgit v1.2.3