C# Class YAMP.Physics.UnitValue

Scalar value with unit string.
Inheritance: YAMP.ScalarValue
Show file Open project: FlorianRappl/YAMP Class Usage Examples

Public Methods

Method Description
Clear ( ) : void

Clears the content.

Clone ( ) : ScalarValue

Clones the value.

Deserialize ( Byte content ) : Value

Transforms a binary representation into a new instance.

Serialize ( ) : Byte[]

Transforms the instance into a binary representation.

ToString ( ParseContext context ) : String

Stringifies the content.

UnitValue ( ) : System

Creates a new unit value.

UnitValue ( Double value ) : System

Creates a new unit value.

UnitValue ( Double value, String unit ) : System

Creates a new unit value.

UnitValue ( ScalarValue value, String unit ) : System

Creates a new unit value.

UnitValue ( ScalarValue value, StringValue unit ) : System

Creates a new unit value.

UnitValue ( String unit ) : System

Creates a new unit value.

UnitValue ( UnitValue value ) : System

Creates a new unit value.

Protected Methods

Method Description
RegisterOperators ( ) : void

Registers the operators.

Private Methods

Method Description
AddUU ( Value a, Value b ) : UnitValue
DivSU ( Value a, Value b ) : UnitValue
DivUS ( Value a, Value b ) : UnitValue
DivUU ( Value a, Value b ) : UnitValue
MulSU ( Value a, Value b ) : UnitValue
MulUS ( Value a, Value b ) : UnitValue
MulUU ( Value a, Value b ) : UnitValue
PowUS ( Value a, Value b ) : UnitValue
SubUU ( Value a, Value b ) : UnitValue

Method Details

Clear() public method

Clears the content.
public Clear ( ) : void
return void

Clone() public method

Clones the value.
public Clone ( ) : ScalarValue
return YAMP.ScalarValue

Deserialize() public method

Transforms a binary representation into a new instance.
public Deserialize ( Byte content ) : Value
content Byte The binary data.
return YAMP.Value

RegisterOperators() protected method

Registers the operators.
protected RegisterOperators ( ) : void
return void

Serialize() public method

Transforms the instance into a binary representation.
public Serialize ( ) : Byte[]
return Byte[]

ToString() public method

Stringifies the content.
public ToString ( ParseContext context ) : String
context YAMP.ParseContext The context to use.
return String

UnitValue() public method

Creates a new unit value.
public UnitValue ( ) : System
return System

UnitValue() public method

Creates a new unit value.
public UnitValue ( Double value ) : System
value Double The value to represent.
return System

UnitValue() public method

Creates a new unit value.
public UnitValue ( Double value, String unit ) : System
value Double The value to represent.
unit String The unit to hold.
return System

UnitValue() public method

Creates a new unit value.
public UnitValue ( ScalarValue value, String unit ) : System
value YAMP.ScalarValue The value to represent.
unit String The unit to hold.
return System

UnitValue() public method

Creates a new unit value.
public UnitValue ( ScalarValue value, StringValue unit ) : System
value YAMP.ScalarValue The value to represent.
unit YAMP.StringValue The unit to hold.
return System

UnitValue() public method

Creates a new unit value.
public UnitValue ( String unit ) : System
unit String The unit to hold.
return System

UnitValue() public method

Creates a new unit value.
public UnitValue ( UnitValue value ) : System
value UnitValue The unit to copy.
return System