pandemonium_engine_minimal/core/object/func_ref.h

28 lines
606 B
C++
Raw Normal View History

2023-12-14 21:54:22 +01:00
#ifndef FUNC_REF_H
#define FUNC_REF_H
2023-12-14 21:54:22 +01:00
/* func_ref.h */
2023-12-14 21:54:22 +01:00
#include "core/object/reference.h"
class FuncRef : public Reference {
GDCLASS(FuncRef, Reference);
ObjectID id;
StringName function;
protected:
static void _bind_methods();
public:
Variant call_func(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
Variant call_funcv(const Array &p_args);
void set_instance(Object *p_obj);
void set_function(const StringName &p_func);
StringName get_function();
bool is_valid() const;
FuncRef();
};
#endif // FUNC_REF_H