To be used to perform calculations with physical quantities. An instance of LightValue can be in one of 3 states: 1) formula is null, quantity is NOT null, preffered_unit is NOT null, quantaty.Units.Count less then preffered_unit. In this state the LightValue is aware of the quantity associated with it and what is the preferred units to be used for reports or GUI 2) formula is NOT null, quantity is NOT null, preffered_unit is null. In this state LightValue is aware of the quantity associated with it and units to be used in GUI/Reports are defined by formula. The dimensions of the units in formula must be the same as of the Quantity 3) formula is NOT null, quantity is null, preffered_unit is null. In this state LightValue is not aware of the quantity associated with it, it can happen as a result of * or / operations or user-entering units combination that cannot be matched to any of the defined quantities. In this state units defined in formula are to be used as preferred units to be used in GUI/Reports. Also, in this state user cannot choose in what units the value is to be displayed and will be limited to the choice of SI units or those defined in formula
More...
|
| LightValue (double val_, Dimension dim_) |
| Creates a new LightValue object using a value in SI unit and an instance of a Dimension Warning the instance of the Dimension will be used as is as a reference. If one needs a new isntance of a Dimension it must be cloned first More...
|
|
| LightValue (double val_, uint dim_) |
| Creates a new LightValue object using a value in SI unit and creates a new instance of a Dimension using the uint representation of the SI unit More...
|
|
| LightValue (double val_, string quant_name, int pref_unit_id) |
| Creates a new LightValue object using a value in SI unit and creates a new instance of a Dimension using a base quantity name and prefered unit id More...
|
|
| LightValue (string expression) |
|
| LightValue (double val_, string expression) |
|
override string | ToString () |
|
void | UpdateValue (string expression) |
| This method takes a string such as 23 g/Btu and checks if it is the same quantity as currenntly stored. If it is it updates the Value member of the object, if not it throws exception More...
|
|
To be used to perform calculations with physical quantities. An instance of LightValue can be in one of 3 states: 1) formula is null, quantity is NOT null, preffered_unit is NOT null, quantaty.Units.Count less then preffered_unit. In this state the LightValue is aware of the quantity associated with it and what is the preferred units to be used for reports or GUI 2) formula is NOT null, quantity is NOT null, preffered_unit is null. In this state LightValue is aware of the quantity associated with it and units to be used in GUI/Reports are defined by formula. The dimensions of the units in formula must be the same as of the Quantity 3) formula is NOT null, quantity is null, preffered_unit is null. In this state LightValue is not aware of the quantity associated with it, it can happen as a result of * or / operations or user-entering units combination that cannot be matched to any of the defined quantities. In this state units defined in formula are to be used as preferred units to be used in GUI/Reports. Also, in this state user cannot choose in what units the value is to be displayed and will be limited to the choice of SI units or those defined in formula
Greet.UnitLib2.LightValue.LightValue |
( |
double |
val_, |
|
|
Dimension |
dim_ |
|
) |
| |
Creates a new LightValue object using a value in SI unit and an instance of a Dimension Warning the instance of the Dimension will be used as is as a reference. If one needs a new isntance of a Dimension it must be cloned first
- Parameters
-
Greet.UnitLib2.LightValue.LightValue |
( |
double |
val_, |
|
|
uint |
dim_ |
|
) |
| |
Creates a new LightValue object using a value in SI unit and creates a new instance of a Dimension using the uint representation of the SI unit
- Parameters
-
val_ | Value in SI unit |
dim_ | SI Unit Representation |
Greet.UnitLib2.LightValue.LightValue |
( |
double |
val_, |
|
|
string |
quant_name, |
|
|
int |
pref_unit_id |
|
) |
| |
Creates a new LightValue object using a value in SI unit and creates a new instance of a Dimension using a base quantity name and prefered unit id
- Parameters
-
val_ | Value in SI unit |
quant_name | BaseQuantity name |
pref_unit_id | Prefered unit ID |
Greet.UnitLib2.LightValue.LightValue |
( |
string |
expression | ) |
|
Parses an expression containing a value and SI units to create new object and new instance of a Dimension
The string must be in the form "0.0 kg" where a space char separates the numerical value from the unit expression
The unit expression can use any of the units available from the Context units
- Parameters
-
expression | String expression to be parsed |
Greet.UnitLib2.LightValue.LightValue |
( |
double |
val_, |
|
|
string |
expression |
|
) |
| |
Parses an expression containing a value and SI units to create new object and new instance of a Dimension
The value must be expressed in the same unit as the expression parameter
The unit expression can use any of the units available from the Context units
- Parameters
-
val_ | Value in the units specified in expression string |
expression | String contains the expression for the units, example: J/kg |
The preferred unit of the first summand will be used if any
- Parameters
-
- Returns
void Greet.UnitLib2.LightValue.UpdateValue |
( |
string |
expression | ) |
|
This method takes a string such as 23 g/Btu and checks if it is the same quantity as currenntly stored. If it is it updates the Value member of the object, if not it throws exception
- Parameters
-
double Greet.UnitLib2.LightValue.Value |
|
getset |
The documentation for this class was generated from the following file:
- C:/Users/ddieffenthaler/Desktop/SVN/source/greet-dev/main/Lib/UnitLib2/LightValue.cs