C# Класс kOS.Safe.Function.SafeFunctionBase

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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