Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Attributes |
List of all members
Swinder::Value Class Reference
#include <value.h>
Public Types | |
| enum | Type { Empty , Boolean , Integer , Float , String , CellRange , Array , Error } |
Public Member Functions | |
| Value () | |
| Value (Type _type) | |
| virtual | ~Value () |
| Value (const Value &_value) | |
| Value & | operator= (const Value &_value) |
| Value & | assign (const Value &_value) |
| Value (bool b) | |
| Value (int i) | |
| Value (double f) | |
| Value (const UString &s) | |
| Type | type () const |
| bool | isEmpty () const |
| bool | isBoolean () const |
| bool | isInteger () const |
| bool | isFloat () const |
| bool | isNumber () const |
| bool | isString () const |
| bool | isError () const |
| void | setValue (const Value &v) |
| void | setValue (bool b) |
| void | setValue (int i) |
| void | setValue (double f) |
| void | setValue (const UString &s) |
| void | setError (const UString &msg) |
| bool | asBoolean () const |
| int | asInteger () const |
| double | asFloat () const |
| UString | asString () const |
| UString | errorMessage () const |
| void | detach () |
Static Public Member Functions | |
| static const Value & | empty () |
| static const Value & | errorDIV0 () |
| static const Value & | errorNA () |
| static const Value & | errorNAME () |
| static const Value & | errorNUM () |
| static const Value & | errorNULL () |
| static const Value & | errorREF () |
| static const Value & | errorVALUE () |
Protected Attributes | |
| ValueData * | d |
Detailed Description
Provides a wrapper for cell value.
Each cell in a worksheet must hold a value, either as enterred by user or as a result of formula evaluation. Default cell holds empty value.
Value uses implicit data sharing to reduce memory usage.
Member Enumeration Documentation
◆ Type
Constructor & Destructor Documentation
◆ Value() [1/7]
| Value::Value | ( | ) |
◆ Value() [2/7]
| Value::Value | ( | Value::Type | _type | ) |
◆ ~Value()
◆ Value() [3/7]
| Value::Value | ( | const Value & | _value | ) |
◆ Value() [4/7]
◆ Value() [5/7]
◆ Value() [6/7]
◆ Value() [7/7]
Member Function Documentation
◆ asBoolean()
| bool Value::asBoolean | ( | ) | const |
Returns the boolean value of this value.
Call this function only if isBoolean() returns true.
◆ asFloat()
| double Value::asFloat | ( | ) | const |
Returns the floating-point value of this value.
Call this function only if isNumber() returns true.
◆ asInteger()
| int Value::asInteger | ( | ) | const |
Returns the integer value of this value.
Call this function only if isNumber() returns true.
◆ assign()
◆ asString()
| UString Value::asString | ( | ) | const |
Returns the string value of this value.
Call this function only if isString() returns true.
◆ detach()
| void Value::detach | ( | ) |
◆ empty()
|
static |
◆ errorDIV0()
|
static |
◆ errorMessage()
| UString Value::errorMessage | ( | ) | const |
◆ errorNA()
|
static |
◆ errorNAME()
|
static |
◆ errorNULL()
|
static |
◆ errorNUM()
|
static |
◆ errorREF()
|
static |
◆ errorVALUE()
|
static |
◆ isBoolean()
|
inline |
◆ isEmpty()
|
inline |
◆ isError()
|
inline |
◆ isFloat()
|
inline |
◆ isInteger()
|
inline |
◆ isNumber()
|
inline |
◆ isString()
|
inline |
◆ operator=()
◆ setError()
| void Value::setError | ( | const UString & | msg | ) |
◆ setValue() [1/5]
| void Value::setValue | ( | bool | b | ) |
◆ setValue() [2/5]
| void Value::setValue | ( | const UString & | s | ) |
◆ setValue() [3/5]
◆ setValue() [4/5]
| void Value::setValue | ( | double | f | ) |
◆ setValue() [5/5]
| void Value::setValue | ( | int | i | ) |
◆ type()
| Value::Type Value::type | ( | ) | const |
Member Data Documentation
◆ d
The documentation for this class was generated from the following files:
