00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GUILD_H
00023 #define GUILD_H
00024
00025 #include <guichan/listmodel.hpp>
00026
00027 #include <string>
00028 #include <vector>
00029
00030 class Guild : public gcn::ListModel
00031 {
00032 public:
00036 Guild(short id, short rights);
00037
00041 void setName(const std::string &name)
00042 {
00043 mName = name;
00044 }
00045
00049 void addMember(const std::string &name);
00050
00055 const std::string &getName() const
00056 {
00057 return mName;
00058 }
00059
00064 short getId() const
00065 {
00066 return mId;
00067 }
00068
00072 void removeMember(const std::string &name);
00073
00078 int getNumberOfElements() {
00079 return mMembers.size();
00080 }
00081
00086 std::string getElementAt(int i) {
00087 return mMembers[i];
00088 }
00089
00094 bool getInviteRights()
00095 {
00096 return mCanInviteUsers;
00097 }
00098
00099 bool isMember(const std::string &name);
00100
00101 private:
00102 std::string mName;
00103 short mId;
00104 std::vector<std::string> mMembers;
00105 bool mCanInviteUsers;
00106 };
00107
00108 #endif