GREET API
Exposed interfaces to create modules that can be loaded in GREET
 All Classes Namespaces Files Functions Enumerations Enumerator Properties Events
PlugInsInterfaces.DataTypes.IUnitGroup Interface Reference

A unit group represents "energy" or "volume" the default unit used are the unit used by the calculations engine, they're all SI. The user prefered unit represents the unit that the user selected to be presented on the GUI More...

Public Member Functions

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...
 
double ConvertFromDefaultToOverride (double valueToConvert)
 Takes a value in the default unit and converts it to the user prefered unit More...
 
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...
 

Properties

string Name [get]
 Unique name of the unit group More...
 
string DefaultUnitStr [get]
 The default unit used for this group More...
 
string OverrideUnitStr [get]
 The prefered unit used for this group More...
 

Detailed Description

A unit group represents "energy" or "volume" the default unit used are the unit used by the calculations engine, they're all SI. The user prefered unit represents the unit that the user selected to be presented on the GUI

Definition at line 14 of file IUnitGroup.cs.

Member Function Documentation

double PlugInsInterfaces.DataTypes.IUnitGroup.ConvertFromDefaultToOverride ( double  valueToConvert)

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
double PlugInsInterfaces.DataTypes.IUnitGroup.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)

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
double PlugInsInterfaces.DataTypes.IUnitGroup.ConvertFromOverrideToDefault ( double  valueToConvert)

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>

Property Documentation

string PlugInsInterfaces.DataTypes.IUnitGroup.DefaultUnitStr
get

The default unit used for this group

Definition at line 25 of file IUnitGroup.cs.

string PlugInsInterfaces.DataTypes.IUnitGroup.Name
get

Unique name of the unit group

Definition at line 20 of file IUnitGroup.cs.

string PlugInsInterfaces.DataTypes.IUnitGroup.OverrideUnitStr
get

The prefered unit used for this group

Definition at line 30 of file IUnitGroup.cs.


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