Variable.h File Reference
`#include <libqalculate/ExpressionItem.h>`
`#include <libqalculate/includes.h>`

## Classes

class | Assumptions
| An assumption about an unknown mathematical value. More...
class | Variable
| Abstract base class for variables. More...
class | UnknownVariable
| A variable with unknown value. More...
class | KnownVariable
| A variable with a known value. More...
class | DynamicVariable
| Abstract base class for variables with a value which is recalculated when the precision has changed. More...
class | PrecisionVariable
| Dynamic variable for Pi. More...
class | TodayVariable
class | TomorrowVariable
class | YesterdayVariable
class | NowVariable

## Macros

#define | DECLARE_BUILTIN_VARIABLE(x)

## Enumerations

enum | AssumptionType { ASSUMPTION_TYPE_NONE = 0, ASSUMPTION_TYPE_NONMATRIX = 1, ASSUMPTION_TYPE_NUMBER = 2, ASSUMPTION_TYPE_COMPLEX = 3, ASSUMPTION_TYPE_REAL = 4, ASSUMPTION_TYPE_RATIONAL = 5, ASSUMPTION_TYPE_INTEGER = 6 }
| Type assumption. More...
enum | AssumptionSign { ASSUMPTION_SIGN_UNKNOWN, ASSUMPTION_SIGN_POSITIVE, ASSUMPTION_SIGN_NONNEGATIVE, ASSUMPTION_SIGN_NEGATIVE, ASSUMPTION_SIGN_NONPOSITIVE, ASSUMPTION_SIGN_NONZERO }
| Signedness assumption. More...
enum | VariableSubtype { SUBTYPE_VARIABLE, SUBTYPE_UNKNOWN_VARIABLE, SUBTYPE_KNOWN_VARIABLE }
| Type of variable. More...

## Macro Definition Documentation

## DECLARE_BUILTIN_VARIABLE

#define DECLARE_BUILTIN_VARIABLE | ( |  | x | ) |

Value:
class x : public DynamicVariable { \
private: \
void calculate(MathStructure &m) const; \
public: \
x(); \
x(const x *variable) {set(variable);} \
ExpressionItem *copy() const {return new x(this);} \
};

## Enumeration Type Documentation

## AssumptionSign

enum AssumptionSign

Signedness assumption.

Enumerator
ASSUMPTION_SIGN_UNKNOWN | x = ?
ASSUMPTION_SIGN_POSITIVE | x > 0
ASSUMPTION_SIGN_NONNEGATIVE | x >= 0
ASSUMPTION_SIGN_NEGATIVE | x < 0
ASSUMPTION_SIGN_NONPOSITIVE | x <= 0
ASSUMPTION_SIGN_NONZERO | x != 0

## AssumptionType

enum AssumptionType

Type assumption.

Each type is a subset of the type above.

Enumerator
ASSUMPTION_TYPE_NONE | Multiplication is NOT commutative; do not use.
ASSUMPTION_TYPE_COMPLEX | im(x) != 0

## VariableSubtype

enum VariableSubtype

Type of variable.

Enumerator
SUBTYPE_VARIABLE | class Variable
SUBTYPE_UNKNOWN_VARIABLE | class UnknownVariable
SUBTYPE_KNOWN_VARIABLE | class KnownVariable

DynamicVariable
Abstract base class for variables with a value which is recalculated when the precision has changed.
Definition: Variable.h:348
MathStructure
A structure representing a mathematical value/expression/result.
Definition: MathStructure.h:143