00001 00008 #include "sysconfig.h" 00009 #include "user.h" 00010 00015 User::User(unsigned int id) 00016 : mClientId(id), mState(0), mName("") { 00017 } 00018 00022 User::~User() { 00023 } 00024 00028 User::User(const User& r_user) 00029 : mClientId(r_user.mClientId), mState(r_user.mState), mName(r_user.mName) { 00030 } 00031 00037 User& User::operator=(const User& r_user) { 00038 if (this == &r_user) 00039 return *this; 00040 mClientId = r_user.mClientId; 00041 mState = r_user.mState; 00042 mName = r_user.mName; 00043 return *this; 00044 } 00045 00051 bool User::operator==(const User& r_user) const { 00052 return (this->mClientId == r_user.mClientId); 00053 } 00054 00060 bool User::operator==(unsigned int id) const { 00061 return (this->mClientId == id); 00062 } 00063 00069 bool User::operator!=(unsigned int id) const { 00070 return !(this->mClientId == id); 00071 } 00072 00078 unsigned int User::Id() { 00079 return mClientId; 00080 } 00081
1.2.17