summaryrefslogtreecommitdiff
path: root/modules/visual_script/visual_script_nodes.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /modules/visual_script/visual_script_nodes.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
A Whole New World (clang-format edition)
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
Diffstat (limited to 'modules/visual_script/visual_script_nodes.h')
-rw-r--r--modules/visual_script/visual_script_nodes.h387
1 files changed, 128 insertions, 259 deletions
diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h
index 2e7fb0536c..b2fc115660 100644
--- a/modules/visual_script/visual_script_nodes.h
+++ b/modules/visual_script/visual_script_nodes.h
@@ -33,8 +33,7 @@
class VisualScriptFunction : public VisualScriptNode {
- GDCLASS(VisualScriptFunction,VisualScriptNode)
-
+ GDCLASS(VisualScriptFunction, VisualScriptNode)
struct Argument {
String name;
@@ -47,26 +46,20 @@ class VisualScriptFunction : public VisualScriptNode {
int stack_size;
ScriptInstance::RPCMode rpc_mode;
-
protected:
-
- bool _set(const StringName& p_name, const Variant& p_value);
- bool _get(const StringName& p_name,Variant &r_ret) const;
- void _get_property_list( List<PropertyInfo> *p_list) const;
+ bool _set(const StringName &p_name, const Variant &p_value);
+ bool _get(const StringName &p_name, Variant &r_ret) const;
+ void _get_property_list(List<PropertyInfo> *p_list) const;
public:
-
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -74,15 +67,14 @@ public:
virtual String get_text() const;
virtual String get_category() const { return "flow_control"; }
- void add_argument(Variant::Type p_type,const String& p_name,int p_index=-1);
- void set_argument_type(int p_argidx,Variant::Type p_type);
+ void add_argument(Variant::Type p_type, const String &p_name, int p_index = -1);
+ void set_argument_type(int p_argidx, Variant::Type p_type);
Variant::Type get_argument_type(int p_argidx) const;
- void set_argument_name(int p_argidx,const String& p_name);
+ void set_argument_name(int p_argidx, const String &p_name);
String get_argument_name(int p_argidx) const;
void remove_argument(int p_argidx);
int get_argument_count() const;
-
void set_stack_less(bool p_enable);
bool is_stack_less() const;
@@ -92,35 +84,30 @@ public:
void set_rpc_mode(ScriptInstance::RPCMode p_mode);
ScriptInstance::RPCMode get_rpc_mode() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptFunction();
};
-
class VisualScriptOperator : public VisualScriptNode {
- GDCLASS(VisualScriptOperator,VisualScriptNode)
-
+ GDCLASS(VisualScriptOperator, VisualScriptNode)
Variant::Type typed;
Variant::Operator op;
-protected:
+protected:
static void _bind_methods();
-public:
+public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -134,35 +121,30 @@ public:
void set_typed(Variant::Type p_op);
Variant::Type get_typed() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptOperator();
};
-
class VisualScriptVariableGet : public VisualScriptNode {
- GDCLASS(VisualScriptVariableGet,VisualScriptNode)
-
+ GDCLASS(VisualScriptVariableGet, VisualScriptNode)
StringName variable;
-protected:
- virtual void _validate_property(PropertyInfo& property) const;
+protected:
+ virtual void _validate_property(PropertyInfo &property) const;
static void _bind_methods();
-public:
+public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -173,35 +155,30 @@ public:
void set_variable(StringName p_var);
StringName get_variable() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptVariableGet();
};
-
class VisualScriptVariableSet : public VisualScriptNode {
- GDCLASS(VisualScriptVariableSet,VisualScriptNode)
-
+ GDCLASS(VisualScriptVariableSet, VisualScriptNode)
StringName variable;
-protected:
- virtual void _validate_property(PropertyInfo& property) const;
+protected:
+ virtual void _validate_property(PropertyInfo &property) const;
static void _bind_methods();
-public:
+public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -212,36 +189,31 @@ public:
void set_variable(StringName p_var);
StringName get_variable() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptVariableSet();
};
-
class VisualScriptConstant : public VisualScriptNode {
- GDCLASS(VisualScriptConstant,VisualScriptNode)
-
+ GDCLASS(VisualScriptConstant, VisualScriptNode)
Variant::Type type;
Variant value;
+
protected:
- virtual void _validate_property(PropertyInfo& property) const;
+ virtual void _validate_property(PropertyInfo &property) const;
static void _bind_methods();
public:
-
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -255,36 +227,29 @@ public:
void set_constant_value(Variant p_value);
Variant get_constant_value() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptConstant();
};
-
-
class VisualScriptPreload : public VisualScriptNode {
- GDCLASS(VisualScriptPreload,VisualScriptNode)
-
+ GDCLASS(VisualScriptPreload, VisualScriptNode)
Ref<Resource> preload;
-protected:
+protected:
static void _bind_methods();
public:
-
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -292,32 +257,27 @@ public:
virtual String get_text() const;
virtual String get_category() const { return "data"; }
- void set_preload(const Ref<Resource>& p_value);
+ void set_preload(const Ref<Resource> &p_value);
Ref<Resource> get_preload() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptPreload();
};
class VisualScriptIndexGet : public VisualScriptNode {
- GDCLASS(VisualScriptIndexGet,VisualScriptNode)
-
+ GDCLASS(VisualScriptIndexGet, VisualScriptNode)
public:
-
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -325,30 +285,24 @@ public:
virtual String get_text() const;
virtual String get_category() const { return "operators"; }
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptIndexGet();
};
-
class VisualScriptIndexSet : public VisualScriptNode {
- GDCLASS(VisualScriptIndexSet,VisualScriptNode)
-
+ GDCLASS(VisualScriptIndexSet, VisualScriptNode)
public:
-
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -356,33 +310,28 @@ public:
virtual String get_text() const;
virtual String get_category() const { return "operators"; }
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptIndexSet();
};
-
-
class VisualScriptGlobalConstant : public VisualScriptNode {
- GDCLASS(VisualScriptGlobalConstant,VisualScriptNode)
+ GDCLASS(VisualScriptGlobalConstant, VisualScriptNode)
int index;
static void _bind_methods();
-public:
+public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -393,35 +342,31 @@ public:
void set_global_constant(int p_which);
int get_global_constant();
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptGlobalConstant();
};
-
class VisualScriptClassConstant : public VisualScriptNode {
- GDCLASS(VisualScriptClassConstant,VisualScriptNode)
+ GDCLASS(VisualScriptClassConstant, VisualScriptNode)
StringName base_type;
StringName name;
+
protected:
static void _bind_methods();
- virtual void _validate_property(PropertyInfo& property) const;
+ virtual void _validate_property(PropertyInfo &property) const;
public:
-
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -429,40 +374,37 @@ public:
virtual String get_text() const;
virtual String get_category() const { return "constants"; }
- void set_class_constant(const StringName& p_which);
+ void set_class_constant(const StringName &p_which);
StringName get_class_constant();
- void set_base_type(const StringName& p_which);
+ void set_base_type(const StringName &p_which);
StringName get_base_type();
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptClassConstant();
};
class VisualScriptBasicTypeConstant : public VisualScriptNode {
- GDCLASS(VisualScriptBasicTypeConstant,VisualScriptNode)
+ GDCLASS(VisualScriptBasicTypeConstant, VisualScriptNode)
Variant::Type type;
StringName name;
+
protected:
static void _bind_methods();
- virtual void _validate_property(PropertyInfo& property) const;
+ virtual void _validate_property(PropertyInfo &property) const;
public:
-
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -470,24 +412,21 @@ public:
virtual String get_text() const;
virtual String get_category() const { return "constants"; }
- void set_basic_type_constant(const StringName& p_which);
+ void set_basic_type_constant(const StringName &p_which);
StringName get_basic_type_constant() const;
void set_basic_type(Variant::Type p_which);
Variant::Type get_basic_type() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptBasicTypeConstant();
};
-
-
class VisualScriptMathConstant : public VisualScriptNode {
- GDCLASS(VisualScriptMathConstant,VisualScriptNode)
+ GDCLASS(VisualScriptMathConstant, VisualScriptNode)
public:
-
enum MathConstant {
MATH_CONSTANT_ONE,
MATH_CONSTANT_PI,
@@ -501,24 +440,22 @@ public:
};
private:
- static const char* const_name[MATH_CONSTANT_MAX];
+ static const char *const_name[MATH_CONSTANT_MAX];
static double const_value[MATH_CONSTANT_MAX];
MathConstant constant;
+
protected:
static void _bind_methods();
-public:
+public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -529,33 +466,30 @@ public:
void set_math_constant(MathConstant p_which);
MathConstant get_math_constant();
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptMathConstant();
};
-VARIANT_ENUM_CAST( VisualScriptMathConstant::MathConstant )
+VARIANT_ENUM_CAST(VisualScriptMathConstant::MathConstant)
class VisualScriptEngineSingleton : public VisualScriptNode {
- GDCLASS(VisualScriptEngineSingleton,VisualScriptNode)
+ GDCLASS(VisualScriptEngineSingleton, VisualScriptNode)
String singleton;
static void _bind_methods();
-public:
+public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -566,38 +500,32 @@ public:
void set_singleton(const String &p_string);
String get_singleton();
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
-
- virtual TypeGuess guess_output_type(TypeGuess* p_inputs, int p_output) const;
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
+ virtual TypeGuess guess_output_type(TypeGuess *p_inputs, int p_output) const;
VisualScriptEngineSingleton();
};
-
-
-
class VisualScriptSceneNode : public VisualScriptNode {
- GDCLASS(VisualScriptSceneNode,VisualScriptNode)
+ GDCLASS(VisualScriptSceneNode, VisualScriptNode)
NodePath path;
+
protected:
- virtual void _validate_property(PropertyInfo& property) const;
+ virtual void _validate_property(PropertyInfo &property) const;
static void _bind_methods();
-public:
+public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -608,37 +536,30 @@ public:
void set_node_path(const NodePath &p_path);
NodePath get_node_path();
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
- virtual TypeGuess guess_output_type(TypeGuess* p_inputs, int p_output) const;
+ virtual TypeGuess guess_output_type(TypeGuess *p_inputs, int p_output) const;
VisualScriptSceneNode();
};
-
-
-
class VisualScriptSceneTree : public VisualScriptNode {
- GDCLASS(VisualScriptSceneTree,VisualScriptNode)
-
+ GDCLASS(VisualScriptSceneTree, VisualScriptNode)
protected:
- virtual void _validate_property(PropertyInfo& property) const;
+ virtual void _validate_property(PropertyInfo &property) const;
static void _bind_methods();
-public:
+public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -646,36 +567,31 @@ public:
virtual String get_text() const;
virtual String get_category() const { return "data"; }
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
- virtual TypeGuess guess_output_type(TypeGuess* p_inputs, int p_output) const;
+ virtual TypeGuess guess_output_type(TypeGuess *p_inputs, int p_output) const;
VisualScriptSceneTree();
};
-
-
class VisualScriptResourcePath : public VisualScriptNode {
- GDCLASS(VisualScriptResourcePath,VisualScriptNode)
+ GDCLASS(VisualScriptResourcePath, VisualScriptNode)
String path;
-protected:
+protected:
static void _bind_methods();
-public:
+public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -686,33 +602,27 @@ public:
void set_resource_path(const String &p_path);
String get_resource_path();
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptResourcePath();
};
-
class VisualScriptSelf : public VisualScriptNode {
- GDCLASS(VisualScriptSelf,VisualScriptNode)
-
+ GDCLASS(VisualScriptSelf, VisualScriptNode)
protected:
-
static void _bind_methods();
-public:
+public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -720,25 +630,21 @@ public:
virtual String get_text() const;
virtual String get_category() const { return "data"; }
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
-
- virtual TypeGuess guess_output_type(TypeGuess* p_inputs, int p_output) const;
+ virtual TypeGuess guess_output_type(TypeGuess *p_inputs, int p_output) const;
VisualScriptSelf();
};
+class VisualScriptCustomNode : public VisualScriptNode {
-class VisualScriptCustomNode: public VisualScriptNode {
-
- GDCLASS(VisualScriptCustomNode,VisualScriptNode)
-
+ GDCLASS(VisualScriptCustomNode, VisualScriptNode)
protected:
-
static void _bind_methods();
-public:
+public:
enum StartMode { //replicated for step
START_MODE_BEGIN_SEQUENCE,
START_MODE_CONTINUE_SEQUENCE,
@@ -746,26 +652,23 @@ public:
};
enum { //replicated for step
- STEP_SHIFT=1<<24,
- STEP_MASK=STEP_SHIFT-1,
- STEP_PUSH_STACK_BIT=STEP_SHIFT, //push bit to stack
- STEP_GO_BACK_BIT=STEP_SHIFT<<1, //go back to previous node
- STEP_NO_ADVANCE_BIT=STEP_SHIFT<<2, //do not advance past this node
- STEP_EXIT_FUNCTION_BIT=STEP_SHIFT<<3, //return from function
- STEP_YIELD_BIT=STEP_SHIFT<<4, //yield (will find VisualScriptFunctionState state in first working memory)
+ STEP_SHIFT = 1 << 24,
+ STEP_MASK = STEP_SHIFT - 1,
+ STEP_PUSH_STACK_BIT = STEP_SHIFT, //push bit to stack
+ STEP_GO_BACK_BIT = STEP_SHIFT << 1, //go back to previous node
+ STEP_NO_ADVANCE_BIT = STEP_SHIFT << 2, //do not advance past this node
+ STEP_EXIT_FUNCTION_BIT = STEP_SHIFT << 3, //return from function
+ STEP_YIELD_BIT = STEP_SHIFT << 4, //yield (will find VisualScriptFunctionState state in first working memory)
};
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -773,32 +676,27 @@ public:
virtual String get_text() const;
virtual String get_category() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptCustomNode();
};
-class VisualScriptSubCall: public VisualScriptNode {
-
- GDCLASS(VisualScriptSubCall,VisualScriptNode)
+class VisualScriptSubCall : public VisualScriptNode {
+ GDCLASS(VisualScriptSubCall, VisualScriptNode)
protected:
-
-
static void _bind_methods();
+
public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -806,34 +704,31 @@ public:
virtual String get_text() const;
virtual String get_category() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptSubCall();
};
-class VisualScriptComment: public VisualScriptNode {
-
- GDCLASS(VisualScriptComment,VisualScriptNode)
+class VisualScriptComment : public VisualScriptNode {
+ GDCLASS(VisualScriptComment, VisualScriptNode)
String title;
String description;
Size2 size;
-protected:
+protected:
static void _bind_methods();
+
public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -841,44 +736,39 @@ public:
virtual String get_text() const;
virtual String get_category() const;
- void set_title(const String& p_title);
+ void set_title(const String &p_title);
String get_title() const;
- void set_description(const String& p_description);
+ void set_description(const String &p_description);
String get_description() const;
- void set_size(const Size2& p_size);
+ void set_size(const Size2 &p_size);
Size2 get_size() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptComment();
};
-class VisualScriptConstructor: public VisualScriptNode {
-
- GDCLASS(VisualScriptConstructor,VisualScriptNode)
+class VisualScriptConstructor : public VisualScriptNode {
+ GDCLASS(VisualScriptConstructor, VisualScriptNode)
Variant::Type type;
MethodInfo constructor;
protected:
-
-
static void _bind_methods();
+
public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -889,39 +779,33 @@ public:
void set_constructor_type(Variant::Type p_type);
Variant::Type get_constructor_type() const;
- void set_constructor(const Dictionary& p_info);
+ void set_constructor(const Dictionary &p_info);
Dictionary get_constructor() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptConstructor();
};
+class VisualScriptLocalVar : public VisualScriptNode {
-
-
-class VisualScriptLocalVar: public VisualScriptNode {
-
- GDCLASS(VisualScriptLocalVar,VisualScriptNode)
+ GDCLASS(VisualScriptLocalVar, VisualScriptNode)
StringName name;
Variant::Type type;
protected:
-
static void _bind_methods();
+
public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -929,39 +813,36 @@ public:
virtual String get_text() const;
virtual String get_category() const;
- void set_var_name(const StringName& p_name);
+ void set_var_name(const StringName &p_name);
StringName get_var_name() const;
void set_var_type(Variant::Type p_type);
Variant::Type get_var_type() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptLocalVar();
};
-class VisualScriptLocalVarSet: public VisualScriptNode {
+class VisualScriptLocalVarSet : public VisualScriptNode {
- GDCLASS(VisualScriptLocalVarSet,VisualScriptNode)
+ GDCLASS(VisualScriptLocalVarSet, VisualScriptNode)
StringName name;
Variant::Type type;
protected:
-
static void _bind_methods();
+
public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -969,22 +850,20 @@ public:
virtual String get_text() const;
virtual String get_category() const;
- void set_var_name(const StringName& p_name);
+ void set_var_name(const StringName &p_name);
StringName get_var_name() const;
void set_var_type(Variant::Type p_type);
Variant::Type get_var_type() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptLocalVarSet();
};
+class VisualScriptInputAction : public VisualScriptNode {
-
-class VisualScriptInputAction: public VisualScriptNode {
-
- GDCLASS(VisualScriptInputAction,VisualScriptNode)
+ GDCLASS(VisualScriptInputAction, VisualScriptNode)
public:
enum Mode {
MODE_PRESSED,
@@ -997,22 +876,19 @@ public:
Mode mode;
protected:
-
- virtual void _validate_property(PropertyInfo& property) const;
+ virtual void _validate_property(PropertyInfo &property) const;
static void _bind_methods();
+
public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -1020,57 +896,51 @@ public:
virtual String get_text() const;
virtual String get_category() const;
- void set_action_name(const StringName& p_name);
+ void set_action_name(const StringName &p_name);
StringName get_action_name() const;
void set_action_mode(Mode p_mode);
Mode get_action_mode() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptInputAction();
};
-VARIANT_ENUM_CAST( VisualScriptInputAction::Mode )
-
-class VisualScriptDeconstruct: public VisualScriptNode {
+VARIANT_ENUM_CAST(VisualScriptInputAction::Mode)
- GDCLASS(VisualScriptDeconstruct,VisualScriptNode)
+class VisualScriptDeconstruct : public VisualScriptNode {
+ GDCLASS(VisualScriptDeconstruct, VisualScriptNode)
struct Element {
StringName name;
Variant::Type type;
};
-
Vector<Element> elements;
void _update_elements();
Variant::Type type;
InputEvent::Type input_type;
- void _set_elem_cache(const Array& p_elements);
+ void _set_elem_cache(const Array &p_elements);
Array _get_elem_cache() const;
- virtual void _validate_property(PropertyInfo& property) const;
+ virtual void _validate_property(PropertyInfo &property) const;
protected:
-
-
static void _bind_methods();
+
public:
virtual int get_output_sequence_port_count() const;
virtual bool has_input_sequence_port() const;
-
virtual String get_output_sequence_port_text(int p_port) const;
-
virtual int get_input_value_port_count() const;
virtual int get_output_value_port_count() const;
-
virtual PropertyInfo get_input_value_port_info(int p_idx) const;
virtual PropertyInfo get_output_value_port_info(int p_idx) const;
@@ -1084,12 +954,11 @@ public:
void set_deconstruct_input_type(InputEvent::Type p_input_type);
InputEvent::Type get_deconstruct_input_type() const;
- virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance);
+ virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptDeconstruct();
};
-
void register_visual_script_nodes();
void unregister_visual_script_nodes();