From bc893794c5e7ec1a968c00a8538241278e8c8d34 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 6 Aug 2018 16:06:12 -0400 Subject: User objects now contain whether the user is protected --- src/user.h | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'src/user.h') diff --git a/src/user.h b/src/user.h index ef7d72e..acd62d0 100644 --- a/src/user.h +++ b/src/user.h @@ -6,56 +6,64 @@ #include namespace twitter { - + class client; - + typedef unsigned long long user_id; - + class user { public: - + user() {} user(std::string data); - + user_id getID() const { assert(_valid); - + return _id; } - + std::string getScreenName() const { assert(_valid); - + return _screen_name; } - + std::string getName() const { assert(_valid); - + return _name; } - + + bool isProtected() const + { + assert(_valid); + + return _protected; + } + bool operator==(const user& other) const { return _id == other._id; } - + bool operator!=(const user& other) const { return _id != other._id; } - + private: - + bool _valid = false; user_id _id; std::string _screen_name; std::string _name; + bool _protected = false; }; - + }; #endif /* end of include guard: USER_H_BF3AB38C */ -- cgit 1.4.1