74 lines
1.5 KiB
C++
74 lines
1.5 KiB
C++
#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
|
|
|
|
}
|