#ifndef USER_MANAGER_H #define USER_MANAGER_H #include "core/object/reference.h" #include "core/string/ustring.h" #include "core/containers/vector.h" #include "scene/main/node.h" class User; class UserManager : public Node { GDCLASS(UserManager, Node); public: Ref get_user(const int id); Ref get_user_name(const String &user_name); Ref get_user_email(const String &user_email); void save_user(const Ref &user); Ref create_user(); bool is_username_taken(const String &user_name); bool is_email_taken(const String &email); virtual Ref _get_user(const int id); virtual Ref _get_user_name(const String &user); virtual Ref _get_user_email(const String &user_email); virtual void _save_user(Ref user); virtual Ref _create_user(); virtual bool _is_username_taken(const String &user_name); virtual bool _is_email_taken(const String &email); virtual Vector> get_all(); UserManager(); ~UserManager(); protected: void _notification(int p_what); static void _bind_methods(); }; #endif