Skip to content

Latest commit

 

History

History
109 lines (70 loc) · 2.81 KB

NumberNode.md

File metadata and controls

109 lines (70 loc) · 2.81 KB

NumberNode

class NumberNode

Inherited from: ValueNode.

Required header: <Eclog/NumberNode.h>

The NumberNode abstract class represents a number node in a document tree (See Document).

Member functions

Name Description
value Gets the value.
doubleValue Gets the value.
intValue Gets the value.
uintValue Gets the value.
longValue Gets the value.
ulongValue Gets the value.
longlongValue Gets the value.
ulonglongValue Gets the value.
setFracDigits Sets the number of digits after decimal point.
fracDigits Gets the number of digits after decimal point.
assign Assigns a new value to this node.

value

virtual Number value() const;

Gets the value.

Return value

Number The value.


valueDouble, valueInt, valueUInt, valueLong, valueULong, valueLLong, and valueULLong

double valueDouble() const;
int valueInt() const;
unsigned int valueUInt() const;
long valueLong() const;
unsigned long valueULong() const;
long long valueLLong() const;
unsigned long long valueULLong() const;

Gets the value.

Numeric promotion or numeric conversion happens if the number's underlying type is different from the specified type.

Return value

(numeric type) The value.


setFracDigits

virtual void setFracDigits(int fracDigits);

Sets the number of digits after decimal point which the rounding will be carried out toward; affects rendering only (-1 means max digits).

Parameters

int fracDigits The number of digits.


fracDigits

virtual int fracDigits() const = 0;

Gets the number of digits after decimal point which the rounding will be carried out toward; affects rendering only (-1 means max digits).

Return value

int The number of digits.


assign

virtual void assign(const NumberDesc& desc);
virtual void assign(const NumberNode& other);

Assigns a new value to this node.

Parameters

const NumberDesc& desc A number description.

const NumberNode& other Another number node.