mirror of
https://github.com/UltraCoderRU/telebotxx.git
synced 2026-01-28 04:05:13 +00:00
Fixed class Chat (type of id changed to std::int64_t). Class PhotoSizeArray implemented. JSON-parsing functions were rewritten and moved to JsonObjects.cpp. Implemented new JSON-parsing functions.
62 lines
1.2 KiB
C++
62 lines
1.2 KiB
C++
#ifndef TELEBOTXX_USER_H
|
|
#define TELEBOTXX_USER_H
|
|
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
namespace telebotxx
|
|
{
|
|
class User
|
|
{
|
|
public:
|
|
User();
|
|
|
|
/// \brief Full constructor
|
|
/// \param id id
|
|
/// \param firstName first name
|
|
/// \param lastName last name
|
|
/// \param username username
|
|
User(int id, const std::string& firstName, const std::string& lastName, const std::string& username);
|
|
|
|
User(const User&);
|
|
User(User&&);
|
|
|
|
/// \brief Get id
|
|
int getId() const;
|
|
|
|
/// \brief Set id
|
|
void setId(int id);
|
|
|
|
/// \brief Get first name
|
|
const std::string& getFirstName() const;
|
|
|
|
/// \brief Set first name
|
|
void setFirstName(const std::string& firstName);
|
|
|
|
/// \brief Get last name
|
|
const std::string& getLastName() const;
|
|
|
|
/// \brief Set last name
|
|
void setLastName(const std::string& lastName);
|
|
|
|
/// \brief Get username
|
|
const std::string& getUsername() const;
|
|
|
|
/// \brief Set username
|
|
void setUsername(const std::string& username);
|
|
|
|
void swap(User&) noexcept;
|
|
|
|
const User& operator=(User other);
|
|
|
|
private:
|
|
int id_;
|
|
std::string firstName_;
|
|
std::string lastName_;
|
|
std::string username_;
|
|
};
|
|
|
|
using UserPtr = std::shared_ptr<User>;
|
|
}
|
|
|
|
#endif // TELEBOTXX_USER_H
|