QVariant

QVariant is analog to Quantity except that the dimensions are stored in a private field instead of a type parameter. This makes QVariant "dimensionnaly variant", so that a variable of type QVariant can hold quantities of variable dimensions. Yet, only operations that are dimensionnaly consistent can be performed on QVariant variables.

Warning: Contrary to Quantity, where all dimensional operations are done at compile-time, the dimensions of QVariant ate computed at runtime for each operation. This has a significant performance cost. Only use QVariant in situation where using Quantity is not possible, that is when the dimensions of the quantities are only known at runtime.

Constructors

this
this(Q other)
Undocumented in source.
this
this(T value)
Undocumented in source.

Alias This

get

Members

Aliases

valueType
alias valueType = N
Undocumented in source.

Functions

baseUnit
QVariant baseUnit()
Undocumented in source. Be warned that the author may not have intended to support it.
get
N get()
Undocumented in source. Be warned that the author may not have intended to support it.
isConsistentWith
bool isConsistentWith(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
void opAssign(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
void opAssign(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(T power)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
Q opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
T opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
int opCmp(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
int opCmp(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
auto opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
auto opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
rawValue
N rawValue()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
void toString(void delegate(const(char)[]) sink, FormatSpec!char fmt)
Undocumented in source. Be warned that the author may not have intended to support it.
value
N value(Q target)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

make
QVariant make(T value, Dimensions dim)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_value
N _value;
Undocumented in source.
dimensions
Dimensions dimensions;
Undocumented in source.

Parameters

N

the numeric type of the quantity.

See Also

QVariant has the same public members and overloaded operators as Quantity.

Meta