20#ifndef SWINDER_VALUE_H
21#define SWINDER_VALUE_H
152 void setValue(
const Value& v );
157 void setValue(
bool b );
162 void setValue(
int i );
167 void setValue(
double f );
172 void setValue(
const UString& s );
286std::ostream& operator<<( std::ostream& s, Value value );
Provides a wrapper for cell value.
bool isNumber() const
Returns true if the type of this value is either integer or floating-point.
UString errorMessage() const
Returns error message associated with this value.
static const Value & empty()
Returns constant reference to empty value.
static const Value & errorDIV0()
Returns constant reference to DIV/0!
static const Value & errorNULL()
Returns constant reference to NULL!
virtual ~Value()
Destroys the value.
void setError(const UString &msg)
Sets this value to hold error message.
static const Value & errorNAME()
Returns constant reference to NAME?
Value & assign(const Value &_value)
Assigns from another value.
bool isInteger() const
Returns true if the type of this value is integer.
static const Value & errorNUM()
Returns constant reference to NUM!
Type type() const
Returns the type of the value.
static const Value & errorREF()
Returns constant reference to REF!
bool isBoolean() const
Returns true if the type of this value is Boolean.
double asFloat() const
Returns the floating-point value of this value.
bool isError() const
Returns true if this value holds error information.
bool isFloat() const
Returns true if the type of this value is floating-point.
Value & operator=(const Value &_value)
Assigns from another value.
UString asString() const
Returns the string value of this value.
Value()
Creates an empty value, i.e holds nothing.
bool isString() const
Returns true if the type of this value is string.
static const Value & errorVALUE()
Returns constant reference to VALUE!
void detach()
Detaches itself from shared value data, i.e make a private, deep copy of the data.
bool asBoolean() const
Returns the boolean value of this value.
static const Value & errorNA()
Returns constant reference to N/A error.
int asInteger() const
Returns the integer value of this value.
bool isEmpty() const
Returns true if empty.