Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALL THE STRINGS #11

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions Bindings/Strings/CountSubstringBinding.cs
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;
}
}
}
61 changes: 61 additions & 0 deletions Bindings/Strings/DecodeBase64.cs
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;
}
}
61 changes: 61 additions & 0 deletions Bindings/Strings/DecodeMorse.cs
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;
}
}
61 changes: 61 additions & 0 deletions Bindings/Strings/EncodeBase64.cs
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;
}
}
61 changes: 61 additions & 0 deletions Bindings/Strings/EncodeMD5.cs
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;
}
}
61 changes: 61 additions & 0 deletions Bindings/Strings/EncodeMorse.cs
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;
}
}
Loading