C# 클래스 kOS.Safe.Execution.Stack

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

공개 메소드들

메소드 설명
Clear ( ) : void
Dump ( ) : string
GetCallTrace ( ) : List

Return the subroutine call trace of how the code got to where it is right now.

GetLogicalSize ( ) : int

Returns the logical size of the current stack (not its potentially larger storage size).

HasTriggerContexts ( ) : bool

This stack tracks all its pushes and pops to know whether or not it contains subroutine contexts which are from triggers. If there are any still triggers in the stack, this returns true, else false.

MoveStackPointer ( int delta ) : void
Peek ( int digDepth ) : object

Slightly "cheats" and breaks out of the 'stack' model by allowing you to view the contents of somewhere on the stack that is underneath the topmost thing. You can only peek, but not pop values this way.

PeekCheck ( int digDepth, object &item ) : bool

Slightly "cheats" and breaks out of the 'stack' model by allowing you to view the contents of somewhere on the stack that is underneath the topmost thing. You can only peek, but not pop values this way. It returns both the object found there (as an out parameter) and a boolean for whether or not your peek attempt went out of bounds of the stack.

Pop ( ) : object
Push ( object item ) : void

비공개 메소드들

메소드 설명
ProcessItem ( object item ) : object

Make any conversion needed before pushing an item onto the stack

ThrowIfInvalid ( object item ) : void

메소드 상세

Clear() 공개 메소드

public Clear ( ) : void
리턴 void

Dump() 공개 메소드

public Dump ( ) : string
리턴 string

GetCallTrace() 공개 메소드

Return the subroutine call trace of how the code got to where it is right now.
public GetCallTrace ( ) : List
리턴 List

GetLogicalSize() 공개 메소드

Returns the logical size of the current stack (not its potentially larger storage size).
public GetLogicalSize ( ) : int
리턴 int

HasTriggerContexts() 공개 메소드

This stack tracks all its pushes and pops to know whether or not it contains subroutine contexts which are from triggers. If there are any still triggers in the stack, this returns true, else false.
public HasTriggerContexts ( ) : bool
리턴 bool

MoveStackPointer() 공개 메소드

public MoveStackPointer ( int delta ) : void
delta int
리턴 void

Peek() 공개 메소드

Slightly "cheats" and breaks out of the 'stack' model by allowing you to view the contents of somewhere on the stack that is underneath the topmost thing. You can only peek, but not pop values this way.
public Peek ( int digDepth ) : object
digDepth int How far underneath the top to look. Zero means peek at the top, /// 1 means peek at the item just under the top, 2 means peek at the item just under that, and /// so on. Note you CAN peek a negative number, which looks at the secret stack above the /// stack - where the subroutine contexts and local variable contexts are.
리턴 object

PeekCheck() 공개 메소드

Slightly "cheats" and breaks out of the 'stack' model by allowing you to view the contents of somewhere on the stack that is underneath the topmost thing. You can only peek, but not pop values this way. It returns both the object found there (as an out parameter) and a boolean for whether or not your peek attempt went out of bounds of the stack.
public PeekCheck ( int digDepth, object &item ) : bool
digDepth int How far underneath the top to look. Zero means peek at the top, /// 1 means peek at the item just under the top, 2 means peek at the item just under that, and /// so on. Note you CAN peek a negative number, which looks at the secret stack above the /// stack - where the subroutine contexts and local variable contexts are.
item object The object at that depth. Will be null when digDepth is too large and the stack isn't /// big enough to dig that deep, but it also could return null if the actual value stored there on /// the stack really is a null. If you need to be certain of the difference, use the return value.
리턴 bool

Pop() 공개 메소드

public Pop ( ) : object
리턴 object

Push() 공개 메소드

public Push ( object item ) : void
item object
리턴 void