libqalculate-0.9.7: Variable Class Reference

# Variable Class Reference

Abstract base class for variables. More...

`#include <Variable.h>`

Inheritance diagram for Variable:

List of all members.

## Public Member Functions
| Variable (string cat_, string name_, string title_="", bool is_local=true, bool is_builtin=false, bool is_active=true)
| Variable (const Variable *variable)
virtual ExpressionItem * | copy () const =0
virtual void | set (const ExpressionItem *item)
virtual int | type () const
virtual int | subtype () const
virtual bool | isKnown () const =0
virtual bool | representsPositive (bool=false)
virtual bool | representsNegative (bool=false)
virtual bool | representsNonNegative (bool=false)
virtual bool | representsNonPositive (bool=false)
virtual bool | representsInteger (bool=false)
virtual bool | representsNumber (bool=false)
virtual bool | representsRational (bool=false)
virtual bool | representsReal (bool=false)
virtual bool | representsComplex (bool=false)
virtual bool | representsNonZero (bool=false)
virtual bool | representsEven (bool=false)
virtual bool | representsOdd (bool=false)
virtual bool | representsUndefined (bool=false, bool=false, bool=false)
virtual bool | representsBoolean ()
virtual bool | representsNonMatrix ()

## Detailed Description

Abstract base class for variables.

A variable is an alpha-numerical representation of a known or unknown value.

## Member Function Documentation

virtual int Variable::type | ( |  | ) | const`[inline, virtual]`

Returns the type of the expression item, corresponding to which subclass the object belongs to.

Returns:
  ExpressionItemType.

Implements ExpressionItem.

References TYPE_VARIABLE.

virtual int Variable::subtype | ( |  | ) | const`[inline, virtual]`

Returns the subtype of the variable, corresponding to which subsubclass the object belongs to.

Returns:
  VariableSubtype.

Implements ExpressionItem.

Reimplemented in UnknownVariable, and KnownVariable.

References SUBTYPE_VARIABLE.

virtual bool Variable::isKnown | ( |  | ) | const`[pure virtual]`

Returns if the variable has a known value (as oppossed to assumptions).

Returns:
  true if the variable is of class KnownVariable, false if UnknownVariable.

Implemented in UnknownVariable, and KnownVariable.

virtual bool Variable::representsPositive | ( | bool | = `false` | ) | `[inline, virtual]`

Returns if the variable represents a positive value.

Reimplemented in UnknownVariable, KnownVariable, and DynamicVariable.

The documentation for this class was generated from the following file:

- libqalculate/Variable.h