C# 클래스 YAMP.ParseContext

Class that describes the current parse context (available functions, constants, variables, ...).
파일 보기 프로젝트 열기: FlorianRappl/YAMP 1 사용 예제들

Private Properties

프로퍼티 타입 설명
ApplyPlotTemplate ParseContext
AssignVariable void
ParseContext System
RaiseInputPrompt void
RaiseLastPlotChanged void
RaiseNotification void
RaisePause void
RaiseVariableChanged void
RaiseVariableCreated void
RaiseVariableRemoved void

공개 메소드들

메소드 설명
AddConstant ( String name, IConstants constant ) : ParseContext

Adds a constant to the context.

AddFunction ( String name, IFunction func ) : ParseContext

Adds a function to the context.

AssignVariable ( String name, Value value ) : ParseContext

Assigns a value to a symbolic name.

ChangeLastPlotTo ( PlotValue plot ) : ParseContext

Sets the lastplot to be used to the given value.

Clear ( ) : ParseContext

Clears the list of assigned variables.

FindConstants ( String name ) : IConstants

Finds the constant with the specified name.

FindFunction ( String name ) : IFunction

Finds the function instance with the specified name.

GetDefaultProperties ( String binName ) : Value>.ReadOnlyDictionary

Gets the key value pairs of the specified bin.

GetSymbolContext ( String name ) : ParseContext

Gets the exact context of the given symbol.

GetVariable ( String name ) : Value

Gets the value with the specific symbolic name.

GetVariableContext ( String name ) : ParseContext

Gets the exact context of the given variable.

LoadFunction ( String symbolName ) : IFunction

Tries to load a function from a given file.

ParseContext ( ) : System

Creates a new top context.

ParseContext ( ParseContext parentContext ) : System

Creates a new context with a custom parent (nested, i.e. more local layer).

RemoveConstant ( String name ) : ParseContext

Removes a constant from the context.

RemoveFunction ( String name ) : ParseContext

Removes a function from the context.

RenameConstant ( String oldName, String newName ) : ParseContext

Renames a constant from the context.

RenameFunction ( String oldName, String newName ) : ParseContext

Renames a function from the context.

SetDefaultProperty ( String binName, String propertyName, Value propertyValue ) : ParseContext

Sets a template property in the dictionary.

비공개 메소드들

메소드 설명
ApplyPlotTemplate ( PlotValue plot ) : ParseContext

Applies the template set for plots.

AssignVariable ( ParseContext context, String name, Value value ) : void

Assigns a variable to the given context.

ParseContext ( Value>.IDictionary shadowVariables ) : System
RaiseInputPrompt ( UserInputEventArgs e ) : void

Raises the input prompt if in interactive mode.

RaiseLastPlotChanged ( PlotEventArgs e ) : void

This is raised when the last plot has been changed.

RaiseNotification ( NotificationEventArgs e ) : void

Raises the notification if in interactive mode.

RaisePause ( PauseEventArgs e ) : void

Raises the input prompt if in interactive mode.

RaiseVariableChanged ( VariableEventArgs e ) : void

This is raised when a variable has changed.

RaiseVariableCreated ( VariableEventArgs e ) : void

This is raised when a variable has been created.

RaiseVariableRemoved ( VariableEventArgs e ) : void

This is raised when a variable has been removed.

메소드 상세

AddConstant() 공개 메소드

Adds a constant to the context.
public AddConstant ( String name, IConstants constant ) : ParseContext
name String /// The name of the constant. ///
constant IConstants /// The class instance of the constant. ///
리턴 ParseContext

AddFunction() 공개 메소드

Adds a function to the context.
public AddFunction ( String name, IFunction func ) : ParseContext
name String /// The name of the function. ///
func IFunction /// The IFunction instance to add. ///
리턴 ParseContext

AssignVariable() 공개 메소드

Assigns a value to a symbolic name.
public AssignVariable ( String name, Value value ) : ParseContext
name String /// The name to assign a value to. ///
value Value /// The value of the symbol. ///
리턴 ParseContext

ChangeLastPlotTo() 공개 메소드

Sets the lastplot to be used to the given value.
public ChangeLastPlotTo ( PlotValue plot ) : ParseContext
plot PlotValue The plot to change to.
리턴 ParseContext

Clear() 공개 메소드

Clears the list of assigned variables.
public Clear ( ) : ParseContext
리턴 ParseContext

FindConstants() 공개 메소드

Finds the constant with the specified name.
public FindConstants ( String name ) : IConstants
name String /// The symbolic name to retrieve. ///
리턴 IConstants

FindFunction() 공개 메소드

Finds the function instance with the specified name.
public FindFunction ( String name ) : IFunction
name String /// The symbolic name to retrieve. ///
리턴 IFunction

GetDefaultProperties() 공개 메소드

Gets the key value pairs of the specified bin.
public GetDefaultProperties ( String binName ) : Value>.ReadOnlyDictionary
binName String The name of the template bin.
리턴 Value>.ReadOnlyDictionary

GetSymbolContext() 공개 메소드

Gets the exact context of the given symbol.
public GetSymbolContext ( String name ) : ParseContext
name String The name of the symbol.
리턴 ParseContext

GetVariable() 공개 메소드

Gets the value with the specific symbolic name.
public GetVariable ( String name ) : Value
name String /// The variable's name. ///
리턴 Value

GetVariableContext() 공개 메소드

Gets the exact context of the given variable.
public GetVariableContext ( String name ) : ParseContext
name String The name of the variable.
리턴 ParseContext

LoadFunction() 공개 메소드

Tries to load a function from a given file.
public LoadFunction ( String symbolName ) : IFunction
symbolName String /// The name of the function (equals the name of the file). ///
리턴 IFunction

ParseContext() 공개 메소드

Creates a new top context.
public ParseContext ( ) : System
리턴 System

ParseContext() 공개 메소드

Creates a new context with a custom parent (nested, i.e. more local layer).
public ParseContext ( ParseContext parentContext ) : System
parentContext ParseContext /// The parent context for the new context. ///
리턴 System

RemoveConstant() 공개 메소드

Removes a constant from the context.
public RemoveConstant ( String name ) : ParseContext
name String /// The name of the constant. ///
리턴 ParseContext

RemoveFunction() 공개 메소드

Removes a function from the context.
public RemoveFunction ( String name ) : ParseContext
name String /// The name of the function. ///
리턴 ParseContext

RenameConstant() 공개 메소드

Renames a constant from the context.
public RenameConstant ( String oldName, String newName ) : ParseContext
oldName String /// The old name of the constant. ///
newName String /// The new name for the constant. ///
리턴 ParseContext

RenameFunction() 공개 메소드

Renames a function from the context.
public RenameFunction ( String oldName, String newName ) : ParseContext
oldName String /// The old name of the function. ///
newName String /// The new name for the function. ///
리턴 ParseContext

SetDefaultProperty() 공개 메소드

Sets a template property in the dictionary.
public SetDefaultProperty ( String binName, String propertyName, Value propertyValue ) : ParseContext
binName String The category of the default property.
propertyName String The name of the property.
propertyValue Value The default value of the property.
리턴 ParseContext