Greet 2014
Documentation for the GREET 2014 API
 All Classes Namespaces Functions Variables Enumerations Properties Events
Greet.UnitLib.BaseQuantity Class Referenceabstract

This is the generic class that contains common accessors and methods. More...

Inheritance diagram for Greet.UnitLib.BaseQuantity:
Greet.UnitLib.IQuantity Greet.UnitLib.DerivedQuantity Greet.UnitLib.Quantity

Public Member Functions

abstract double ConvertFromDefaultToOverride (double valueToConvert)
 Takes a value in the default unit and converts it to the user prefered unit More...
 
abstract 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...
 
abstract 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...
 
bool DefaultOnlyEquals (BaseQuantity obj)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
virtual void OnEvent ()
 
override string ToString ()
 
delegate void UnitChangedDelegate ()
 

Public Attributes

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...
 

Protected Member Functions

 BaseQuantity (XmlNode node)
 

Properties

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
 
- Properties inherited from Greet.UnitLib.IQuantity
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...
 

Detailed Description

This is the generic class that contains common accessors and methods.

Member Function Documentation

abstract double Greet.UnitLib.BaseQuantity.ConvertFromDefaultToOverride ( double  valueToConvert)
pure virtual

Takes a value in the default unit and converts it to the user prefered unit

Parameters
valueToConvertValue in default unit to be converted
Returns
Value converted in user prefered unit

Implements Greet.UnitLib.IQuantity.

Implemented in Greet.UnitLib.DerivedQuantity, and Greet.UnitLib.Quantity.

abstract double Greet.UnitLib.BaseQuantity.ConvertFromDefaultToSpecific ( double  valueToConvert,
string  unit 
)
pure virtual

Converts a value represented in default unit to a specified unit (this must be a unit that belongs to the same group)

Parameters
valueToConvertValue in default unit to be converted
unitUnit that belongs to that group in which the value will be converted
Returns
The converted value in the new unit

Implements Greet.UnitLib.IQuantity.

Implemented in Greet.UnitLib.DerivedQuantity, and Greet.UnitLib.Quantity.

abstract double Greet.UnitLib.BaseQuantity.ConvertFromOverrideToDefault ( double  valueToConvert)
pure virtual

Takes a value in the override unit, and converts it to the default unit Usefull to parse user inputs in textboxes

Parameters
valueToConvertValue in override unit to be converted
Returns
Value converted in default unit<returns>

Implements Greet.UnitLib.IQuantity.

Implemented in Greet.UnitLib.DerivedQuantity, and Greet.UnitLib.Quantity.

Member Data Documentation

string Greet.UnitLib.BaseQuantity.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

UnitChangedDelegate Greet.UnitLib.BaseQuantity.UnitChanged

Occurs when the overrideUnit changes.


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