Property | Type | Description | |
---|---|---|---|
BuildAst | IEnumerable |
||
CreateInputOutputPorts | void | ||
GetAstIdentifierForOutputIndexInternal | ProtoCore.AST.AssociativeAST.IdentifierNode | ||
GetDefinedVariableNames | List |
||
GetInportIndex | int | ||
GetOutportIndex | int | ||
GetStatementForOutput | |||
LoadAndCreateConnectors | void | ||
LocalizeIdentifier | string | ||
ProcessCode | void | ||
ProcessCodeDirect | void | ||
ProcessError | void | ||
SaveAndDeleteConnectors | void | ||
SetInputPorts | void | ||
SetOutputPorts | void | ||
SetPreviewVariable | void | ||
ShouldBeRenamed | bool |
Method | Description | |
---|---|---|
CodeBlockNodeModel ( LibraryServices libraryServices ) : System |
Initilizes a new instance of the CodeBlockNodeModel class
|
|
CodeBlockNodeModel ( string userCode, System.Guid guid, double xPos, double yPos, LibraryServices libraryServices, ProtoCore.Namespace.ElementResolver resolver ) : System |
Initilizes a new instance of the CodeBlockNodeModel class
|
|
CodeBlockNodeModel ( string code, double x, double y, LibraryServices libraryServices, ProtoCore.Namespace.ElementResolver resolver ) : System |
Initilizes a new instance of the CodeBlockNodeModel class
|
|
GetAstIdentifierForOutputIndex ( int outputIndex ) : ProtoCore.AST.AssociativeAST.IdentifierNode |
Fetches the ProtoAST Identifier for a given output index.
|
|
GetRawAstIdentifierForOutputIndex ( int portIndex ) : ProtoCore.AST.AssociativeAST.IdentifierNode |
Fetches the raw ProtoAST Identifier for a given index.
|
|
GetTypeHintForOutput ( int index ) : ProtoCore.Type |
Returns possible type of the output at specified output port.
|
|
SetCodeContent ( string newCode, ProtoCore.Namespace.ElementResolver workspaceElementResolver ) : void |
Sets string content of CodeBlock node.
|
Method | Description | |
---|---|---|
DeserializeCore ( |
||
SerializeCore ( |
||
SetNodeStateBasedOnConnectionAndDefaults ( ) : void |
If a CBN is in Error state, it will have no code but will have output ports from the last successful compilation if any. In this case it should continue to be in Error state.
|
|
UpdateValueCore ( UpdateValueParams updateValueParams ) : bool |
Method | Description | |
---|---|---|
BuildAst ( List |
||
CreateInputOutputPorts ( ) : void |
Creates the inport and outport data based on the statements generated from the user code.
|
|
GetAstIdentifierForOutputIndexInternal ( int portIndex, bool forRawName ) : ProtoCore.AST.AssociativeAST.IdentifierNode |
For code block nodes, each output identifier of an output port is mapped. For an example, "p = 1" would have its internal identifier renamed to "pXXXX", where "XXXX" is the GUID of the code block node. This mapping is done to ensure the uniqueness of the output variable name.
|
|
GetDefinedVariableNames ( ) : List |
Returns the names of all the variables defined in this code block.
|
|
GetInportIndex ( |
Returns the index of the port corresponding to the variable name given
|
|
GetOutportIndex ( string variableName ) : int |
Returns the corresponding output port index for a given defined variable
|
|
GetStatementForOutput ( int portIndex ) : |
||
LoadAndCreateConnectors ( |
Now that the portData has been set for the new ports, we recreate the connections we so mercilessly destroyed, restoring peace and balance to the world once again.
|
|
LocalizeIdentifier ( string identifierName ) : string | ||
ProcessCode ( string &errorMessage, string &warningMessage, ProtoCore.Namespace.ElementResolver workspaceElementResolver = null ) : void | ||
ProcessCodeDirect ( ) : void | ||
ProcessError ( ) : void |
It removes all the in ports and out ports so that the user knows there is an error.
|
|
SaveAndDeleteConnectors ( IDictionary inportConnections, IDictionary outportConnections ) : void |
Deletes all the connections and saves their data (the start and end port) so that they can be recreated if needed.
|
|
SetInputPorts ( ) : void | ||
SetOutputPorts ( ) : void | ||
SetPreviewVariable ( IEnumerable |
||
ShouldBeRenamed ( string ident ) : bool |
public CodeBlockNodeModel ( LibraryServices libraryServices ) : System | ||
libraryServices | LibraryServices | |
return | System |
public CodeBlockNodeModel ( string userCode, System.Guid guid, double xPos, double yPos, LibraryServices libraryServices, ProtoCore.Namespace.ElementResolver resolver ) : System | ||
userCode | string | Code block content |
guid | System.Guid | Identifier of the code block |
xPos | double | X coordinate of the code block |
yPos | double | Y coordinate of the code block |
libraryServices | LibraryServices | |
resolver | ProtoCore.Namespace.ElementResolver | Responsible for resolving /// a partial class name to its fully resolved name |
return | System |
public CodeBlockNodeModel ( string code, double x, double y, LibraryServices libraryServices, ProtoCore.Namespace.ElementResolver resolver ) : System | ||
code | string | Code block content |
x | double | X coordinate of the code block |
y | double | Y coordinate of the code block |
libraryServices | LibraryServices | |
resolver | ProtoCore.Namespace.ElementResolver | Responsible for resolving /// a partial class name to its fully resolved name |
return | System |
protected DeserializeCore ( |
||
nodeElement | ||
context | SaveContext | |
return | void |
public GetAstIdentifierForOutputIndex ( int outputIndex ) : ProtoCore.AST.AssociativeAST.IdentifierNode | ||
outputIndex | int | Index of the output port. |
return | ProtoCore.AST.AssociativeAST.IdentifierNode |
public GetRawAstIdentifierForOutputIndex ( int portIndex ) : ProtoCore.AST.AssociativeAST.IdentifierNode | ||
portIndex | int | Index of the port. |
return | ProtoCore.AST.AssociativeAST.IdentifierNode |
public GetTypeHintForOutput ( int index ) : ProtoCore.Type | ||
index | int | Index of the port |
return | ProtoCore.Type |
protected SerializeCore ( |
||
element | ||
context | SaveContext | |
return | void |
public SetCodeContent ( string newCode, ProtoCore.Namespace.ElementResolver workspaceElementResolver ) : void | ||
newCode | string | New content of the code block |
workspaceElementResolver | ProtoCore.Namespace.ElementResolver | |
return | void |
protected SetNodeStateBasedOnConnectionAndDefaults ( ) : void | ||
return | void |
protected UpdateValueCore ( UpdateValueParams updateValueParams ) : bool | ||
updateValueParams | UpdateValueParams | |
return | bool |