C# 클래스 kOS.Safe.Function.SafeFunctionBase

파일 보기 프로젝트 열기: KSP-KOS/KOS 1 사용 예제들

공개 메소드들

메소드 설명
Execute ( SafeSharedObjects shared ) : void

보호된 메소드들

메소드 설명
AssertArgBottomAndConsume ( SafeSharedObjects shared ) : void

A utility function that a function's Execute() must use after it has popped all the arguments it was expecting from the stack. It will assert that all the arguments have been consumed exactly, and the next item on the stack is the arg bottom mark. It will consume the arg bottom mark as well.
If the assert fails, an exception is thrown.

CountRemainingArgs ( SafeSharedObjects shared ) : int

A utility function that a function's Execute() may use if it wishes to, to get a count of how many args passed to it that it has not yet consumed still remain on the stack.

DegreesToRadians ( double degrees ) : double
GetDouble ( object argument ) : double
GetFuncName ( ) : string
GetInt ( object argument ) : int
PopStackAssert ( SafeSharedObjects shared ) : object

A utility function that a function's Execute() should use in place of cpu.PopStack(), because it will assert that the value being popped is NOT an ARG_MARKER_STRING, and if it is, it will throw the appropriate error.

PopStructureAssertEncapsulated ( SafeSharedObjects shared, bool barewordOkay = false ) : Structure

Identical to PopValueAssert, but with the additional step of coercing the result into a Structure to be sure, so it won't return primitives.

PopValueAssert ( SafeSharedObjects shared, bool barewordOkay = false ) : object

A utility function that a function's Execute() should use in place of cpu.PopValue(), because it will assert that the value being popped is NOT an ARG_MARKER_STRING, and if it is, it will throw the appropriate error.

RadiansToDegrees ( double radians ) : double
SafeFunctionBase ( ) : System

메소드 상세

AssertArgBottomAndConsume() 보호된 메소드

A utility function that a function's Execute() must use after it has popped all the arguments it was expecting from the stack. It will assert that all the arguments have been consumed exactly, and the next item on the stack is the arg bottom mark. It will consume the arg bottom mark as well.
If the assert fails, an exception is thrown.
protected AssertArgBottomAndConsume ( SafeSharedObjects shared ) : void
shared SafeSharedObjects
리턴 void

CountRemainingArgs() 보호된 메소드

A utility function that a function's Execute() may use if it wishes to, to get a count of how many args passed to it that it has not yet consumed still remain on the stack.
protected CountRemainingArgs ( SafeSharedObjects shared ) : int
shared SafeSharedObjects
리턴 int

DegreesToRadians() 보호된 메소드

protected DegreesToRadians ( double degrees ) : double
degrees double
리턴 double

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

public abstract Execute ( SafeSharedObjects shared ) : void
shared SafeSharedObjects
리턴 void

GetDouble() 보호된 메소드

protected GetDouble ( object argument ) : double
argument object
리턴 double

GetFuncName() 보호된 메소드

protected GetFuncName ( ) : string
리턴 string

GetInt() 보호된 메소드

protected GetInt ( object argument ) : int
argument object
리턴 int

PopStackAssert() 보호된 메소드

A utility function that a function's Execute() should use in place of cpu.PopStack(), because it will assert that the value being popped is NOT an ARG_MARKER_STRING, and if it is, it will throw the appropriate error.
protected PopStackAssert ( SafeSharedObjects shared ) : object
shared SafeSharedObjects
리턴 object

PopStructureAssertEncapsulated() 보호된 메소드

Identical to PopValueAssert, but with the additional step of coercing the result into a Structure to be sure, so it won't return primitives.
protected PopStructureAssertEncapsulated ( SafeSharedObjects shared, bool barewordOkay = false ) : Structure
shared SafeSharedObjects
barewordOkay bool
리턴 Structure

PopValueAssert() 보호된 메소드

A utility function that a function's Execute() should use in place of cpu.PopValue(), because it will assert that the value being popped is NOT an ARG_MARKER_STRING, and if it is, it will throw the appropriate error.
protected PopValueAssert ( SafeSharedObjects shared, bool barewordOkay = false ) : object
shared SafeSharedObjects
barewordOkay bool
리턴 object

RadiansToDegrees() 보호된 메소드

protected RadiansToDegrees ( double radians ) : double
radians double
리턴 double

SafeFunctionBase() 보호된 메소드

protected SafeFunctionBase ( ) : System
리턴 System