C# 클래스 YAMP.Value

Abstract base value for any value type.
상속: IRegisterElement
파일 보기 프로젝트 열기: FlorianRappl/YAMP 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
EmptyTypes System.Type[]

공개 메소드들

메소드 설명
CastStringToDouble ( String value ) : Double

This represents a save cast from a string to a double.

Copy ( ) : Value

Creates a copy of the given object using reflection. Override for using a more specialized version.

Deserialize ( Byte content ) : Value

Creates a new instance from bytes.

Deserialize ( String name, Byte content ) : Value

Creates a new named instance from the content.

Format ( ParseContext context, Double value ) : String

Formats a given double value with the rules of the context.

RegisterElement ( IElementMapping elementMapping ) : void

Registers the element at a certain point.

Serialize ( ) : Byte[]

Converts the instance to bytes.

ToString ( ) : String

Returns a string representation of the value.

ToString ( ParseContext context ) : String

Returns a string representation of the value.

보호된 메소드들

메소드 설명
BuildIndex ( Value arg, Int32 max ) : System.Int32[]

Builds the index from the given value.

GetExponent ( Double value ) : Int32

Gets the exponent (10^n) of a double value.

RegisterDivide ( Type left, Type right, Func divide ) : void

Helper for registering a division operator.

RegisterMember ( Type left, Type right, Func member ) : void

Helper for registering a member operator.

RegisterMinus ( Type left, Type right, Func sub ) : void

Helper for registering a minus operator.

RegisterModulo ( Type left, Type right, Func mod ) : void

Helper for registering a modulo operator.

RegisterMultiply ( Type left, Type right, Func multiply ) : void

Helper for registering a multiplication operator.

RegisterOperators ( ) : void

Registers the operators (if there are any).

RegisterPlus ( Type left, Type right, Func add ) : void

Helper for registering a plus operator.

RegisterPower ( Type left, Type right, Func power ) : void

Helper for registering a power operator.

비공개 메소드들

메소드 설명
Compose ( ParseContext context, Double value, Int32 decimals, Int32 exponent ) : string
EngineeringFormat ( ParseContext context, Double value, Int32 sign, Int32 U, Int32 L ) : String
ScientificFormat ( ParseContext context, Double value, Int32 sign, Int32 U, Int32 L ) : String
StandardFormat ( ParseContext context, Double v, Int32 sign, Int32 U, Int32 L ) : String
ToSuperScript ( Int32 exp ) : String

메소드 상세

BuildIndex() 보호된 정적인 메소드

Builds the index from the given value.
protected static BuildIndex ( Value arg, Int32 max ) : System.Int32[]
arg Value The argument to inspect.
max System.Int32 The maximum number of arguments.
리턴 System.Int32[]

CastStringToDouble() 공개 정적인 메소드

This represents a save cast from a string to a double.
public static CastStringToDouble ( String value ) : Double
value String The string value.
리턴 Double

Copy() 공개 메소드

Creates a copy of the given object using reflection. Override for using a more specialized version.
public Copy ( ) : Value
리턴 Value

Deserialize() 공개 추상적인 메소드

Creates a new instance from bytes.
public abstract Deserialize ( Byte content ) : Value
content Byte The binary content.
리턴 Value

Deserialize() 공개 정적인 메소드

Creates a new named instance from the content.
public static Deserialize ( String name, Byte content ) : Value
name String The name of the instance.
content Byte The raw content.
리턴 Value

Format() 공개 정적인 메소드

Formats a given double value with the rules of the context.
public static Format ( ParseContext context, Double value ) : String
context ParseContext The context with the rules.
value Double The double precision value.
리턴 String

GetExponent() 보호된 메소드

Gets the exponent (10^n) of a double value.
protected GetExponent ( Double value ) : Int32
value Double The value to get the exponent from.
리턴 System.Int32

RegisterDivide() 보호된 정적인 메소드

Helper for registering a division operator.
protected static RegisterDivide ( Type left, Type right, Func divide ) : void
left System.Type The type on the left side.
right System.Type The type on the right side.
divide Func The function to execute.
리턴 void

RegisterElement() 공개 메소드

Registers the element at a certain point.
public RegisterElement ( IElementMapping elementMapping ) : void
elementMapping IElementMapping
리턴 void

RegisterMember() 보호된 정적인 메소드

Helper for registering a member operator.
protected static RegisterMember ( Type left, Type right, Func member ) : void
left System.Type The type on the left side.
right System.Type The type on the right side.
member Func The function to execute.
리턴 void

RegisterMinus() 보호된 정적인 메소드

Helper for registering a minus operator.
protected static RegisterMinus ( Type left, Type right, Func sub ) : void
left System.Type The type on the left side.
right System.Type The type on the right side.
sub Func The function to execute.
리턴 void

RegisterModulo() 보호된 정적인 메소드

Helper for registering a modulo operator.
protected static RegisterModulo ( Type left, Type right, Func mod ) : void
left System.Type The type on the left side.
right System.Type The type on the right side.
mod Func The function to execute.
리턴 void

RegisterMultiply() 보호된 정적인 메소드

Helper for registering a multiplication operator.
protected static RegisterMultiply ( Type left, Type right, Func multiply ) : void
left System.Type The type on the left side.
right System.Type The type on the right side.
multiply Func The function to execute.
리턴 void

RegisterOperators() 보호된 메소드

Registers the operators (if there are any).
protected RegisterOperators ( ) : void
리턴 void

RegisterPlus() 보호된 정적인 메소드

Helper for registering a plus operator.
protected static RegisterPlus ( Type left, Type right, Func add ) : void
left System.Type The type on the left side.
right System.Type The type on the right side.
add Func The function to execute.
리턴 void

RegisterPower() 보호된 정적인 메소드

Helper for registering a power operator.
protected static RegisterPower ( Type left, Type right, Func power ) : void
left System.Type The type on the left side.
right System.Type The type on the right side.
power Func The function to execute.
리턴 void

Serialize() 공개 추상적인 메소드

Converts the instance to bytes.
public abstract Serialize ( ) : Byte[]
리턴 Byte[]

ToString() 공개 메소드

Returns a string representation of the value.
public ToString ( ) : String
리턴 String

ToString() 공개 메소드

Returns a string representation of the value.
public ToString ( ParseContext context ) : String
context ParseContext The calling context.
리턴 String

프로퍼티 상세

EmptyTypes 공개적으로 정적으로 프로퍼티

A little helper for reflection (same as Type.Empty in the full .NET stack).
public static Type[],System EmptyTypes
리턴 System.Type[]