netpoet coop and 64kode
This commit is contained in:
73
64kode/src/NodeSystem/Functions.h
Normal file
73
64kode/src/NodeSystem/Functions.h
Normal file
@@ -0,0 +1,73 @@
|
||||
#pragma once
|
||||
|
||||
namespace kode64
|
||||
{
|
||||
#ifdef AUTHORING
|
||||
|
||||
ref class FunctionCall;
|
||||
|
||||
public ref class Function : public MultiNode
|
||||
{
|
||||
public:
|
||||
Function();
|
||||
void Exec(OutputPin^ outputPin, ExecPin^ execPin) override;
|
||||
|
||||
Node^ firstExecNode;
|
||||
System::Collections::Generic::List<System::Object^>^ variables = gcnew System::Collections::Generic::List<System::Object^>();
|
||||
System::Collections::Generic::List<FunctionCall^>^ functionCalls = gcnew System::Collections::Generic::List<FunctionCall^>();
|
||||
static System::Collections::Generic::List<Function^>^ functions = gcnew System::Collections::Generic::List<Function^>();
|
||||
int index;
|
||||
};
|
||||
|
||||
public ref class FunctionCall : public MultiNode
|
||||
{
|
||||
public:
|
||||
|
||||
void Exec(OutputPin^ outputPin, ExecPin^ execPin) override;
|
||||
|
||||
InputPin^ AddInput(System::Object^ defaultValue) override;
|
||||
OutputPin^ AddOutput(System::Object^ defaultValue) override;
|
||||
ExecPin^ AddExec() override;
|
||||
|
||||
Function^ function;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
|
||||
struct FunctionCall;
|
||||
|
||||
struct Function : MultiNode
|
||||
{
|
||||
public:
|
||||
friend FunctionCall;
|
||||
|
||||
void Exec(int outputPinIndex, int execPinIndex) override;
|
||||
|
||||
Node* firstExecNode;
|
||||
std::vector<NodeGroup*> functionCalls;
|
||||
};
|
||||
|
||||
struct FunctionCall : MultiNode
|
||||
{
|
||||
public:
|
||||
NodeGroup();
|
||||
virtual ~NodeGroup();
|
||||
|
||||
friend Function;
|
||||
|
||||
void Exec(int outputPinIndex, int execPinIndex) override;
|
||||
virtual void Init() override;
|
||||
|
||||
int AddInput(Any&& defaultValue) override;
|
||||
int AddOutput(Any&& defaultValue) override;
|
||||
int AddExec() override;
|
||||
|
||||
|
||||
protected:
|
||||
Function* function;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user