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

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

Private Properties

프로퍼티 타입 설명
ProtectCSVField string
UpdateFileMap void
UpdateInstructionPointer void
UpdateProgram void

공개 메소드들

메소드 설명
ActivatePendingTriggers ( ) : void

Take all the pending triggers that have been added by AddPendingTrigger, and finally make them become active. To be called by the CPU when it decides that enough mainline code has had a chance to happen that it's okay to enable triggers again.

ActiveTriggerCount ( ) : int

How many triggers (active) there are.

AddObjectParts ( IEnumerable parts, string objectFileID ) : int
AddParts ( IEnumerable parts ) : void
AddPendingTrigger ( int instructionPointer ) : void

Add a trigger to the list of triggers pending insertion. It will not *finish* inserting it until the CPU tells us it's a good time to do so, by calling ActivatePendingTriggers(). It will also refuse to insert a trigger that's already either active or pending insertion to the active list (avoids duplication).

ClearTriggers ( ) : void

Remove all active and pending triggers.

ContainsTrigger ( int instructionPointer ) : bool

True if the given trigger's IP is for a trigger that is currently active, or is about to become active.

DisableActiveFlyByWire ( IBindingManager manager ) : void
EnableActiveFlyByWire ( IBindingManager manager ) : void
GetAlreadyCompiledEntryPoint ( string fileID ) : int

Return the entry point into the program context where this filename was already inserted into the system before. If it hasn't been inserted before, returns a negative number as a flag indicating this fact. fileID should be a string that will be fully unique for each file (the fully qualified path name, for example).

GetCodeFragment ( int contextLines ) : List
GetCodeFragment ( int start, int stop, bool doProfile = false ) : List
GetTriggerByIndex ( int index ) : int

Return the active trigger at the given index. Cannot be used to get pending insertion triggers.

ProgramContext ( bool interpreterContext ) : System
ProgramContext ( bool interpreterContext, List program ) : System
RemoveTrigger ( int instructionPointer ) : void

Remove a trigger from current triggers or pending insertion triggers or both if need be, so it's not there anymore at all.

ToggleFlyByWire ( string paramName, bool enabled ) : void

비공개 메소드들

메소드 설명
ProtectCSVField ( string s ) : string

Return a version of the string that has been protected for use in a comma-separated file field by quoting and escaping as necessary any special characters inside it.

UpdateFileMap ( string fileID, int entryPoint ) : void
UpdateInstructionPointer ( List oldProgram ) : void
UpdateProgram ( List newProgram ) : void

메소드 상세

ActivatePendingTriggers() 공개 메소드

Take all the pending triggers that have been added by AddPendingTrigger, and finally make them become active. To be called by the CPU when it decides that enough mainline code has had a chance to happen that it's okay to enable triggers again.
public ActivatePendingTriggers ( ) : void
리턴 void

ActiveTriggerCount() 공개 메소드

How many triggers (active) there are.
public ActiveTriggerCount ( ) : int
리턴 int

AddObjectParts() 공개 메소드

public AddObjectParts ( IEnumerable parts, string objectFileID ) : int
parts IEnumerable
objectFileID string
리턴 int

AddParts() 공개 메소드

public AddParts ( IEnumerable parts ) : void
parts IEnumerable
리턴 void

AddPendingTrigger() 공개 메소드

Add a trigger to the list of triggers pending insertion. It will not *finish* inserting it until the CPU tells us it's a good time to do so, by calling ActivatePendingTriggers(). It will also refuse to insert a trigger that's already either active or pending insertion to the active list (avoids duplication).
public AddPendingTrigger ( int instructionPointer ) : void
instructionPointer int
리턴 void

ClearTriggers() 공개 메소드

Remove all active and pending triggers.
public ClearTriggers ( ) : void
리턴 void

ContainsTrigger() 공개 메소드

True if the given trigger's IP is for a trigger that is currently active, or is about to become active.
public ContainsTrigger ( int instructionPointer ) : bool
instructionPointer int
리턴 bool

DisableActiveFlyByWire() 공개 메소드

public DisableActiveFlyByWire ( IBindingManager manager ) : void
manager IBindingManager
리턴 void

EnableActiveFlyByWire() 공개 메소드

public EnableActiveFlyByWire ( IBindingManager manager ) : void
manager IBindingManager
리턴 void

GetAlreadyCompiledEntryPoint() 공개 메소드

Return the entry point into the program context where this filename was already inserted into the system before. If it hasn't been inserted before, returns a negative number as a flag indicating this fact. fileID should be a string that will be fully unique for each file (the fully qualified path name, for example).
public GetAlreadyCompiledEntryPoint ( string fileID ) : int
fileID string
리턴 int

GetCodeFragment() 공개 메소드

public GetCodeFragment ( int contextLines ) : List
contextLines int
리턴 List

GetCodeFragment() 공개 메소드

public GetCodeFragment ( int start, int stop, bool doProfile = false ) : List
start int
stop int
doProfile bool
리턴 List

GetTriggerByIndex() 공개 메소드

Return the active trigger at the given index. Cannot be used to get pending insertion triggers.
public GetTriggerByIndex ( int index ) : int
index int
리턴 int

ProgramContext() 공개 메소드

public ProgramContext ( bool interpreterContext ) : System
interpreterContext bool
리턴 System

ProgramContext() 공개 메소드

public ProgramContext ( bool interpreterContext, List program ) : System
interpreterContext bool
program List
리턴 System

RemoveTrigger() 공개 메소드

Remove a trigger from current triggers or pending insertion triggers or both if need be, so it's not there anymore at all.
public RemoveTrigger ( int instructionPointer ) : void
instructionPointer int
리턴 void

ToggleFlyByWire() 공개 메소드

public ToggleFlyByWire ( string paramName, bool enabled ) : void
paramName string
enabled bool
리턴 void