This is a group which contains one or more BaseGroups, this allows combining BaseGroups into more complicated groups such as HeatingValue = Energy/Mass. The references to the BaseGroups are stored in a list of Bases which contains the default and override unit and whether it is in the numerator or denominator.
More...
|
| DerivedQuantity (XmlNode node) |
|
| DerivedQuantity (string name, string displayName, string format, string baseString) |
|
| DerivedQuantity (ref double d1, string d1_unitgroupname, ref double d2, string d2_unitgroupname, char operation) |
| This constructor is for the DoubleValue operators, it takes the defaultUnit expressions and the operation that is being done as inputs. It parses the expressions, simplifies, and adds the appropriate groups. More...
|
|
| DerivedQuantity (BaseQuantity g1, BaseQuantity g2, char operation, string forcedName="") |
|
| DerivedQuantity (string unitExpression) |
| Used for generating the derived groups "on the fly" More...
|
|
string | BasesToString (bool forXmlAttibute) |
|
override double | ConvertFromDefaultToOverride (double valueToConvert) |
| Takes a value in the default unit and converts it to the user prefered unit More...
|
|
override double | ConvertFromDefaultToSpecific (double valueToConvert, string unit) |
| Converts a value represented in default unit to a specified unit (this must be a unit that belongs to the same group) More...
|
|
override double | ConvertFromOverrideToDefault (double valueToConvert) |
| Takes a value in the override unit, and converts it to the default unit Usefull to parse user inputs in textboxes More...
|
|
override bool | Equals (object obj) |
|
override int | GetHashCode () |
|
bool | DefaultOnlyEquals (BaseQuantity obj) |
|
override bool | Equals (object obj) |
|
override int | GetHashCode () |
|
virtual void | OnEvent () |
|
override string | ToString () |
|
delegate void | UnitChangedDelegate () |
|
|
List< DerivedQuantityBase > | BaseGroups = new List<DerivedQuantityBase>() |
|
bool | createdByTheCalculations |
|
string | defaultUnitStringBuffer |
|
string | format = "" |
| Used to visualize parameters of this group with the number of significant digits specified. This attribute is used with ToString methods. Possible value=0.000 More...
|
|
UnitChangedDelegate | UnitChanged |
| Occurs when the overrideUnit changes. More...
|
|
|
override string | Abbrev [get] |
|
string | BottomUnit [get] |
| Return the first of the bottom units, use with care, we never know if there are many bottom units More...
|
|
BaseQuantity | DefaultOnlyMatchedGroup [get] |
|
override string | DefaultUnitAbbrev [get] |
|
override string | DisplayUnitStr [get] |
|
BaseQuantity | MatchedGroup [get] |
| Returns the group in Utils.groups that matches this DerivedGroup. Matching criteria includes containing a match for each bases (regardless of order) on the numerator and denominator. To be a matching base the group, defaultunit, and numerator must be the same (override is ignored). More...
|
|
override string | SIUnitStr [get] |
|
string | TopUnit [get] |
| Return the first of the bottom units, use with care, we never know if there are many bottom units More...
|
|
abstract string | Abbrev [get] |
|
abstract string | DefaultUnitAbbrev [get] |
|
string | DisplayName [get, set] |
|
abstract string | DisplayUnitStr [get] |
|
string | Name [get, set] |
|
abstract string | SIUnitStr [get] |
|
UnitChangedDelegate | UnitChangedEvent |
|
string | DisplayUnitStr [get] |
| The prefered unit used for this group in order to represent a value on the user interface More...
|
|
string | Name [get] |
| Unique name of the unit group More...
|
|
string | SIUnitStr [get] |
| The default unit used for this group in SI unit. This is the unit that is used across the calculations More...
|
|
|
| BaseQuantity (XmlNode node) |
|
This is a group which contains one or more BaseGroups, this allows combining BaseGroups into more complicated groups such as HeatingValue = Energy/Mass. The references to the BaseGroups are stored in a list of Bases which contains the default and override unit and whether it is in the numerator or denominator.
Greet.UnitLib.DerivedQuantity.DerivedQuantity |
( |
string |
name, |
|
|
string |
displayName, |
|
|
string |
format, |
|
|
string |
baseString |
|
) |
| |
- Parameters
-
name | |
displayName | |
format | |
baseString | String that contains information about base groups of this derived group, example: "volume:gallons/distance:miles" |
Greet.UnitLib.DerivedQuantity.DerivedQuantity |
( |
ref double |
d1, |
|
|
string |
d1_unitgroupname, |
|
|
ref double |
d2, |
|
|
string |
d2_unitgroupname, |
|
|
char |
operation |
|
) |
| |
This constructor is for the DoubleValue operators, it takes the defaultUnit expressions and the operation that is being done as inputs. It parses the expressions, simplifies, and adds the appropriate groups.
- Parameters
-
d1 | ValueInDefaultUnit of parameter d1 |
d1_unitgroupname | UnitGroupName of parameter d1 |
d2 | ValueInDefaultUnit of parameter d2 |
d2_unitgroupname | UnitGroupName of parameter d2 |
operation | |
Greet.UnitLib.DerivedQuantity.DerivedQuantity |
( |
string |
unitExpression | ) |
|
Used for generating the derived groups "on the fly"
- Parameters
-
unitExpression | Contains name of a unit or unit group, example: meters/grams |
name | |
override double Greet.UnitLib.DerivedQuantity.ConvertFromDefaultToOverride |
( |
double |
valueToConvert | ) |
|
|
virtual |
Takes a value in the default unit and converts it to the user prefered unit
- Parameters
-
valueToConvert | Value in default unit to be converted |
- Returns
- Value converted in user prefered unit
Implements Greet.UnitLib.BaseQuantity.
override double Greet.UnitLib.DerivedQuantity.ConvertFromDefaultToSpecific |
( |
double |
valueToConvert, |
|
|
string |
unit |
|
) |
| |
|
virtual |
Converts a value represented in default unit to a specified unit (this must be a unit that belongs to the same group)
- Parameters
-
valueToConvert | Value in default unit to be converted |
unit | Unit that belongs to that group in which the value will be converted |
- Returns
- The converted value in the new unit
Implements Greet.UnitLib.BaseQuantity.
override double Greet.UnitLib.DerivedQuantity.ConvertFromOverrideToDefault |
( |
double |
valueToConvert | ) |
|
|
virtual |
Takes a value in the override unit, and converts it to the default unit Usefull to parse user inputs in textboxes
- Parameters
-
valueToConvert | Value in override unit to be converted |
- Returns
- Value converted in default unit<returns>
Implements Greet.UnitLib.BaseQuantity.
string Greet.UnitLib.DerivedQuantity.BottomUnit |
|
get |
Return the first of the bottom units, use with care, we never know if there are many bottom units
Returns the group in Utils.groups that matches this DerivedGroup. Matching criteria includes containing a match for each bases (regardless of order) on the numerator and denominator. To be a matching base the group, defaultunit, and numerator must be the same (override is ignored).
string Greet.UnitLib.DerivedQuantity.TopUnit |
|
get |
Return the first of the bottom units, use with care, we never know if there are many bottom units
The documentation for this class was generated from the following file:
- C:/Users/ddieffenthaler/Desktop/SVN/source/greet-dev/main/Lib/UnitLib/DerivedQuantity.cs