server_new/guild.h

Go to the documentation of this file.
00001 /* $Id:guild.h $ */
00002 /*
00003    Copyright (C) 2007 by Jurjen Stellingwerff <jurjen@stwerff.xs4all.nl>
00004    Part of the Moros Project http://moros.sourceforge.net/
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License version 3.
00008    This program is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY.
00010 
00011    See the COPYING file for more details.
00012 */
00013 
00014 #ifndef __GUILD_H
00015 #define __GUILD_H
00016 
00017 #include <string>
00018 #include <map>
00019 #include <list>
00020 using namespace std;
00021 
00022 #include "skill_level.h"
00023 #include "person.h"
00024 #include "army.h"
00025 
00026 #define loopGuildSkills(r,v) loopMap((r)->listSkills(),v,class skill_level)
00027 #define loopGuildMembers(r,v) loopMap((r)->listMembers(),v,class person)
00028 #define loopGuildArmies(r,v) loopMap((r)->listArmies(),v,class army)
00029 
00030 class guild {
00031     string name;
00032     string description;
00033     map<string,class skill_level> skills;
00034     class skill *deity;
00035     map<string,class person> members;
00036     map<string,class army> armies;
00037 public:
00038     guild();
00039 
00040     // Field : name
00041     const string getName() const;
00042     void setName(const string v);
00043 
00044     // Field : description
00045     const string getDescription() const;
00046     void setDescription(const string v);
00047 
00048     // Field : skills
00049     class skill_level& getSkills(const string v);
00050     map<string,class skill_level>& listSkills();
00051     void setSkills(class skill_level &v);
00052     void delSkills(const string v);
00053     const bool isSkills(const string v) const;
00054 
00055     // Field : deity
00056     class skill& getDeity() const;
00057     void setDeity(class skill &v);
00058 
00059     // Field : members
00060     class person& getMembers(const string v);
00061     map<string,class person>& listMembers();
00062     void setMembers(class person &v);
00063     void delMembers(const string v);
00064     const bool isMembers(const string v) const;
00065 
00066     // Field : armies
00067     class army& getArmies(const string v);
00068     map<string,class army>& listArmies();
00069     void setArmies(class army &v);
00070     void delArmies(const string v);
00071     const bool isArmies(const string v) const;
00072 
00073     void save(class channel &ch);
00074     void load(class channel &ch);
00075     void xml(ofstream &f, int l=0, int r=0);
00076 };
00077 
00078 #endif // __GUILD_H


Generated on Tue Jan 1 17:30:00 2008 for server_new/guild.h Source File by  doxygen   Visit the project page on SourceForge.net Logo