User class created
This commit is contained in:
60
User/User.hpp
Normal file
60
User/User.hpp
Normal file
@@ -0,0 +1,60 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* User.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: aortigos <aortigos@student.42malaga.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/05/07 10:22:52 by aortigos #+# #+# */
|
||||
/* Updated: 2026/05/07 10:22:52 by aortigos ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef USER_HPP
|
||||
|
||||
# define USER_HPP
|
||||
|
||||
# include <iostream>
|
||||
|
||||
class User
|
||||
{
|
||||
private:
|
||||
int fd;
|
||||
std::string nick;
|
||||
std::string username;
|
||||
std::string realname;
|
||||
std::string buffer;
|
||||
bool authenticated;
|
||||
bool registered;
|
||||
|
||||
public:
|
||||
User();
|
||||
User(const User &other);
|
||||
User& operator=(const User &other);
|
||||
~User();
|
||||
|
||||
|
||||
// Getters
|
||||
|
||||
int getFd() const;
|
||||
std::string getNick() const;
|
||||
std::string getUsername() const;
|
||||
std::string getRealname() const;
|
||||
std::string &getBuffer();
|
||||
bool isAuthenticated() const;
|
||||
bool isRegistered() const;
|
||||
|
||||
|
||||
// Setters
|
||||
|
||||
void setNick(std::string nick);
|
||||
void setUsername(std::string username);
|
||||
void setRealname(std::string realname);
|
||||
void appendBuffer(std::string buff);
|
||||
void clearBuffer();
|
||||
|
||||
void setAuthenticated(bool value);
|
||||
void setRegistered(bool value);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user