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

This class inherits from List and implements indexing with a string for lookup in the list More...

Inheritance diagram for Greet.UnitLib.QuantityList:

Public Member Functions

BaseQuantity ContainsGroupName (string name)
 
BaseQuantity MatchUnitAndConvert (string name, ref double valToConvert)
 Searches the list of groups for the passed name and returns it if it finds it otherwise it assumes a unit expression was passed and tries to construct a DerivedGroup out of it. If the unit that was passed is not the same as the default for the matched group then it converts valToConvert into the default unit from the passed unit. Ex. name = "Short Tons" val = 1 val is converted to the default for the found group of mass so it becomes 907184 More...
 

Properties

new BaseQuantity this[string name] [get]
 Returns the group which name matches the passes string or if the name was a unit then it returns the units UnitGroup More...
 

Detailed Description

This class inherits from List and implements indexing with a string for lookup in the list

Member Function Documentation

BaseQuantity Greet.UnitLib.QuantityList.MatchUnitAndConvert ( string  name,
ref double  valToConvert 
)

Searches the list of groups for the passed name and returns it if it finds it otherwise it assumes a unit expression was passed and tries to construct a DerivedGroup out of it. If the unit that was passed is not the same as the default for the matched group then it converts valToConvert into the default unit from the passed unit. Ex. name = "Short Tons" val = 1 val is converted to the default for the found group of mass so it becomes 907184

Parameters
name
valToConvert
Returns

Property Documentation

new BaseQuantity Greet.UnitLib.QuantityList.this[string name]
get

Returns the group which name matches the passes string or if the name was a unit then it returns the units UnitGroup

Parameters
name
Returns

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