-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Xlinka/Testing
ALL THE STRINGS
- Loading branch information
Showing
21 changed files
with
990 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
using System; | ||
using Elements.Core; | ||
using FrooxEngine; | ||
using FrooxEngine.ProtoFlux; | ||
using ProtoFlux.Core; | ||
using ProtoFlux.Runtimes.Execution; | ||
using ProtoFlux.Runtimes.Execution.Nodes.Strings; | ||
|
||
[Category(new string[] { "ProtoFlux/Runtimes/Execution/Nodes/Obsidian/String" })] | ||
public class CountSubstringBinding : FrooxEngine.ProtoFlux.Runtimes.Execution.ValueFunctionNode<ExecutionContext, int> | ||
{ | ||
public readonly SyncRef<INodeObjectOutput<string>> String; | ||
public readonly SyncRef<INodeObjectOutput<string>> Pattern; | ||
|
||
public override Type NodeType => typeof(CountSubstringNode); | ||
|
||
public CountSubstringNode TypedNodeInstance { get; private set; } | ||
|
||
public override INode NodeInstance => TypedNodeInstance; | ||
|
||
public override int NodeInputCount => base.NodeInputCount + 2; | ||
|
||
public override N Instantiate<N>() | ||
{ | ||
if (TypedNodeInstance != null) | ||
{ | ||
throw new InvalidOperationException("Node has already been instantiated"); | ||
} | ||
CountSubstringNode countSubstringNodeInstance = (TypedNodeInstance = new CountSubstringNode()); | ||
return countSubstringNodeInstance as N; | ||
} | ||
|
||
protected override void AssociateInstanceInternal(INode node) | ||
{ | ||
if (node is CountSubstringNode typedNodeInstance) | ||
{ | ||
TypedNodeInstance = typedNodeInstance; | ||
return; | ||
} | ||
throw new ArgumentException("Node instance is not of type " + typeof(CountSubstringNode)); | ||
} | ||
|
||
public override void ClearInstance() | ||
{ | ||
TypedNodeInstance = null; | ||
} | ||
|
||
protected override ISyncRef GetInputInternal(ref int index) | ||
{ | ||
ISyncRef inputInternal = base.GetInputInternal(ref index); | ||
if (inputInternal != null) | ||
{ | ||
return inputInternal; | ||
} | ||
switch (index) | ||
{ | ||
case 0: | ||
return String; | ||
case 1: | ||
return Pattern; | ||
default: | ||
index -= 2; | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using System; | ||
using Elements.Core; | ||
using FrooxEngine; | ||
using FrooxEngine.ProtoFlux; | ||
using ProtoFlux.Core; | ||
using ProtoFlux.Runtimes.Execution; | ||
using ProtoFlux.Runtimes.Execution.Nodes.Strings; | ||
|
||
[Category(new string[] { "ProtoFlux/Runtimes/Execution/Nodes/Obsidian/String" })] | ||
public class DecodeBase64Binding : FrooxEngine.ProtoFlux.Runtimes.Execution.ObjectFunctionNode<ExecutionContext, string> | ||
{ | ||
public readonly SyncRef<INodeObjectOutput<string>> Input; | ||
|
||
public override Type NodeType => typeof(DecodeBase64Node); | ||
|
||
public DecodeBase64Node TypedNodeInstance { get; private set; } | ||
|
||
public override INode NodeInstance => TypedNodeInstance; | ||
|
||
public override int NodeInputCount => base.NodeInputCount + 1; | ||
|
||
public override N Instantiate<N>() | ||
{ | ||
if (TypedNodeInstance != null) | ||
{ | ||
throw new InvalidOperationException("Node has already been instantiated"); | ||
} | ||
DecodeBase64Node decodeBase64NodeInstance = (TypedNodeInstance = new DecodeBase64Node()); | ||
return decodeBase64NodeInstance as N; | ||
} | ||
|
||
protected override void AssociateInstanceInternal(INode node) | ||
{ | ||
if (node is DecodeBase64Node typedNodeInstance) | ||
{ | ||
TypedNodeInstance = typedNodeInstance; | ||
return; | ||
} | ||
throw new ArgumentException("Node instance is not of type " + typeof(DecodeBase64Node)); | ||
} | ||
|
||
public override void ClearInstance() | ||
{ | ||
TypedNodeInstance = null; | ||
} | ||
|
||
protected override ISyncRef GetInputInternal(ref int index) | ||
{ | ||
ISyncRef inputInternal = base.GetInputInternal(ref index); | ||
if (inputInternal != null) | ||
{ | ||
return inputInternal; | ||
} | ||
if (index == 0) | ||
{ | ||
return Input; | ||
} | ||
index -= 1; | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using System; | ||
using Elements.Core; | ||
using FrooxEngine; | ||
using FrooxEngine.ProtoFlux; | ||
using ProtoFlux.Core; | ||
using ProtoFlux.Runtimes.Execution; | ||
using ProtoFlux.Runtimes.Execution.Nodes.Strings; | ||
|
||
[Category(new string[] { "ProtoFlux/Runtimes/Execution/Nodes/Obsidian/String" })] | ||
public class DecodeMorse : FrooxEngine.ProtoFlux.Runtimes.Execution.ObjectFunctionNode<ExecutionContext, string> | ||
{ | ||
public readonly SyncRef<INodeObjectOutput<string>> Input; | ||
|
||
public override Type NodeType => typeof(DecodeMorseNode); | ||
|
||
public DecodeMorseNode TypedNodeInstance { get; private set; } | ||
|
||
public override INode NodeInstance => TypedNodeInstance; | ||
|
||
public override int NodeInputCount => base.NodeInputCount + 1; | ||
|
||
public override N Instantiate<N>() | ||
{ | ||
if (TypedNodeInstance != null) | ||
{ | ||
throw new InvalidOperationException("Node has already been instantiated"); | ||
} | ||
DecodeMorseNode decodeMorseNodeInstance = (TypedNodeInstance = new DecodeMorseNode()); | ||
return decodeMorseNodeInstance as N; | ||
} | ||
|
||
protected override void AssociateInstanceInternal(INode node) | ||
{ | ||
if (node is DecodeMorseNode typedNodeInstance) | ||
{ | ||
TypedNodeInstance = typedNodeInstance; | ||
return; | ||
} | ||
throw new ArgumentException("Node instance is not of type " + typeof(DecodeMorseNode)); | ||
} | ||
|
||
public override void ClearInstance() | ||
{ | ||
TypedNodeInstance = null; | ||
} | ||
|
||
protected override ISyncRef GetInputInternal(ref int index) | ||
{ | ||
ISyncRef inputInternal = base.GetInputInternal(ref index); | ||
if (inputInternal != null) | ||
{ | ||
return inputInternal; | ||
} | ||
if (index == 0) | ||
{ | ||
return Input; | ||
} | ||
index -= 1; | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using System; | ||
using Elements.Core; | ||
using FrooxEngine; | ||
using FrooxEngine.ProtoFlux; | ||
using ProtoFlux.Core; | ||
using ProtoFlux.Runtimes.Execution; | ||
using ProtoFlux.Runtimes.Execution.Nodes.Strings; | ||
|
||
[Category(new string[] { "ProtoFlux/Runtimes/Execution/Nodes/Obsidian/String" })] | ||
public class EncodeBase64 : FrooxEngine.ProtoFlux.Runtimes.Execution.ObjectFunctionNode<ExecutionContext, string> | ||
{ | ||
public readonly SyncRef<INodeObjectOutput<string>> Input; | ||
|
||
public override Type NodeType => typeof(EncodeBase64Node); | ||
|
||
public EncodeBase64Node TypedNodeInstance { get; private set; } | ||
|
||
public override INode NodeInstance => TypedNodeInstance; | ||
|
||
public override int NodeInputCount => base.NodeInputCount + 1; | ||
|
||
public override N Instantiate<N>() | ||
{ | ||
if (TypedNodeInstance != null) | ||
{ | ||
throw new InvalidOperationException("Node has already been instantiated"); | ||
} | ||
EncodeBase64Node encodeBase64NodeInstance = (TypedNodeInstance = new EncodeBase64Node()); | ||
return encodeBase64NodeInstance as N; | ||
} | ||
|
||
protected override void AssociateInstanceInternal(INode node) | ||
{ | ||
if (node is EncodeBase64Node typedNodeInstance) | ||
{ | ||
TypedNodeInstance = typedNodeInstance; | ||
return; | ||
} | ||
throw new ArgumentException("Node instance is not of type " + typeof(EncodeBase64Node)); | ||
} | ||
|
||
public override void ClearInstance() | ||
{ | ||
TypedNodeInstance = null; | ||
} | ||
|
||
protected override ISyncRef GetInputInternal(ref int index) | ||
{ | ||
ISyncRef inputInternal = base.GetInputInternal(ref index); | ||
if (inputInternal != null) | ||
{ | ||
return inputInternal; | ||
} | ||
if (index == 0) | ||
{ | ||
return Input; | ||
} | ||
index -= 1; | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using System; | ||
using Elements.Core; | ||
using FrooxEngine; | ||
using FrooxEngine.ProtoFlux; | ||
using ProtoFlux.Core; | ||
using ProtoFlux.Runtimes.Execution; | ||
using ProtoFlux.Runtimes.Execution.Nodes.Strings; | ||
|
||
[Category(new string[] { "ProtoFlux/Runtimes/Execution/Nodes/Obsidian/String" })] | ||
public class EncodeMD5 : FrooxEngine.ProtoFlux.Runtimes.Execution.ObjectFunctionNode<ExecutionContext, string> | ||
{ | ||
public readonly SyncRef<INodeObjectOutput<string>> Input; | ||
|
||
public override Type NodeType => typeof(EncodeMD5Node); | ||
|
||
public EncodeMD5Node TypedNodeInstance { get; private set; } | ||
|
||
public override INode NodeInstance => TypedNodeInstance; | ||
|
||
public override int NodeInputCount => base.NodeInputCount + 1; | ||
|
||
public override N Instantiate<N>() | ||
{ | ||
if (TypedNodeInstance != null) | ||
{ | ||
throw new InvalidOperationException("Node has already been instantiated"); | ||
} | ||
EncodeMD5Node encodeMD5NodeInstance = (TypedNodeInstance = new EncodeMD5Node()); | ||
return encodeMD5NodeInstance as N; | ||
} | ||
|
||
protected override void AssociateInstanceInternal(INode node) | ||
{ | ||
if (node is EncodeMD5Node typedNodeInstance) | ||
{ | ||
TypedNodeInstance = typedNodeInstance; | ||
return; | ||
} | ||
throw new ArgumentException("Node instance is not of type " + typeof(EncodeMD5Node)); | ||
} | ||
|
||
public override void ClearInstance() | ||
{ | ||
TypedNodeInstance = null; | ||
} | ||
|
||
protected override ISyncRef GetInputInternal(ref int index) | ||
{ | ||
ISyncRef inputInternal = base.GetInputInternal(ref index); | ||
if (inputInternal != null) | ||
{ | ||
return inputInternal; | ||
} | ||
if (index == 0) | ||
{ | ||
return Input; | ||
} | ||
index -= 1; | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using System; | ||
using Elements.Core; | ||
using FrooxEngine; | ||
using FrooxEngine.ProtoFlux; | ||
using ProtoFlux.Core; | ||
using ProtoFlux.Runtimes.Execution; | ||
using ProtoFlux.Runtimes.Execution.Nodes.Strings; | ||
|
||
[Category(new string[] { "ProtoFlux/Runtimes/Execution/Nodes/Obsidian/String" })] | ||
public class EncodeMorse : FrooxEngine.ProtoFlux.Runtimes.Execution.ObjectFunctionNode<ExecutionContext, string> | ||
{ | ||
public readonly SyncRef<INodeObjectOutput<string>> Input; | ||
|
||
public override Type NodeType => typeof(EncodeMorseNode); | ||
|
||
public EncodeMorseNode TypedNodeInstance { get; private set; } | ||
|
||
public override INode NodeInstance => TypedNodeInstance; | ||
|
||
public override int NodeInputCount => base.NodeInputCount + 1; | ||
|
||
public override N Instantiate<N>() | ||
{ | ||
if (TypedNodeInstance != null) | ||
{ | ||
throw new InvalidOperationException("Node has already been instantiated"); | ||
} | ||
EncodeMorseNode encodeMorseNodeInstance = (TypedNodeInstance = new EncodeMorseNode()); | ||
return encodeMorseNodeInstance as N; | ||
} | ||
|
||
protected override void AssociateInstanceInternal(INode node) | ||
{ | ||
if (node is EncodeMorseNode typedNodeInstance) | ||
{ | ||
TypedNodeInstance = typedNodeInstance; | ||
return; | ||
} | ||
throw new ArgumentException("Node instance is not of type " + typeof(EncodeMorseNode)); | ||
} | ||
|
||
public override void ClearInstance() | ||
{ | ||
TypedNodeInstance = null; | ||
} | ||
|
||
protected override ISyncRef GetInputInternal(ref int index) | ||
{ | ||
ISyncRef inputInternal = base.GetInputInternal(ref index); | ||
if (inputInternal != null) | ||
{ | ||
return inputInternal; | ||
} | ||
if (index == 0) | ||
{ | ||
return Input; | ||
} | ||
index -= 1; | ||
return null; | ||
} | ||
} |
Oops, something went wrong.