C# 클래스 YAMP.Physics.CombinedUnit

Used to represent combined units -- temporary and defined.
상속: PhysicalUnit
파일 보기 프로젝트 열기: FlorianRappl/YAMP 1 사용 예제들

공개 메소드들

메소드 설명
CombinedUnit ( String unit ) : System
ConvertTo ( String unit ) : Double>>.List

Tries to convert the unit to the given unit.

CreateFrom ( String unit ) : CombinedUnit
Divide ( CombinedUnit unit ) : CombinedUnit

Divides the given combined unit by another unit.

Divide ( String unit ) : CombinedUnit

Divides the given combined unit by the string representation of another unit.

Multiply ( CombinedUnit unit ) : CombinedUnit

Multiplies the given combined unit with another combined unit.

Multiply ( String unit ) : CombinedUnit

Multiplies the given combined unit with the string representation of another unit.

Raise ( Double pwr ) : CombinedUnit

Raises the current unit to the specified power, i.e. kg*s --> raised to 2 is kg^2 * s^2.

Simplify ( ) : CombinedUnit

Tries to simplify the current expression by considering combined types.

Sqrt ( ) : CombinedUnit

Takes the square root of the current unit, i.e. raises it to the power 1/2.

ToString ( ) : String
Unpack ( ) : String

Unpacks the given units, i.e. returns the representation of the unit in elementary units.

보호된 메소드들

메소드 설명
CombinedUnit ( String combination, Double factor ) : System
Create ( ) : PhysicalUnit
IsNumber ( char ch ) : bool
IsWhiteSpace ( char ch ) : bool

비공개 메소드들

메소드 설명
AddUnit ( Double>.Dictionary units, String unit, Double exp ) : void
ConvertToDouble ( String s ) : Double
ConvertToInteger ( string s ) : int
Count ( Token token, Token tokens ) : Int32
EatWhile ( Token token, Token tokens, String text, Int32 start ) : String
FindMapping ( String source, Double>.Dictionary target, Int32 sign, Double>.List list ) : String
GetChanges ( CombinedUnit unit, System.Boolean &reversed ) : Double
GetToken ( char ch ) : Token
Parse ( String unit ) : Double>.Dictionary
Parse ( String unit, Double>.Dictionary units ) : void

메소드 상세

CombinedUnit() 공개 메소드

public CombinedUnit ( String unit ) : System
unit String
리턴 System

CombinedUnit() 보호된 메소드

protected CombinedUnit ( String combination, Double factor ) : System
combination String
factor Double
리턴 System

ConvertTo() 공개 메소드

Tries to convert the unit to the given unit.
public ConvertTo ( String unit ) : Double>>.List
unit String The unit (combination) to convert to.
리턴 Double>>.List

Create() 보호된 메소드

protected Create ( ) : PhysicalUnit
리턴 PhysicalUnit

CreateFrom() 공개 메소드

public CreateFrom ( String unit ) : CombinedUnit
unit String
리턴 CombinedUnit

Divide() 공개 메소드

Divides the given combined unit by another unit.
public Divide ( CombinedUnit unit ) : CombinedUnit
unit CombinedUnit The combined unit to divide the current unit.
리턴 CombinedUnit

Divide() 공개 메소드

Divides the given combined unit by the string representation of another unit.
public Divide ( String unit ) : CombinedUnit
unit String The combined unit to divide the current unit.
리턴 CombinedUnit

IsNumber() 보호된 메소드

protected IsNumber ( char ch ) : bool
ch char
리턴 bool

IsWhiteSpace() 보호된 메소드

protected IsWhiteSpace ( char ch ) : bool
ch char
리턴 bool

Multiply() 공개 메소드

Multiplies the given combined unit with another combined unit.
public Multiply ( CombinedUnit unit ) : CombinedUnit
unit CombinedUnit The combined unit which is multiplied to the current unit.
리턴 CombinedUnit

Multiply() 공개 메소드

Multiplies the given combined unit with the string representation of another unit.
public Multiply ( String unit ) : CombinedUnit
unit String The unit to multiply the current unit with.
리턴 CombinedUnit

Raise() 공개 메소드

Raises the current unit to the specified power, i.e. kg*s --> raised to 2 is kg^2 * s^2.
public Raise ( Double pwr ) : CombinedUnit
pwr Double The power to raise the unit with.
리턴 CombinedUnit

Simplify() 공개 메소드

Tries to simplify the current expression by considering combined types.
public Simplify ( ) : CombinedUnit
리턴 CombinedUnit

Sqrt() 공개 메소드

Takes the square root of the current unit, i.e. raises it to the power 1/2.
public Sqrt ( ) : CombinedUnit
리턴 CombinedUnit

ToString() 공개 메소드

public ToString ( ) : String
리턴 String

Unpack() 공개 메소드

Unpacks the given units, i.e. returns the representation of the unit in elementary units.
public Unpack ( ) : String
리턴 String