libqalculate-0.9.7: AliasUnit_Composite Class Reference

# AliasUnit_Composite Class Reference

A subunit in a CompositeUnit. More...

`#include <Unit.h>`

Inheritance diagram for AliasUnit_Composite:

List of all members.

## Public Member Functions
| AliasUnit_Composite (Unit *alias, int exp=1, Prefix *prefix_=NULL)
| AliasUnit_Composite (const AliasUnit_Composite *unit)
virtual ExpressionItem * | copy () const
virtual void | set (const ExpressionItem *item)
virtual string | print (bool plural_, bool short_, bool use_unicode=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
virtual Prefix * | prefix () const
virtual int | prefixExponent () const
virtual void | set (Unit *u, int exp=1, Prefix *prefix_=NULL)
virtual MathStructure & | convertToFirstBaseUnit (MathStructure &mvalue, MathStructure &mexp) const
virtual MathStructure & | convertFromFirstBaseUnit (MathStructure &mvalue, MathStructure &mexp) const
## Protected Attributes
Prefix * | prefixv

## Detailed Description

A subunit in a CompositeUnit.

Should normally not be used directly.

## Member Function Documentation

virtual string AliasUnit_Composite::print | ( | bool | plural_,
|  | bool | short_,
|  | bool | use_unicode = `false`,
|  | bool(*)(const char *, void *) | can_display_unicode_string_function = `NULL`,
|  | void * | can_display_unicode_string_arg = `NULL` |
| ) |  |  | const`[virtual]`

Returns a display string representing the unit in an expression.

Equivalent to preferredName() for Unit and AliasUnit, but closer to MathStructure::print() for CompositeUnit (prints out base expression).

Reimplemented from Unit.

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

- libqalculate/Unit.h