73 std::unique_ptr<UserInfo>
build();
84 static std::unique_ptr<UserInfo>
fromJson(
const QString jsonString);
91 std::unique_ptr<UserInfo> internal_info;
172 QString phone_number;
A builder class for constructing UserInfo objects.
Definition UserInfo.h:32
std::unique_ptr< UserInfo > build()
Builds and returns a unique pointer to the constructed UserInfo object.
Definition UserInfo.cpp:26
UserInfoBuilder & set_name(QString name)
Sets the name for the UserInfo object being built.
Definition UserInfo.cpp:11
UserInfoBuilder & set_avatar(QString path)
Sets the avatar path for the UserInfo object being built.
Definition UserInfo.cpp:6
UserInfoBuilder & set_phone_number(QString phone)
Sets the phone number for the UserInfo object being built.
Definition UserInfo.cpp:21
UserInfoBuilder()
Constructs a new UserInfoBuilder. Initializes an internal UserInfo object that will be populated.
Definition UserInfo.cpp:3
static std::unique_ptr< UserInfo > fromJson(const QString jsonString)
Static method to construct a UserInfo object from a JSON string.
Definition UserInfo.cpp:67
UserInfoBuilder & set_email(QString email)
Sets the email for the UserInfo object being built.
Definition UserInfo.cpp:16
Represents a user's profile information, including name, email, phone number, and avatar path.
Definition UserInfo.h:22
const QString & get_email() const
Gets the user's email address.
Definition UserInfo.cpp:34
void set_name(const QString &name)
Sets the user's name.
Definition UserInfo.cpp:50
QString serialized() const
Serializes the UserInfo object into a JSON string.
Definition UserInfo.cpp:85
void set_email(const QString &email)
Sets the user's email address.
Definition UserInfo.cpp:54
void set_phone(const QString &phone)
Sets the user's phone number.
Definition UserInfo.cpp:58
~UserInfo()=default
Default destructor for UserInfo.
void set_avator(const QString &av_path)
Sets the file path for the user's avatar.
Definition UserInfo.cpp:46
const QString & get_name() const
Gets the user's name.
Definition UserInfo.cpp:30
const QString & get_phone_number() const
Gets the user's phone number.
Definition UserInfo.cpp:38
const QString & get_avatar() const
Gets the file path to the user's avatar.
Definition UserInfo.cpp:42